Mail Archives: djgpp/1999/04/21/03:55:37
mdruiter AT cs DOT vu DOT nl wrote:
>
> Todd Steury <steu4718 AT uidaho DOT edu> wrote:
> > For
> > exponents, I've written my equations as "a^b" to signify 'take a to the b
> > power'. However, the compiler complains "invalid operands 'float' and
> > 'double' to binary 'operator ^'". What is the proper mathematical operator
> > for exponent?
>
> It is exp(a, b), type `info libc alph exp' on the command line to get info.
>
> (a ^ b) means (a xor b), being the bitwise exclusive or operator.
>
> Hope this helps, Michel.
It won't. The function is pow(). exp() takes one argument, not two, and
returns pow(e,x) where e is the usual 2.7.... The suggestion to type 'info libc
a exp' is a good one, but it needs to be supplimented with the correct 'info
libc a pow'.
--
Martin Ambuhl (mambuhl AT earthlink DOT net)
Note: mambuhl AT tiac DOT net will soon be inactive
- Raw text -