Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004748OCamlOCaml standard librarypublic2009-03-18 14:482013-07-19 11:40
ReporterChristophe Troestler 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionsuspended 
PlatformOSOS Version
Product Version3.11.0 
Target VersionFixed in Version 
Summary0004748: Complex +-0.
DescriptionThis is related to bug 0001817 albeit not fitting the description, thus I open a new issue.

# Complex.mul Complex.one {Complex.re=(-1.); Complex.im = 0.0};;
- : Complex.t = {Complex.re = -1.; Complex.im = 0.}
# Complex.div Complex.one {Complex.re=(-1.); Complex.im = 0.0};;
- : Complex.t = {Complex.re = -1.; Complex.im = -0.}

(note the sign of the imaginary part). I believe the second is correct while the first one should return {Complex.re = -1.; Complex.im = -0.}.
TagsNo tags attached.
Attached Files

- Relationships
related to 0001817acknowledged Complex infinity/nan field values 

-  Notes
(0009811)
xleroy (administrator)
2013-07-19 11:40

I welcome pointers to a good tutorial on complex arithmetic using IEEE754 floats.

I can understand why you'd expect im = -0.0 in the first example, yet the "_Cmultd" reference implementation of complex multiply in ISO C99, annex G, gives im = +0.0...

Suspending this PR until we have solid background on complex IEEE754 arithmetic.

- Issue History
Date Modified Username Field Change
2009-03-18 14:48 Christophe Troestler New Issue
2009-04-29 15:42 doligez Status new => acknowledged
2009-08-19 14:59 xclerc Relationship added related to 0001817
2012-06-21 20:13 frisch Category OCaml general => OCaml standard library
2012-07-11 14:55 doligez Target Version => 4.01.0+dev
2012-07-31 13:36 doligez Target Version 4.01.0+dev => 4.00.1+dev
2012-09-17 13:53 doligez Target Version 4.00.1+dev => 4.01.0+dev
2013-07-19 11:40 xleroy Note Added: 0009811
2013-07-19 11:40 xleroy Status acknowledged => resolved
2013-07-19 11:40 xleroy Resolution open => suspended
2013-07-19 11:40 xleroy Target Version 4.01.0+dev =>


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker