Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

A few facts about Lisp and Haskell

Name: Anonymous 2011-04-18 6:59

Lisp:

* (expt -1 (exp 1))
#C(-0.6332554 0.7739428)


Haskell:

Prelude Data.Complex> (-1) ** exp 1 :: Complex Double
(-0.6332556513148192) :+ (-0.773942685266709)

Name: Anonymous 2011-04-18 11:01

For the floor thing,  same happens in C and standard is, for floating  point types, to evaluate 1/0 to Infinity, not to raise exception. But yeah, it is stupid.

(-1)**exp 1 correctly evaluates to NaN.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List