[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hugs-bugs
Subject:    Re: asin returns nan.0
From:       Sven Panne <Sven.Panne () informatik ! uni-muenchen ! de>
Date:       2002-05-31 17:14:54
Message-ID: 3CF7AF8E.5030002 () informatik ! uni-muenchen ! de
[Download RAW message or body]

Adrian Kubala wrote:
 > [...]
 > Main> norm (b, a) * norm (b, c)
 > 2.0

Well, mathematically this is 2, but not in Real-World-Floating-Point(tm) :-).

 > Main> asin (-2 / (norm (b, a) * norm (b, c)))

Again, in theory this is well defined: asin (-1) = -pi/2, but you actually
don't pass -1, but something slightly smaller, so asin is undefined. See:

    http://docs.sun.com/htmlcoll/coll.648.2/iso-8859-1/NUMCOMPGD/ncg_goldberg.html

Also note that "normal" Hugs versions only fake Double by using Float. So Hugs'
behaviour is correct here...

Cheers,
    S.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic