Mail Archives: djgpp/1994/01/10/07:15:20
I've found a problem with the tanh function in djgpp 1.11. As x gets
bigger, tanh(x) should approach 1.0. e.g. running a trivial program on
a Sun yields:
tanh(2.71828) = 0.991329
tanh(7.38906) = 0.999999
tanh(20.0855) = 1
tanh(54.5982) = 1
tanh(148.413) = 1
tanh(403.429) = 1
tanh(1096.63) = 1
tanh(2980.96) = 1
tanh(8103.08) = 1
tanh(22026.5) = 1
Running the same problem on djgpp generates a fp exception as it
calculates the last line.
I have two questions:
1) Where should I look for a fix or the source of the tanh function.
2) Under what circumstances will a fp exception be generated ? Are
there any options which control the severity of such an event ?
i.e. can I make it non-fatal ?
Thanks in advance,
M.
- Raw text -