On Thursday, April 6, 2017 at 5:11:23 PM UTC-5, Waldek Hebisch wrote:
>
> 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
>
I see. But I do not think Maple converted decimal point number to rational
in
the following:
restart;
int(exp(-2.3*c),c);
-0.4347826087 exp(-2.300000000 c)
But now I understand different systems do things differently and that
Fricas needed explicit conversion done before the call.
thanks,
--Nasser
--
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.