vermaseren / form

The FORM project for symbolic manipulation of very big expressions
GNU General Public License v3.0
1.14k stars 136 forks source link

Set restrictions with number inequalities don't work for fractions #75

Open benruijl opened 8 years ago

benruijl commented 8 years ago

The following pattern does not match, even though comparators <,>,== can be applied to combinations of integers and fractions:

S n;
CF K;

L F =  K(3/2);
id K(n?{>1}) = 1;

Print +s;
.end
tueda commented 8 years ago

Empirically I know that K(n?{>1}) matches with small integers greater than 1 (so doesn't match with K(10^10)), but actually where can we find the description of it in the manual, except some explanations in the tutorial?

jodavies commented 8 years ago

On my system the match fails precisely at K(2^31), i.e., for numbers above the largest signed 32bit int.

tueda commented 8 years ago

Yes, by small I meant a small integer that fits in a WORD, so 0 <= |n| < 2^31 on 64-bit systems. (One bit is used for the sign.)