abs of complex number
lassik opened this issue · 3 comments
lassik commented
(abs -3-4i) => 3.0
Returns abs of the real part, discards the imaginary part.
lassik commented
Via schemedoc/surveys#50 cc @jpellegrini
jpellegrini commented
As @lassik said somewhere else, if you interpret R7RS as saying "abs" only applies to reals, it's not strictly wrong -- it would be an error, and in such situation the implementation may do anything it wants.
But it would be nice to return something useful, like the complex norm! 😁
justinethier commented
Thanks for the report! For now, Cyclone will return an error in this case.