Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions check/fixes.frm
Original file line number Diff line number Diff line change
Expand Up @@ -3914,6 +3914,39 @@ Print;
assert succeeded?
assert result("F") =~ expr("0")
*--#] Issue642 :
*--#[ Issue695_1 :
#StartFloat 20
CFunction f;
Local F1 = f(1.0)+f(1.0);
Local F2 = f(1.0)/3+f(1.0)*2.0;
Local F3 = 1.0*f(1.0)/3+f(1.0)*2.0;
Local F4 = f(1.0)+f(1.1);
Local F5 = f(0.5)+f(1/2);
Print;
.end
#pend_if wordsize == 2
assert succeeded?
assert result("F1") =~ expr("2*f(1.0e+00)")
assert result("F2") =~ expr("2.33333e+00*f(1.0e+00)")
assert result("F3") =~ expr("2.33333e+00*f(1.0e+00)")
assert result("F4") =~ expr("f(1.0e+00) + f(1.1e+00)")
assert result("F5") =~ expr("f(1/2) + f(5.0e-01)")
*--#] Issue695_1 :
*--#[ Issue695_2 :
#StartFloat 30
Symbol a,b;
CFunction f;
Local F = 1.0*f(a);
.sort
#endfloat

Local F = F + f(a);
Print;
.end
#pend_if wordsize == 2
assert succeeded?
assert result("F") =~ expr("f(a) + f(a)*float_(2,3,1,340282366920938463463374607431768211456)")
*--#] Issue695_2 :
*--#[ PullReq535 :
* This test requires more than the specified 50K workspace.
#:maxtermsize 200
Expand Down
10 changes: 5 additions & 5 deletions sources/sort.c
Original file line number Diff line number Diff line change
Expand Up @@ -2967,7 +2967,7 @@ WORD Compare1(PHEAD WORD *term1, WORD *term2, WORD level)
}
}
#ifdef WITHFLOAT
if ( c1 == FLOATFUN && t1 == stopper1 && t2 == stopper2 && AT.aux_ != 0 ) {
if ( level == 0 && c1 == FLOATFUN && t1 == stopper1 && t2 == stopper2 && AT.aux_ != 0 ) {
/*
We have two FLOATFUN's. Test whether they are 'legal'
*/
Expand Down Expand Up @@ -3039,12 +3039,12 @@ WORD Compare1(PHEAD WORD *term1, WORD *term2, WORD level)
}
}
#ifdef WITHFLOAT
if ( t1 < stopper1 && *t1 == FLOATFUN && t1+t1[1] == stopper1
&& TestFloat(t1) ) {
if ( level == 0 && t1 < stopper1 && *t1 == FLOATFUN && t1+t1[1] == stopper1
&& TestFloat(t1) && AT.aux_ != 0 ) {
AT.SortFloatMode = 1; return(0);
}
else if ( t2 < stopper2 && *t2 == FLOATFUN && t2+t2[1] == stopper2
&& TestFloat(t2) ) {
else if ( level == 0 && t2 < stopper2 && *t2 == FLOATFUN && t2+t2[1] == stopper2
&& TestFloat(t2) && AT.aux_ != 0 ) {
AT.SortFloatMode = 2; return(0);
}
#endif
Expand Down
Loading