Mail Archives: djgpp/1993/11/30/05:31:23
Gary Bell writes:
>
> Hi All, I have installed djgpp at home and it looks good.
>
> I have just one question, has anyone had any problems with
> programs crashing when using sqrt.
Yes. There are two things to watch out for:
(1) make sure to include the line '#include <math.h>' in your source
(2) make sure the argument of sqrt() is non-negative ;-)
>
> I am writing a mpeg encoder and the initialization of the DCT
> has a sqrt, when it is replaced with a number it works but
> with the sqrt the DCT crashes.
>
> Does anyone have any suggestions,
I think you forgot to include <math.h>.
Otherwise, the argument is negative...
>
> Thanks
>
> Gary.
>
.^^^^^^^^ _____________________________________
| | / Pieter Kunst (P.J.) \
| _ _| / Philips Research Laboratories, \
.--(o)(o) / Building WY3, Prof. Holstlaan 4, \
|@ _) / 5656 AA Eindhoven, The Netherlands. |
| ,___| / e-mail: kunst AT prl DOT philips DOT nl /
| / \_______________________________________________/
/____\
- Raw text -