I write in FriCAS 1.2.5
--- approxIntegral.spad
-------------------------------------------------------------------
)abbrev package APPRINT ApproxIntegrate
ApproxIntegrate : Exports == Implementation where
Exports == with
integr : (Float, Float, Float; Float -> Float) -> Float
Implementation == add
integr(a : Float, b : Float, step : Float, f : Float -> Float) :
Float ==
sum := 0;
c := a;
b' := b - step;
while c <= b repeat
sum := sum + step*f(c + step/2.0);
c := c + step;
sum
-------------------------------------------------------------------------------------------------------------------------------------
Then, )compile approxIntegral
reports
Compiling FriCAS source code from file
/home/mechvel/papers/tosave/my/diLogarithm/program/approxIntegral.spad
using old system compiler.
APPRINT abbreviates package ApproxIntegrate
------------------------------------------------------------------------
initializing NRLIB APPRINT for ApproxIntegrate
compiling into NRLIB APPRINT
compiling local integr : (Float,Float,Float,Float -> Float) -> Float
>> Apparent user error:
integr is local and exported
How to fix, please?
I need somehow to compile this function and run.
Thanks,
----------
Sergei
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.