mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 11:49:27 +02:00
* another fix of cosh/sinh overflow checking
This commit is contained in:
parent
5e996dc18f
commit
a867530056
@ -1327,8 +1327,8 @@ function sinh(x : Single) : Single;
|
|||||||
begin
|
begin
|
||||||
if x>8.94159862326326216608E+0001 then
|
if x>8.94159862326326216608E+0001 then
|
||||||
exit(huge_single*huge_single);
|
exit(huge_single*huge_single);
|
||||||
if x<8.94159862326326216608E+0001 then
|
if x<-8.94159862326326216608E+0001 then
|
||||||
exit(huge_single*huge_single);
|
exit(-(huge_single*huge_single));
|
||||||
temp:=exp(x);
|
temp:=exp(x);
|
||||||
{ gives better behavior around zero, and in particular ensures that sinh(-0.0)=-0.0 }
|
{ gives better behavior around zero, and in particular ensures that sinh(-0.0)=-0.0 }
|
||||||
if temp=1 then
|
if temp=1 then
|
||||||
|
Loading…
Reference in New Issue
Block a user