Nasser M. Abbasi wrote:
> 
> Newbie here.
> 
> I read the page
> 
> http://axiom-wiki.newsynthesis.org/SymbolicIntegration?root=FriCAS%20Problems
> 
> And still can't figure what syntax to use for this. Suppose I want to do 
> 
>      integrate( exp(-2.3*c),c)
> 
> This gives an error, because 2.3 is floating point. I tried:
> 
> integrate( exp(-2.3*c),c)@Float
> integrate( exp(-2.3@Float*c),c)
> 
> How does one handle the above? Do I really have to enter it as
> 
> integrate( exp(-23/100*c),c) 
> 
> For Fricas to process it? 

FriCAS can not integrate expressions containing floating
point numbers.  Some systems will quietly convert floating
point numbers to rationals, but FriCAS philosopy is to
make such convertions explicit.  Now, there are many ways
to get rational:

- writing 23/100 is most natural
- you can request convertion to rational by

    retract(2.3)@Fraction(Integer)

- or you may explicitely specify desired accuracy of convertion

    rationalApproximation(2.3, 3)

  (note that specifying lower accuracy will give you different
   approximation)


-- 
                              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.

Reply via email to