dear Stefan
 first of all sin(pi/2) = 1.0

to understand the problem arises in your computation u should
read about floating point arithmetic and about how numbers are stored in
computers.
check this very good article.
http://docs.sun.com/source/806-3568/ncg_goldberg.html

i hope this may clarify your doubts
On Wed, Mar 17, 2010 at 3:26 AM, Laurent <moky.m...@gmail.com> wrote:

> stefan.o...@gmail.com ha scritto:
>
>  Hello,
>>
>> I have a term t that I simplify with t.simplify_trig(). Parts of the
>> result look something like this:
>>
>> 65*sin(0.500000000000000*pi)*sin(x2)*cos(x3)*sin(x5)+...
>>
>> My limited math understanding tells me that sin(0.5*pi) is zero,
>>
>>
>
> sin(pi/2)=0, that's rignt
> But 0.500000000000 probably means 0.5+10^(-15) or something like that.
> You should say from what computation comes that 0.5000.
>
> By the way,
> sage : numerical_approx(1/2)-1/2
> 0.000000000000000
>
> I guess Sage does not consider the result of numerical_approx() as an exact
> value :
> print type(numerical_approx(1/2))
> print type(1/2)
>
> <type 'sage.rings.real_mpfr.RealNumber'>
> <type 'sage.rings.rational.Rational'
>
> My two cents
>
> Laurent
>
>
>
>
> --
> To post to this group, send email to sage-support@googlegroups.com
> To unsubscribe from this group, send email to
> sage-support+unsubscr...@googlegroups.com<sage-support%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/sage-support
> URL: http://www.sagemath.org
>



-- 
Ajay Rawat
Kalpakkam, IGCAR

-------------------------------------------------------------------------
Save Himalayas....
-------------------------------------------------------------------------

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to