소스 검색

* another fix of cosh/sinh overflow checking

florian 1 년 전
부모
커밋
a867530056
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      rtl/objpas/math.pp

+ 2 - 2
rtl/objpas/math.pp

@@ -1327,8 +1327,8 @@ function sinh(x : Single) : Single;
   begin
      if x>8.94159862326326216608E+0001 then
        exit(huge_single*huge_single);
-     if x<8.94159862326326216608E+0001 then
-       exit(huge_single*huge_single);
+     if x<-8.94159862326326216608E+0001 then
+       exit(-(huge_single*huge_single));
      temp:=exp(x);
      { gives better behavior around zero, and in particular ensures that sinh(-0.0)=-0.0 }
      if temp=1 then