octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #29432] Sin(1e22) is wrong


From: Judd Storrs
Subject: [Octave-bug-tracker] [bug #29432] Sin(1e22) is wrong
Date: Wed, 07 Apr 2010 22:08:18 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100214 Ubuntu/9.10 (karmic) Firefox/3.5.8

Follow-up Comment #8, bug #29432 (project octave):

I think the originator choose 1e22 based on knowledge of floating point
representation and possibly with knowledge of trig-function algorithm
implementations--other than that I don't know why getting large sin()s correct
would matter? Frankly, in terms of correctness, any number between -1 and +1
is plausible as the result of sin(1e22) with ieee doubles since:


octave:1> format long
octave:2> x = (1e22)-(2*pi) ;
octave:3> y = (1e22)+(2*pi) ;
octave:4> x-y
ans = 0


I just assume this is a special diagnostic feature. Or I guess it could be an
algorithmic fingerprint. I just thought I'd send in the test in the chance it
was useful. It's not so that's fine.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?29432>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]