anonym | Anmelden | Neues Konto anmelden | 2022-06-30 16:43 UTC |
Startseite | Übersicht | Probleme anzeigen | Änderungsprotokoll | Roadmap | Dokumentation | Konto |
Einfache Problemansicht anzeigen [ Zu Notizen wechseln ] | [ erweiterte Anzeige ] [ Problem-Historie ] [ Drucken ] | ||||||
ID | Kategorie | Auswirkung | Reproduzierbar | Meldungsdatum | Letzte Aktualisierung | ||
0000048 | [Cadmium] general | kleinerer Fehler | immer | 2009-11-30 11:51 | 2010-02-06 21:12 | ||
Reporter | xclerc | Anzeigestatus | öffentlich | ||||
Bearbeitung durch | xclerc | ||||||
Priorität | normal | Lösung | erledigt | ||||
Status | erledigt | Produktversion | 1.3 | ||||
Zusammenfassung | 0000048: Error in "mod_float" primitive implementation | ||||||
Beschreibung |
The Cadmium runtime does not return the same values than the original one for the "mod_float" primitive. Counterexamples follow: Through "ocamlc"/"ocamlopt": 4.2 modfloat 1.6 = 1 -4.2 modfloat 1.6 = -1 4.2 modfloat -1.6 = 1 -4.2 modfloat -1.6 = -1 Through "ocamljava": 4.2 modfloat 1.6 = -0.6 -4.2 modfloat 1.6 = 0.6 4.2 modfloat -1.6 = -0.6 -4.2 modfloat -1.6 = 0.6 Source file used to generate counterexamples: let tests = [ 4.2, 1.6 ; (-4.2), 1.6 ; 4.2, (-1.6) ; (-4.2), (-1.6) ; ] let () = List.iter (fun (x, y) -> Printf.printf "%g modfloat %g = %g\n" x y (mod_float x y)) tests |
||||||
Zusätzliche Information | |||||||
Tags | Keine Tags zugeordnet. | ||||||
Angehängte Dateien | |||||||
|
![]() |
|
(0000197) xclerc (Administrator) 2009-11-30 12:08 |
The fix is trivial: the 'Math.IEEEremainder' method should be replaced by the '%' operator. |
Mantis 1.1.7[^] Copyright © 2000 - 2008 Mantis Group |