Changeset 233 for Include/Classes/System/Math.ab
- Timestamp:
- May 6, 2007, 8:37:57 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/Classes/System/Math.ab
r232 r233 68 68 Asin = _System_GetNaN() 69 69 Else 70 Asin = ATan(x / Sqrt(1 - x * x))70 Asin = Math.Atan(x / Sqrt(1 - x * x)) 71 71 End If 72 72 End Function … … 126 126 Static Function Ceiling(x As Double) As Long 127 127 If Floor(x) = x then 128 Return x 128 Return x As Long 129 129 Else 130 130 Return Floor(x) + 1 … … 144 144 Static Function Cosh(value As Double) As Double 145 145 Dim t As Double 146 t = Exp(value)146 t = Math.Exp(value) 147 147 return (t + 1 / t) * 0.5 148 148 End Function … … 514 514 If Math.Abs(x) > _System_EPS5 Then 515 515 Dim t As Double 516 t = Exp(x)516 t = Math.Exp(x) 517 517 Return (t - 1 / t) * 0.5 518 518 Else … … 571 571 Static Function Tanh(x As Double) As Double 572 572 If x > _System_EPS5 Then 573 Return 2 / (1 + Exp(-2 * x)) - 1573 Return 2 / (1 + Math.Exp(-2 * x)) - 1 574 574 ElseIf x < -_System_EPS5 Then 575 Return 1 - 2 / ( Exp(2 * x) + 1)575 Return 1 - 2 / (Math.Exp(2 * x) + 1) 576 576 Else 577 577 Return x * (1 - x * x * 0.333333333333333) 'x * (1 - x * x / 3) … … 591 591 592 592 If x >= 0 Then 593 k = Fix(x * _System_InverseHalfPI) + 0.5594 Else 595 k = Fix(x * _System_InverseHalfPI) - 0.5593 k = ( Fix(x * _System_InverseHalfPI) + 0.5 ) As Long 594 Else 595 k = ( Fix(x * _System_InverseHalfPI) - 0.5 ) As Long 596 596 End If 597 597 x = (x - (3217.0 / 2048.0) * k) + _System_D * k
Note:
See TracChangeset
for help on using the changeset viewer.