mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 14:29:44 +02:00
- Got rid of "goto".
git-svn-id: trunk@26104 -
This commit is contained in:
parent
85e1f444c5
commit
949b994a68
@ -35,8 +35,6 @@
|
|||||||
{ Copyright (c) 1997 Carl Eric Codere }
|
{ Copyright (c) 1997 Carl Eric Codere }
|
||||||
{-------------------------------------------------------------------------}
|
{-------------------------------------------------------------------------}
|
||||||
|
|
||||||
{$goto on}
|
|
||||||
|
|
||||||
type
|
type
|
||||||
TabCoef = array[0..6] of Real;
|
TabCoef = array[0..6] of Real;
|
||||||
{ also necessary for Int() on systems with 64bit floats (JM) }
|
{ also necessary for Int() on systems with 64bit floats (JM) }
|
||||||
@ -879,7 +877,6 @@ type
|
|||||||
var e : Integer;
|
var e : Integer;
|
||||||
z, y : Real;
|
z, y : Real;
|
||||||
|
|
||||||
Label Ldone;
|
|
||||||
begin
|
begin
|
||||||
if( d <= 0.0 ) then
|
if( d <= 0.0 ) then
|
||||||
begin
|
begin
|
||||||
@ -911,26 +908,24 @@ type
|
|||||||
{ /* rational form */ }
|
{ /* rational form */ }
|
||||||
z := d*d;
|
z := d*d;
|
||||||
z := d + d * ( z * polevl( z, R, 2 ) / p1evl( z, S, 3 ) );
|
z := d + d * ( z * polevl( z, R, 2 ) / p1evl( z, S, 3 ) );
|
||||||
goto ldone;
|
|
||||||
end;
|
|
||||||
|
|
||||||
{ logarithm using log(1+x) = x - .5x**2 + x**3 P(x)/Q(x) }
|
|
||||||
|
|
||||||
if( d < SQRTH ) then
|
|
||||||
begin
|
|
||||||
Dec(e, 1);
|
|
||||||
d := ldexp( d, 1 ) - 1.0; { 2x - 1 }
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
d := d - 1.0;
|
begin
|
||||||
|
{ logarithm using log(1+x) = x - .5x**2 + x**3 P(x)/Q(x) }
|
||||||
|
if( d < SQRTH ) then
|
||||||
|
begin
|
||||||
|
Dec(e, 1);
|
||||||
|
d := ldexp( d, 1 ) - 1.0; { 2x - 1 }
|
||||||
|
end
|
||||||
|
else
|
||||||
|
d := d - 1.0;
|
||||||
|
|
||||||
{ rational form }
|
{ rational form }
|
||||||
z := d*d;
|
z := d*d;
|
||||||
y := d * ( z * polevl( d, P, 6 ) / p1evl( d, Q, 6 ) );
|
y := d * ( z * polevl( d, P, 6 ) / p1evl( d, Q, 6 ) );
|
||||||
y := y - ldexp( z, -1 ); { y - 0.5 * z }
|
y := y - ldexp( z, -1 ); { y - 0.5 * z }
|
||||||
z := d + y;
|
z := d + y;
|
||||||
|
end;
|
||||||
ldone:
|
|
||||||
{ recombine with exponent term }
|
{ recombine with exponent term }
|
||||||
if( e <> 0 ) then
|
if( e <> 0 ) then
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user