Home My Page Projects Code Snippets Project Openings SML/NJ Bugs
Summary Activity Tracker Lists

[#225] Math.ln giving erroneous answers on Windows

Date:
2019-09-21 15:28
Priority:
3
State:
Closed
Submitted by:
Bug Submitter (webuser)
Assigned to:
John Reppy (jhr)
Machine Architecture:
x86
Operating System:
Other
Component:
Basis Library
Resolution:
Fixed
Severity:
Critical
OS Version:
Windows 10
SML/NJ Version:
110.93
Keywords:
URL:
Transcript (of reproduction):
PS C:\Users\gztow\Documents\Pgmg\Sml\Moolah\Simpson> sml Standard ML of New Jersey v110.93 [built: Thu Sep 05 19:16:24 2019] - Math.ln 10.0; [autoloading] [library $SMLNJ-BASIS/basis.cm is stable] [library $SMLNJ-BASIS/(basis.cm):basis-common.cm is stable] [autoloading done] val it = ~1.97809402413 : real
Source (for reproduction):
Math.ln 10.0; (* in REPL *)
Summary:
Math.ln giving erroneous answers on Windows

Detailed description
Math.ln 10.0; (* in REPL *) gives wrong answer
of ~1.978 but should be about 2.302
Additional comments:
On Windows 10, machine architecture AMD64, Windows version 10.0.17763

Submitted via web form by Robert Gislason <gztown2216@yahoo.com>

Comments:

Message  ↓
Date: 2019-10-04 20:31
Sender: John Reppy

Fixed for 110.94. The problem was in the assembly implementation of scalb.

Date: 2019-09-21 17:15
Sender: John Reppy

This bug appears to be Windows specific, since I was not able to reproduce it on macOS. As far as I can tell, the same code is run for this expression on Windows and macOS, so it is not clear why the results are different.

Attached Files:

Changes

Field Old Value Date By
status_idOpen2019-10-04 20:31jhr
close_dateNone2019-10-04 20:31jhr
ResolutionAccepted As Bug2019-10-04 20:31jhr
assigned_tonone2019-09-21 17:15jhr
summaryMath.ln giving erroneous answers2019-09-21 17:15jhr
detailsMath.ln 10.0; (* in REPL *) gives wrong answer of ~1.978 but should be about 2.302 Additional comments: On Windows 10, machine architecture AMD64, Windows version 10.0.17763 Submitted via web form by Robert Gislason <gztown2216@yahoo.com> 2019-09-21 17:15jhr
Machine ArchitectureOther2019-09-21 17:15jhr
ResolutionNone2019-09-21 17:15jhr
Transcript (of reproduction)PS C:\Users\gztow\Documents\Pgmg\Sml\Moolah\Simpson> sml Standard ML of New Jersey v110.93 [built: Thu Sep 05 19:16:24 2019] - Math.ln 10.0; [autoloading] [library $SMLNJ-BASIS/basis.cm is stable] [library $SMLNJ-BASIS/(basis.cm):basis-common.cm is stable] [autoloading done] val it = ~1.97809402413 : real2019-09-21 17:15jhr
Source (for reproduction)Math.ln 10.0; (* in REPL *) 2019-09-21 17:15jhr