mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 18:09:27 +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 }
|
||||
{-------------------------------------------------------------------------}
|
||||
|
||||
{$goto on}
|
||||
|
||||
type
|
||||
TabCoef = array[0..6] of Real;
|
||||
{ also necessary for Int() on systems with 64bit floats (JM) }
|
||||
@ -879,7 +877,6 @@ type
|
||||
var e : Integer;
|
||||
z, y : Real;
|
||||
|
||||
Label Ldone;
|
||||
begin
|
||||
if( d <= 0.0 ) then
|
||||
begin
|
||||
@ -911,26 +908,24 @@ type
|
||||
{ /* rational form */ }
|
||||
z := d*d;
|
||||
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
|
||||
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 }
|
||||
z := d*d;
|
||||
y := d * ( z * polevl( d, P, 6 ) / p1evl( d, Q, 6 ) );
|
||||
y := y - ldexp( z, -1 ); { y - 0.5 * z }
|
||||
z := d + y;
|
||||
|
||||
ldone:
|
||||
{ rational form }
|
||||
z := d*d;
|
||||
y := d * ( z * polevl( d, P, 6 ) / p1evl( d, Q, 6 ) );
|
||||
y := y - ldexp( z, -1 ); { y - 0.5 * z }
|
||||
z := d + y;
|
||||
end;
|
||||
{ recombine with exponent term }
|
||||
if( e <> 0 ) then
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user