intro: "SJT" == Stephen J Turnbull <turnbull(a)sk.tsukuba.ac.jp> writes:
SJT> Nick Pakoulin in <d79zj3cl.fsf(a)ispras.ru> points out that these are all
SJT> failures of "format."
SJT> Can somebody check out what format is returning and try to find out why?
SJT> It isn't happening on Unix platforms.
SJT> FAIL: Assertion failed: (string= (format "%e" 100)
"1.000000e+02")
SJT> FAIL: Assertion failed: (string= (format "%E" 100)
"1.000000E+02")
SJT> FAIL: Assertion failed: (string= (format "%g" 1e-006)
"1e-06")
SJT> FAIL: Assertion failed: (string= (format "%G" 1e-006)
"1E-06")
SJT> FAIL: Assertion failed: (string= (format "%#e" 100)
"1.000000e+02")
SJT> FAIL: Assertion failed: (string= (format "%#E" 100)
"1.000000E+02")
SJT> FAIL: Assertion failed: (string= (format "%#g" 1e-006)
"1.00000e-06")
SJT> FAIL: Assertion failed: (string= (format "%#G" 1e-006)
"1.00000E-06")
SJT> FAIL: Assertion failed: (string= (format "%e" 100)
"1.000000e+02")
SJT> FAIL: Assertion failed: (string= (format "%E" 100)
"1.000000E+02")
SJT> FAIL: Assertion failed: (string= (format "%g" 1e-006)
"1e-06")
SJT> FAIL: Assertion failed: (string= (format "%G" 1e-006)
"1E-06")
SJT> FAIL: Assertion failed: (string= (format "%#e" 100)
"1.000000e+02")
SJT> FAIL: Assertion failed: (string= (format "%#E" 100)
"1.000000E+02")
SJT> FAIL: Assertion failed: (string= (format "%#g" 1e-006)
"1.00000e-06")
SJT> FAIL: Assertion failed: (string= (format "%#G" 1e-006)
"1.00000E-06")
I think, the problem is in Microsoft's handling of floating-point `format'
instructions. Our tests expect exponent to be two digits long. Their
implementation of `sprintf' (Visual Studio 6.0, MS Windows 2000) makes it three
digits long.
I evaluated `(format "%??" xx)' from tests and here is what I got:
-------------------------------------------------------------------------------
(string= (format "%e" 100) "1.000000e+02")
==> (string= "1.000000e+002" "1.000000e+02")
(string= (format "%E" 100) "1.000000E+02")
==> (string= "1.000000E+002" "1.000000E+02")
(string= (format "%g" 1e-006) "1e-06")
==> (string= "1e-006" "1e-06")
(string= (format "%G" 1e-006) "1E-06")
==> (string= "1E-006" "1E-06")
(string= (format "%#e" 100) "1.000000e+02")
==> (string= "1.000000e+002" "1.000000e+02")
(string= (format "%#E" 100) "1.000000E+02")
==> (string= "1.000000E+002" "1.000000E+02")
(string= (format "%#g" 1e-006) "1.00000e-06")
==> (string= "1.00000e-006" "1.00000e-06")
(string= (format "%#G" 1e-006) "1.00000E-06")
==> (string= "1.00000E-006" "1.00000E-06")
(string= (format "%e" 100) "1.000000e+02")
==> (string= "1.000000e+002" "1.000000e+02")
(string= (format "%E" 100) "1.000000E+02")
==> (string= "1.000000E+002" "1.000000E+02")
(string= (format "%g" 1e-006) "1e-06")
==> (string= "1e-006" "1e-06")
(string= (format "%G" 1e-006) "1E-06")
==> (string= "1E-006" "1E-06")
(string= (format "%#e" 100) "1.000000e+02")
==> (string= "1.000000e+002" "1.000000e+02")
(string= (format "%#E" 100) "1.000000E+02")
==> (string= "1.000000E+002" "1.000000E+02")
(string= (format "%#g" 1e-006) "1.00000e-06")
==> (string= "1.00000e-006" "1.00000e-06")
(string= (format "%#G" 1e-006) "1.00000E-06")
==> (string= "1.00000E-006" "1.00000E-06")
Nick.