Re: Precision of sin(), cos() , etc.

new topic     » goto parent     » topic index » view thread      » older message » newer message

> Subject: Precision of sin(), cos() , etc.
> 
> 
> posted by: Harry Hickey <hwhickey at erols.com>
> 
>   The reference manual examples for using sin(0 and cos() show values being 
> returned with just 3 decimal digits.
>   I would like to be able to get sines, cosines, tangents, to 
> double-precision values. I understand this kind of precision is built-in to
> the Pentium hardware. Is there any way I can get this precision in my 
> Euphoria programs?

Eu provides double precision results as can be provided by the Intel FPU 
hardware.
You could try your luck at getting 80-bit precision numbers, using the 
relevant machine instructions, but this will use call(), which has a 
sizable performance overhead.
Otherwise, you'd have to set up your own infinite precision real 
representation system and implement sin() or whatever in that framework. 
I have working code for this in C++, which was intended for use in 
implementing the Open Eu specification.

CChris

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu