Nasser M. Abbasi wrote:
> 
> In Fricas, I can use the )set messages time on  to see the time taken by 
> integrate.  But how do I set a time-out, and also how to I know if 
> integrate finished due to time-out or not, and how do I capture the 
> time-used (EV) in a variable?
> 
> I am trying to do all this using a script. Non-interactive. So everything 
> has to be done by code in Fricas.
> 
> For example. if I do 
> 
> (3) -> )set messages time on
> (3) -> ii:=integrate(1/(x*(3*x^2 - 6*x + 4)^(1/3)),x);
> 
>                                          Type: 
> Union(Expression(Integer),...)
>                        Time: 0.00 (IN) + 240.79 (EV) + 0.00 (OT) = 240.80 
> sec
> 
> SO the above took 240 seconds.  How to capture this value EV in variable so 
> I can record it to a file?
> 
> And what if I want to set time-out of say 200 seconds. How to do that? And 
> how to know if integrate returned due to time-out or not?
<snip>
> How could something similar be done in Fricas?

Currently FriCAS does not support timeouts.  You can compute
execution time by asking for current time:

(8) -> elapsedUserTime()$Lisp

   (8)  43392

Note: you need to assign result to variable of type Integer to
do computation with it.  This value is normally in milliseconds,
but it depends on Lisp compiler used to compile FriCAS.
You can check time unit by:

)boot $inverseTimerTicksPerSecond

|$inverseTimerTicksPerSecond|
Value = 0.001

(it depends only on compiler, so it is enough to check it once).

-- 

                              Waldek Hebisch

-- 
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 https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
  • [fricas-devel] how... 'Nasser M. Abbasi' via FriCAS - computer algebra system
    • Re: [fricas-d... Waldek Hebisch
      • Re: [fric... 'Nasser M. Abbasi' via FriCAS - computer algebra system
        • Re: [... 'Nasser M. Abbasi' via FriCAS - computer algebra system
          • R... oldk1331
            • ... 'Nasser M. Abbasi' via FriCAS - computer algebra system
        • Re: [... Waldek Hebisch
    • Re: [fricas-d... Waldek Hebisch

Reply via email to