Differences From Artifact [551406cfe8]:
- File
mttroot/mtt/lib/reduce/fix_c.r
— part of check-in
[adc4f01f84]
at
2002-05-27 10:36:21
on branch origin/master
— Fix for bug [553524] #define PI causes parse error.
Only substitutes for PI if it is not a number. This prevents Reduce from
trying to substitute for 3.14... when "on rounded" has been set. (user: geraint@users.sourceforge.net, size: 576) [annotate] [blame] [check-ins using] [more...]
To Artifact [4c2ca104c3]:
- File mtt/lib/reduce/fix_c.r — part of check-in [af3953deae] at 2021-03-01 11:39:42 on branch master — Cleanup repository after cvs2git conversion. (user: jeff@gridfinity.com, size: 633) [annotate] [blame] [check-ins using] [more...]
- File
mttroot/mtt/lib/reduce/fix_c.r
— part of check-in
[1955d69343]
at
2002-08-30 15:39:04
on branch origin/master
— Read fix_c.r before ese.r and explicitly overload ** operator with pow().
These changes are required for the Codemist version of Reduce. (user: geraint@users.sourceforge.net, size: 633) [annotate] [blame] [check-ins using]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | + | %% Fixes for c-code generation %% Set PI explicitly here to avoid later conflict with cc headers %% if PI is not already a number (i.e. on rounded has not been set) IF NOT NUMBERP (pi) THEN LET PI = 3.14159$ ON ROUNDED$ % No integer output %% Changes x^y to pow(x,y) OPERATOR pow$ FOR ALL x,y LET x^y = pow(x,y)$ % Use the pow function FOR ALL x,y LET x**y = pow(x,y)$ % Use the pow function %% Derivatives FOR ALL f,g,x LET df(pow(f,g),x)= pow(f,g-1) * (df(f,x)*g + df(g,x)*f*log(f))$ %% Special cases FOR ALL x LET pow(x,0) = 1$ |
︙ |