Merge branch 'rtoy-mathjax-for-lapack'
[maxima.git] / share / numeric / rtest_decfp.mac
blobbd3a0ed3c3d84f618e89ff5f0807d4da03238919
1 /*
2  * Tests for decimal floats, basically copied from the decfp-core.lisp
3  */
5 (kill(all),
6  if not ?boundp('rounddecimalfloats) then load(decfp),
7  sum:0
8  );
9 0;
11 (for i: 1 thru 50 do sum:sum+decbfloat(9/10^i), is(sum < 1));
12 true;
14 is(sum+1/10^50=1.0L0);
15 true;
17 rationalize(1.0L-1)-1/10;
20 /* The decfp code changes the value of bigfloatone (and possibly other 
21 such values) to decimal floats. Let's reset them. */
22 (reset(?bigfloat%pi,?bigfloat%e,?bfmhalf,?bfhalf,?bigfloatone,?bigfloatzero),0);