diff --git a/rtl/i386/math.inc b/rtl/i386/math.inc index ac8f420d8d..b56c3aa3e3 100644 --- a/rtl/i386/math.inc +++ b/rtl/i386/math.inc @@ -111,6 +111,7 @@ end; {$define FPC_SYSTEM_HAS_EXP} + { exp function adapted from AMath library (C) Copyright 2009-2013 Wolfgang Ehrhardt } function fpc_exp_real(d : ValReal) : ValReal;assembler;compilerproc; asm fldt d diff --git a/rtl/inc/genmath.inc b/rtl/inc/genmath.inc index f20887edd6..935dc8736d 100644 --- a/rtl/inc/genmath.inc +++ b/rtl/inc/genmath.inc @@ -368,6 +368,7 @@ type {$ifndef SYSTEM_HAS_LDEXP} {$ifdef SUPPORT_DOUBLE} +{ ldexpd function adapted from DAMath library (C) Copyright 2013 Wolfgang Ehrhardt } function ldexp( x: Real; N: Integer):Real; {* ldexp() multiplies x by 2**n. *} var diff --git a/rtl/objpas/math.pp b/rtl/objpas/math.pp index 11c0dec13e..4259b88413 100644 --- a/rtl/objpas/math.pp +++ b/rtl/objpas/math.pp @@ -783,7 +783,7 @@ begin csc := cosecant(x); end; - +{ arcsin and arccos functions from AMath library (C) Copyright 2009-2013 Wolfgang Ehrhardt } function arcsin(x : float) : float; begin arcsin:=arctan2(x,sqrt((1.0-x)*(1.0+x))); @@ -881,6 +881,7 @@ function artanh(x : float) : float; artanh:=(lnxp1(x)-lnxp1(-x))*0.5; end; +{ hypot function from AMath library (C) Copyright 2009-2013 Wolfgang Ehrhardt } function hypot(x,y : float) : float; begin x:=abs(x); @@ -910,6 +911,7 @@ function logn(n,x : float) : float; logn:=ln(x)/ln(n); end; +{ lnxp1 function from AMath library (C) Copyright 2009-2013 Wolfgang Ehrhardt } function lnxp1(x : float) : float; var y: float;