Re: Cosine of 90 degrees



"mikelee101" <mikelee101athotmaildotcom> wrote:
I was just curious why I wasn't getting zero for the result of the
cosine of a 90 degree angle. This formula
=COS(RADIANS(90))

I understand your expectation. Even though binary arithmetic often causes subtle differences in results (e.g. IF(10.1-10=0.1,TRUE) returns FALSE!), many implementations of transcendental and other math functions that are implemented with approximating formulas make special cases for recognizable boundary conditions.

For example, that is probably why COS(PI()) is exactly -1.

Since RADIANS(90) returns exactly the same binary result as PI()/2, and PI()/2 is exactly the binary representation of PI() divided by 2, there is no reason why the COS() implementation cannot make a special case of COS(RADIANS(90)) and return exactly zero.

But that's a judgment call. Obviously, the implementors have to draw a line somewhere.


----- original message -----

"mikelee101" <mikelee101athotmaildotcom> wrote in message news:A9F92208-0B96-4629-87D7-C829FB4A3775@xxxxxxxxxxxxxxxx
Hello All,
I was just curious why I wasn't getting zero for the result of the cosine of
a 90 degree angle. This formula

=COS(RADIANS(90))

returns

6.12574E-17

when I would have expected 0. Am I misusing a function in there somewhere?
Any thoughts would be greatly appreciated.

Excel 07, XPPro SP3.

Thanks.
--
Mike Lee
McKinney,TX USA

.



Relevant Pages

  • Re: how to get the angle from the cosine, etc.
    ... >that you already have the sine and cosine of the angle. ... What we are forced to do is to _define_ the inverse cosine as a new ... If you also know the sine, then you have a unique solution within ...
    (sci.math)
  • Re: double pointers
    ... double sincostan(double angle, double *pcosine, double *ptangent) ... double cosine = cos; ... double tangent = tan; ... return sine; ...
    (comp.programming)
  • Re: how to get the angle from the cosine, etc.
    ... |> Sean Hunt wrote: ... |> I just can't seem to create the equation to go from cosine to angle ... the cosine function is just a table. ...
    (sci.math)
  • Re: Vignetting due to lens or sensor?
    ... The apparent area of the focal plane is proportional to the cosine of the angle of incidence. ... So the number of photons incident on the focal plane is proportional to the cosine of their angle of incidence. ...
    (rec.photo.digital.slr-systems)
  • Re: A possible non-foward looking statement that could take the placeof a roadmap
    ... angle that we haven't run buy them, but so far, no one here has. ... The wording of the reference you gave (it is suggested by others - I ... possibility of creating expectation by the presence of a statement that ...
    (borland.public.delphi.non-technical)

Quantcast