bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Math functions


From: Andreas Jaeger
Subject: Re: Math functions
Date: Sat, 06 Jul 2002 08:41:45 +0200
User-agent: Gnus/5.090007 (Oort Gnus v0.07) XEmacs/21.4 (Artificial Intelligence, i386-suse-linux)

Jarmo <address@hidden> writes:

> Hello,
>
> I hope this is a right place to ask some questions about C - functions. 
> I have created an application called MathPlanner and there is problems
> with math functions and I don't know what is wrong. These problems
> does appear in other applications as well.
>
> When I'am trying to calculate cos(90) the answer should be 0 but it is
> something like 1.234e-20.  Many other functions will also give same
> kind of answers. So. How should I deal with this ?

> Is there any information available in this topic ?

glibc comes with a large manual that explains these and other topics.

Use "info libc" from the commandline to access it.

>From the manual:
Trigonometric Functions
=======================

   These are the familiar `sin', `cos', and `tan' functions.  The
arguments to all of these functions are in units of radians; recall
that pi radians equals 180 degrees.

Therefore cos(pi/2) is 0, but cos(90) not,

Andreas
-- 
 Andreas Jaeger
  SuSE Labs address@hidden
   private address@hidden
    http://www.suse.de/~aj



reply via email to

[Prev in Thread] Current Thread [Next in Thread]