xitomatl:fmt:num complex reversal

Bug #375472 reported by Ken Dickey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Scheme Libraries
Fix Released
Low
Derick Eddington

Bug Description

> (sqrt -3.8)
0.0+1.9493588689617927i

> (fmt #f (num (sqrt -3.8) 10 5))
"1.94936+00000i"
> (fmt #f (num (sqrt -3.8) 10 4))
"1.9494+0000i"
> (fmt #f (num (sqrt -3.8) 10 3))
"1.949+000i"\

Note also the number of zeros, above.

Revision history for this message
Derick Eddington (derick-eddington) wrote :

Ken told me he's already informed Alex Shinn of this. It definitely looks like a bug. I'll wait to hear what Alex says. Also, (xitomatl fmt) is at version 0.5 but there is a new 0.6 which might fix this. I'll know after I update to the new version.

Changed in ikarus-libraries:
assignee: nobody → Derick Eddington (derick-eddington)
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Derick Eddington (derick-eddington) wrote :

I updated Xitomatl's fmt to 0.6, and this is what it does now:

> (fmt #f (num (sqrt -3.8) 10 5))
"0.00000+1.94936i"
> (fmt #f (num (sqrt -3.8) 10 4))
"0.0000+1.9494i"
> (fmt #f (num (sqrt -3.8) 10 3))
"0.000+1.949i"

The complex numbers are now correct, but I don't know if the number of zeros should be considered a bug according to the intent of Alex. I'm going to say this is fixed, but reopen if you want.

Changed in scheme-libraries:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.