On Mon, Feb 18, 2013 at 5:51 PM, Glenn Fowler <[email protected]> wrote:
>
> 2013-02-14 alpha posted to www.research.att.com/download/alpha/
> INIT.2013-02-14.tgz
> ast-ksh.2013-02-14.tgz
> this is a work in progress
> there are known problems on some architectures
One issue seems to be in arith.sh on Solaris/SPARC. SPARC64's |long
double| uses 128bits while AMD64 only has 80bits - the tests in
arith.sh assume a fixed precision resolution:
-- snip --
test arith begins at 2013-02-21+02:43:32
arith.sh[814]: norm of index array is
12.7906215642555854643662052165147 should be 12.7906215642555855
arith.sh[815]: norm of associative array is
12.7906215642555854643662052165147 should be 12.7906215642555855
test arith failed at 2013-02-21+02:43:35 with exit code 2 [ 215 tests 2 errors ]
test arith(shcomp) begins at 2013-02-21+02:43:35
shcomp-arith.ksh[814]: norm of index array is
12.7906215642555854643662052165147 should be 12.7906215642555855
shcomp-arith.ksh[815]: norm of associative array is
12.7906215642555854643662052165147 should be 12.7906215642555855
test arith(shcomp) failed at 2013-02-21+02:43:37 with exit code 2 [
215 tests 2 errors ]
-- snip --
AFAIK the fix would be to change...
-- snip --
[[ $((norm(x))) == 12.7906215642555855 ]] || err_exit "norm of index
array is $((norm(x))) should be 12.7906215642555855"
[[ $((norm(z))) == 12.7906215642555855 ]] || err_exit "norm of
associative array is $((norm(z))) should be 12.7906215642555855"
-- snip --
... to...
-- snip --
[[ $((norm(x))) == 12.7906215642555855* ]] || err_exit "norm of index
array is $((norm(x))) should match 12.7906215642555855*"
[[ $((norm(z))) == 12.7906215642555855* ]] || err_exit "norm of
associative array is $((norm(z))) should match 12.7906215642555855*"
-- snip --
(mathematicians will likely start revolving in their graves at
500rpm... =:-) ... but then this is a test suite and not something
which has to be mathematically 100% correct [1])
[1]=mathematically _more_ correct may be:
-- snip --
(( fabs(norm(x) - 12.7906215642555855) < 0.000000000000001 )) ||
err_exit "norm of index array is $((norm(x))) should be near
12.7906215642555855"
(( fabs(norm(z) - 12.7906215642555855) < 0.000000000000001 )) ||
err_exit "norm of associative array is $((norm(z))) should be near
12.7906215642555855"
-- snip --
BTW: Doesn't AST/UWIN have platforms where |long double| is the same
as |double| and/or |long double| is only a 64bit IEEE 754(-2008)
floating-point variable ?
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) [email protected]
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)
_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers