
(FPCore (x y z)
:precision binary64
(/
(*
(- x 2.0)
(+
(*
(+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y)
x)
z))
(+
(* (+ (* (+ (* (+ x 43.3400022514) x) 263.505074721) x) 313.399215894) x)
47.066876606)))
double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((x - 2.0d0) * ((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z)) / (((((((x + 43.3400022514d0) * x) + 263.505074721d0) * x) + 313.399215894d0) * x) + 47.066876606d0)
end function
public static double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
def code(x, y, z): return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)
function code(x, y, z) return Float64(Float64(Float64(x - 2.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) end
function tmp = code(x, y, z) tmp = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606); end
code[x_, y_, z_] := N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision] * x), $MachinePrecision] + 137.519416416), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(x + 43.3400022514), $MachinePrecision] * x), $MachinePrecision] + 263.505074721), $MachinePrecision] * x), $MachinePrecision] + 313.399215894), $MachinePrecision] * x), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z)
:precision binary64
(/
(*
(- x 2.0)
(+
(*
(+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y)
x)
z))
(+
(* (+ (* (+ (* (+ x 43.3400022514) x) 263.505074721) x) 313.399215894) x)
47.066876606)))
double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((x - 2.0d0) * ((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z)) / (((((((x + 43.3400022514d0) * x) + 263.505074721d0) * x) + 313.399215894d0) * x) + 47.066876606d0)
end function
public static double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
def code(x, y, z): return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)
function code(x, y, z) return Float64(Float64(Float64(x - 2.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) end
function tmp = code(x, y, z) tmp = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606); end
code[x_, y_, z_] := N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision] * x), $MachinePrecision] + 137.519416416), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(x + 43.3400022514), $MachinePrecision] * x), $MachinePrecision] + 263.505074721), $MachinePrecision] * x), $MachinePrecision] + 313.399215894), $MachinePrecision] * x), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\end{array}
(FPCore (x y z)
:precision binary64
(if (<= x -3.7e+53)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 4.1e+15)
(/
(*
(- x 2.0)
(+
(*
x
(+
(* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
z))
(+
47.066876606
(*
x
(+
313.399215894
(+
(* 43.3400022514 (pow x 2.0))
(+ (* x 263.505074721) (pow x 3.0)))))))
(+
(+
(fma x 4.16438922228 (/ 3655.1204654076414 x))
(/ (- y 130977.50649958357) (* x x)))
-110.1139242984811))))
double code(double x, double y, double z) {
double tmp;
if (x <= -3.7e+53) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 4.1e+15) {
tmp = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / (47.066876606 + (x * (313.399215894 + ((43.3400022514 * pow(x, 2.0)) + ((x * 263.505074721) + pow(x, 3.0))))));
} else {
tmp = (fma(x, 4.16438922228, (3655.1204654076414 / x)) + ((y - 130977.50649958357) / (x * x))) + -110.1139242984811;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= -3.7e+53) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 4.1e+15) tmp = Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(Float64(43.3400022514 * (x ^ 2.0)) + Float64(Float64(x * 263.505074721) + (x ^ 3.0))))))); else tmp = Float64(Float64(fma(x, 4.16438922228, Float64(3655.1204654076414 / x)) + Float64(Float64(y - 130977.50649958357) / Float64(x * x))) + -110.1139242984811); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, -3.7e+53], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 4.1e+15], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(47.066876606 + N[(x * N[(313.399215894 + N[(N[(43.3400022514 * N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(x * 263.505074721), $MachinePrecision] + N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 4.16438922228 + N[(3655.1204654076414 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(y - 130977.50649958357), $MachinePrecision] / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -110.1139242984811), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.7 \cdot 10^{+53}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 4.1 \cdot 10^{+15}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{47.066876606 + x \cdot \left(313.399215894 + \left(43.3400022514 \cdot {x}^{2} + \left(x \cdot 263.505074721 + {x}^{3}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\mathsf{fma}\left(x, 4.16438922228, \frac{3655.1204654076414}{x}\right) + \frac{y - 130977.50649958357}{x \cdot x}\right) + -110.1139242984811\\
\end{array}
\end{array}
if x < -3.7e53Initial program 0.3%
associate-/l*7.5%
sub-neg7.5%
metadata-eval7.5%
fma-def7.5%
fma-def7.5%
fma-def7.5%
fma-def7.5%
fma-def7.5%
fma-def7.5%
fma-def7.5%
Simplified7.5%
Taylor expanded in x around inf 97.9%
if -3.7e53 < x < 4.1e15Initial program 99.6%
Taylor expanded in x around 0 99.6%
if 4.1e15 < x Initial program 12.1%
*-commutative12.1%
associate-*l/16.3%
*-commutative16.3%
sub-neg16.3%
metadata-eval16.3%
Simplified16.3%
Taylor expanded in x around -inf 99.2%
sub-neg99.2%
+-commutative99.2%
mul-1-neg99.2%
unsub-neg99.2%
*-commutative99.2%
fma-def99.2%
associate-*r/99.2%
metadata-eval99.2%
mul-1-neg99.2%
unsub-neg99.2%
unpow299.2%
metadata-eval99.2%
Simplified99.2%
Final simplification99.2%
(FPCore (x y z)
:precision binary64
(if (<=
(/
(*
(- x 2.0)
(+
(*
x
(+
(* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
z))
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
5e+306)
(*
(+ x -2.0)
(/
(fma
x
(fma x (fma x (fma x 4.16438922228 78.6994924154) 137.519416416) y)
z)
(fma
x
(fma x (fma x (+ x 43.3400022514) 263.505074721) 313.399215894)
47.066876606)))
(+
(+
(fma x 4.16438922228 (/ 3655.1204654076414 x))
(/ (- y 130977.50649958357) (* x x)))
-110.1139242984811)))
double code(double x, double y, double z) {
double tmp;
if ((((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= 5e+306) {
tmp = (x + -2.0) * (fma(x, fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), z) / fma(x, fma(x, fma(x, (x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606));
} else {
tmp = (fma(x, 4.16438922228, (3655.1204654076414 / x)) + ((y - 130977.50649958357) / (x * x))) + -110.1139242984811;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= 5e+306) tmp = Float64(Float64(x + -2.0) * Float64(fma(x, fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), z) / fma(x, fma(x, fma(x, Float64(x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606))); else tmp = Float64(Float64(fma(x, 4.16438922228, Float64(3655.1204654076414 / x)) + Float64(Float64(y - 130977.50649958357) / Float64(x * x))) + -110.1139242984811); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision], 5e+306], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(x * N[(x * N[(x * N[(x * 4.16438922228 + 78.6994924154), $MachinePrecision] + 137.519416416), $MachinePrecision] + y), $MachinePrecision] + z), $MachinePrecision] / N[(x * N[(x * N[(x * N[(x + 43.3400022514), $MachinePrecision] + 263.505074721), $MachinePrecision] + 313.399215894), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 4.16438922228 + N[(3655.1204654076414 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(y - 130977.50649958357), $MachinePrecision] / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -110.1139242984811), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606} \leq 5 \cdot 10^{+306}:\\
\;\;\;\;\left(x + -2\right) \cdot \frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right)}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\mathsf{fma}\left(x, 4.16438922228, \frac{3655.1204654076414}{x}\right) + \frac{y - 130977.50649958357}{x \cdot x}\right) + -110.1139242984811\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < 4.99999999999999993e306Initial program 95.7%
*-commutative95.7%
associate-*l/98.9%
*-commutative98.9%
sub-neg98.9%
metadata-eval98.9%
Simplified98.9%
if 4.99999999999999993e306 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) Initial program 0.1%
*-commutative0.1%
associate-*l/1.9%
*-commutative1.9%
sub-neg1.9%
metadata-eval1.9%
Simplified1.9%
Taylor expanded in x around -inf 99.2%
sub-neg99.2%
+-commutative99.2%
mul-1-neg99.2%
unsub-neg99.2%
*-commutative99.2%
fma-def99.2%
associate-*r/99.2%
metadata-eval99.2%
mul-1-neg99.2%
unsub-neg99.2%
unpow299.2%
metadata-eval99.2%
Simplified99.2%
Final simplification99.0%
(FPCore (x y z)
:precision binary64
(if (<= x -2.2e+50)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 7.6e+17)
(/
(*
(- x 2.0)
(+
(*
x
(+
(* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
z))
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
(+
(+
(fma x 4.16438922228 (/ 3655.1204654076414 x))
(/ (- y 130977.50649958357) (* x x)))
-110.1139242984811))))
double code(double x, double y, double z) {
double tmp;
if (x <= -2.2e+50) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 7.6e+17) {
tmp = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
} else {
tmp = (fma(x, 4.16438922228, (3655.1204654076414 / x)) + ((y - 130977.50649958357) / (x * x))) + -110.1139242984811;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= -2.2e+50) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 7.6e+17) tmp = Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)); else tmp = Float64(Float64(fma(x, 4.16438922228, Float64(3655.1204654076414 / x)) + Float64(Float64(y - 130977.50649958357) / Float64(x * x))) + -110.1139242984811); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, -2.2e+50], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 7.6e+17], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 4.16438922228 + N[(3655.1204654076414 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(y - 130977.50649958357), $MachinePrecision] / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -110.1139242984811), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.2 \cdot 10^{+50}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 7.6 \cdot 10^{+17}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\\
\mathbf{else}:\\
\;\;\;\;\left(\mathsf{fma}\left(x, 4.16438922228, \frac{3655.1204654076414}{x}\right) + \frac{y - 130977.50649958357}{x \cdot x}\right) + -110.1139242984811\\
\end{array}
\end{array}
if x < -2.20000000000000017e50Initial program 4.0%
associate-/l*10.9%
sub-neg10.9%
metadata-eval10.9%
fma-def10.9%
fma-def10.9%
fma-def10.9%
fma-def10.9%
fma-def10.9%
fma-def10.9%
fma-def10.9%
Simplified10.9%
Taylor expanded in x around inf 98.0%
if -2.20000000000000017e50 < x < 7.6e17Initial program 99.6%
if 7.6e17 < x Initial program 10.8%
*-commutative10.8%
associate-*l/15.1%
*-commutative15.1%
sub-neg15.1%
metadata-eval15.1%
Simplified15.1%
Taylor expanded in x around -inf 99.2%
sub-neg99.2%
+-commutative99.2%
mul-1-neg99.2%
unsub-neg99.2%
*-commutative99.2%
fma-def99.2%
associate-*r/99.2%
metadata-eval99.2%
mul-1-neg99.2%
unsub-neg99.2%
unpow299.2%
metadata-eval99.2%
Simplified99.2%
Final simplification99.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(/
(*
(- x 2.0)
(+
(*
x
(+
(*
x
(+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
z))
(+
(*
x
(+
(* x (+ (* x (+ x 43.3400022514)) 263.505074721))
313.399215894))
47.066876606))))
(if (<= t_0 5e+306) t_0 (/ (+ x -2.0) 0.24013125253755718))))
double code(double x, double y, double z) {
double t_0 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
double tmp;
if (t_0 <= 5e+306) {
tmp = t_0;
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = ((x - 2.0d0) * ((x * ((x * ((x * ((x * 4.16438922228d0) + 78.6994924154d0)) + 137.519416416d0)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0)
if (t_0 <= 5d+306) then
tmp = t_0
else
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
double tmp;
if (t_0 <= 5e+306) {
tmp = t_0;
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
def code(x, y, z): t_0 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) tmp = 0 if t_0 <= 5e+306: tmp = t_0 else: tmp = (x + -2.0) / 0.24013125253755718 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) tmp = 0.0 if (t_0 <= 5e+306) tmp = t_0; else tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606); tmp = 0.0; if (t_0 <= 5e+306) tmp = t_0; else tmp = (x + -2.0) / 0.24013125253755718; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 5e+306], t$95$0, N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\\
\mathbf{if}\;t_0 \leq 5 \cdot 10^{+306}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < 4.99999999999999993e306Initial program 95.7%
if 4.99999999999999993e306 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) Initial program 0.1%
associate-/l*1.9%
sub-neg1.9%
metadata-eval1.9%
fma-def1.9%
fma-def1.9%
fma-def1.9%
fma-def1.9%
fma-def1.9%
fma-def1.9%
fma-def1.9%
Simplified1.9%
Taylor expanded in x around inf 98.7%
Final simplification96.9%
(FPCore (x y z)
:precision binary64
(if (<= x -1.35e+15)
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x)))
(if (<= x 1.35e+31)
(/
(* (- x 2.0) (+ z (* x (+ y (* x 137.519416416)))))
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
(/ (+ x -2.0) 0.24013125253755718))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.35e+15) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else if (x <= 1.35e+31) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1.35d+15)) then
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
else if (x <= 1.35d+31) then
tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0)
else
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1.35e+15) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else if (x <= 1.35e+31) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.35e+15: tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) elif x <= 1.35e+31: tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) else: tmp = (x + -2.0) / 0.24013125253755718 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.35e+15) tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); elseif (x <= 1.35e+31) tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * 137.519416416))))) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)); else tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.35e+15) tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); elseif (x <= 1.35e+31) tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606); else tmp = (x + -2.0) / 0.24013125253755718; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.35e+15], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.35e+31], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * 137.519416416), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.35 \cdot 10^{+15}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\mathbf{elif}\;x \leq 1.35 \cdot 10^{+31}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\end{array}
\end{array}
if x < -1.35e15Initial program 12.0%
associate-/l*18.4%
sub-neg18.4%
metadata-eval18.4%
fma-def18.4%
fma-def18.4%
fma-def18.4%
fma-def18.4%
fma-def18.4%
fma-def18.4%
fma-def18.4%
Simplified18.4%
Taylor expanded in x around inf 94.9%
associate-*r/94.9%
metadata-eval94.9%
Simplified94.9%
if -1.35e15 < x < 1.34999999999999993e31Initial program 99.6%
Taylor expanded in x around 0 98.2%
*-commutative98.2%
Simplified98.2%
if 1.34999999999999993e31 < x Initial program 6.6%
associate-/l*11.1%
sub-neg11.1%
metadata-eval11.1%
fma-def11.1%
fma-def11.1%
fma-def11.1%
fma-def11.1%
fma-def11.1%
fma-def11.1%
fma-def11.1%
Simplified11.1%
Taylor expanded in x around inf 93.4%
Final simplification96.2%
(FPCore (x y z)
:precision binary64
(if (or (<= x -1020000.0) (not (<= x 320.0)))
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x)))
(/
(* (- x 2.0) (+ z (* x (+ y (* x 137.519416416)))))
(+ 47.066876606 (* x (+ 313.399215894 (* x 263.505074721)))))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1020000.0) || !(x <= 320.0)) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-1020000.0d0)) .or. (.not. (x <= 320.0d0))) then
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
else
tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / (47.066876606d0 + (x * (313.399215894d0 + (x * 263.505074721d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -1020000.0) || !(x <= 320.0)) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1020000.0) or not (x <= 320.0): tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) else: tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -1020000.0) || !(x <= 320.0)) tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); else tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * 137.519416416))))) / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * 263.505074721))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -1020000.0) || ~((x <= 320.0))) tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); else tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -1020000.0], N[Not[LessEqual[x, 320.0]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * 137.519416416), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * 263.505074721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1020000 \lor \neg \left(x \leq 320\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot 263.505074721\right)}\\
\end{array}
\end{array}
if x < -1.02e6 or 320 < x Initial program 12.1%
associate-/l*17.3%
sub-neg17.3%
metadata-eval17.3%
fma-def17.3%
fma-def17.3%
fma-def17.3%
fma-def17.3%
fma-def17.3%
fma-def17.3%
fma-def17.3%
Simplified17.3%
Taylor expanded in x around inf 92.7%
associate-*r/92.7%
metadata-eval92.7%
Simplified92.7%
if -1.02e6 < x < 320Initial program 99.6%
Taylor expanded in x around 0 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in x around 0 97.7%
*-commutative97.7%
Simplified97.7%
Final simplification95.2%
(FPCore (x y z)
:precision binary64
(if (<= x -36.0)
(/
(+ x -2.0)
(+
0.24013125253755718
(- (/ 5.86923874282773 x) (/ 55.572073733743466 (* x x)))))
(if (<= x 130.0)
(/
(* (- x 2.0) (+ z (* x (+ y (* x 137.519416416)))))
(+ 47.066876606 (* x 313.399215894)))
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -36.0) {
tmp = (x + -2.0) / (0.24013125253755718 + ((5.86923874282773 / x) - (55.572073733743466 / (x * x))));
} else if (x <= 130.0) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894));
} else {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-36.0d0)) then
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + ((5.86923874282773d0 / x) - (55.572073733743466d0 / (x * x))))
else if (x <= 130.0d0) then
tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / (47.066876606d0 + (x * 313.399215894d0))
else
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -36.0) {
tmp = (x + -2.0) / (0.24013125253755718 + ((5.86923874282773 / x) - (55.572073733743466 / (x * x))));
} else if (x <= 130.0) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894));
} else {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -36.0: tmp = (x + -2.0) / (0.24013125253755718 + ((5.86923874282773 / x) - (55.572073733743466 / (x * x)))) elif x <= 130.0: tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894)) else: tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -36.0) tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(Float64(5.86923874282773 / x) - Float64(55.572073733743466 / Float64(x * x))))); elseif (x <= 130.0) tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * 137.519416416))))) / Float64(47.066876606 + Float64(x * 313.399215894))); else tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -36.0) tmp = (x + -2.0) / (0.24013125253755718 + ((5.86923874282773 / x) - (55.572073733743466 / (x * x)))); elseif (x <= 130.0) tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894)); else tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -36.0], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(N[(5.86923874282773 / x), $MachinePrecision] - N[(55.572073733743466 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 130.0], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * 137.519416416), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(47.066876606 + N[(x * 313.399215894), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -36:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \left(\frac{5.86923874282773}{x} - \frac{55.572073733743466}{x \cdot x}\right)}\\
\mathbf{elif}\;x \leq 130:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{47.066876606 + x \cdot 313.399215894}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\end{array}
\end{array}
if x < -36Initial program 14.9%
associate-/l*21.0%
sub-neg21.0%
metadata-eval21.0%
fma-def21.0%
fma-def21.0%
fma-def21.0%
fma-def21.0%
fma-def21.0%
fma-def21.0%
fma-def21.0%
Simplified21.0%
Taylor expanded in x around inf 92.0%
associate--l+92.0%
associate-*r/92.0%
metadata-eval92.0%
associate-*r/92.0%
metadata-eval92.0%
unpow292.0%
Simplified92.0%
if -36 < x < 130Initial program 99.6%
Taylor expanded in x around 0 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in x around 0 99.0%
*-commutative99.0%
Simplified99.0%
Taylor expanded in x around 0 98.7%
*-commutative98.7%
Simplified98.7%
if 130 < x Initial program 12.1%
associate-/l*16.3%
sub-neg16.3%
metadata-eval16.3%
fma-def16.3%
fma-def16.3%
fma-def16.3%
fma-def16.3%
fma-def16.3%
fma-def16.3%
fma-def16.3%
Simplified16.3%
Taylor expanded in x around inf 90.9%
associate-*r/90.9%
metadata-eval90.9%
Simplified90.9%
Final simplification95.1%
(FPCore (x y z)
:precision binary64
(if (or (<= x -1020000.0) (not (<= x 1.65)))
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x)))
(*
(+ x -2.0)
(+
(* z 0.0212463641547976)
(* x (- (* y 0.0212463641547976) (* z 0.14147091005106402)))))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1020000.0) || !(x <= 1.65)) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-1020000.0d0)) .or. (.not. (x <= 1.65d0))) then
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
else
tmp = (x + (-2.0d0)) * ((z * 0.0212463641547976d0) + (x * ((y * 0.0212463641547976d0) - (z * 0.14147091005106402d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -1020000.0) || !(x <= 1.65)) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1020000.0) or not (x <= 1.65): tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) else: tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402)))) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -1020000.0) || !(x <= 1.65)) tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); else tmp = Float64(Float64(x + -2.0) * Float64(Float64(z * 0.0212463641547976) + Float64(x * Float64(Float64(y * 0.0212463641547976) - Float64(z * 0.14147091005106402))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -1020000.0) || ~((x <= 1.65))) tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); else tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -1020000.0], N[Not[LessEqual[x, 1.65]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(z * 0.0212463641547976), $MachinePrecision] + N[(x * N[(N[(y * 0.0212463641547976), $MachinePrecision] - N[(z * 0.14147091005106402), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1020000 \lor \neg \left(x \leq 1.65\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976 + x \cdot \left(y \cdot 0.0212463641547976 - z \cdot 0.14147091005106402\right)\right)\\
\end{array}
\end{array}
if x < -1.02e6 or 1.6499999999999999 < x Initial program 12.1%
associate-/l*17.3%
sub-neg17.3%
metadata-eval17.3%
fma-def17.3%
fma-def17.3%
fma-def17.3%
fma-def17.3%
fma-def17.3%
fma-def17.3%
fma-def17.3%
Simplified17.3%
Taylor expanded in x around inf 92.7%
associate-*r/92.7%
metadata-eval92.7%
Simplified92.7%
if -1.02e6 < x < 1.6499999999999999Initial program 99.6%
*-commutative99.6%
associate-*l/99.6%
*-commutative99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 91.6%
Final simplification92.1%
(FPCore (x y z)
:precision binary64
(if (or (<= x -1020000.0) (not (<= x 1.8)))
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x)))
(+
(* x (+ (* y -0.0424927283095952) (* z 0.3041881842569256)))
(* z -0.0424927283095952))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1020000.0) || !(x <= 1.8)) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else {
tmp = (x * ((y * -0.0424927283095952) + (z * 0.3041881842569256))) + (z * -0.0424927283095952);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-1020000.0d0)) .or. (.not. (x <= 1.8d0))) then
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
else
tmp = (x * ((y * (-0.0424927283095952d0)) + (z * 0.3041881842569256d0))) + (z * (-0.0424927283095952d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -1020000.0) || !(x <= 1.8)) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else {
tmp = (x * ((y * -0.0424927283095952) + (z * 0.3041881842569256))) + (z * -0.0424927283095952);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1020000.0) or not (x <= 1.8): tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) else: tmp = (x * ((y * -0.0424927283095952) + (z * 0.3041881842569256))) + (z * -0.0424927283095952) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -1020000.0) || !(x <= 1.8)) tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); else tmp = Float64(Float64(x * Float64(Float64(y * -0.0424927283095952) + Float64(z * 0.3041881842569256))) + Float64(z * -0.0424927283095952)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -1020000.0) || ~((x <= 1.8))) tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); else tmp = (x * ((y * -0.0424927283095952) + (z * 0.3041881842569256))) + (z * -0.0424927283095952); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -1020000.0], N[Not[LessEqual[x, 1.8]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[(y * -0.0424927283095952), $MachinePrecision] + N[(z * 0.3041881842569256), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z * -0.0424927283095952), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1020000 \lor \neg \left(x \leq 1.8\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot -0.0424927283095952 + z \cdot 0.3041881842569256\right) + z \cdot -0.0424927283095952\\
\end{array}
\end{array}
if x < -1.02e6 or 1.80000000000000004 < x Initial program 12.1%
associate-/l*17.3%
sub-neg17.3%
metadata-eval17.3%
fma-def17.3%
fma-def17.3%
fma-def17.3%
fma-def17.3%
fma-def17.3%
fma-def17.3%
fma-def17.3%
Simplified17.3%
Taylor expanded in x around inf 92.7%
associate-*r/92.7%
metadata-eval92.7%
Simplified92.7%
if -1.02e6 < x < 1.80000000000000004Initial program 99.6%
*-commutative99.6%
associate-*l/99.6%
*-commutative99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 91.6%
pow191.6%
cancel-sign-sub-inv91.6%
*-commutative91.6%
metadata-eval91.6%
Applied egg-rr91.6%
unpow191.6%
distribute-rgt-in91.6%
+-commutative91.6%
*-commutative91.6%
associate-+l+91.6%
associate-*l*91.6%
metadata-eval91.6%
distribute-rgt-out91.6%
metadata-eval91.6%
Simplified91.6%
Final simplification92.1%
(FPCore (x y z) :precision binary64 (if (or (<= x -1020000.0) (not (<= x 2.0))) (/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x))) (* -0.0424927283095952 (+ z (* x y)))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1020000.0) || !(x <= 2.0)) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else {
tmp = -0.0424927283095952 * (z + (x * y));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-1020000.0d0)) .or. (.not. (x <= 2.0d0))) then
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
else
tmp = (-0.0424927283095952d0) * (z + (x * y))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -1020000.0) || !(x <= 2.0)) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else {
tmp = -0.0424927283095952 * (z + (x * y));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1020000.0) or not (x <= 2.0): tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) else: tmp = -0.0424927283095952 * (z + (x * y)) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -1020000.0) || !(x <= 2.0)) tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); else tmp = Float64(-0.0424927283095952 * Float64(z + Float64(x * y))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -1020000.0) || ~((x <= 2.0))) tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); else tmp = -0.0424927283095952 * (z + (x * y)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -1020000.0], N[Not[LessEqual[x, 2.0]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-0.0424927283095952 * N[(z + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1020000 \lor \neg \left(x \leq 2\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\mathbf{else}:\\
\;\;\;\;-0.0424927283095952 \cdot \left(z + x \cdot y\right)\\
\end{array}
\end{array}
if x < -1.02e6 or 2 < x Initial program 12.1%
associate-/l*17.3%
sub-neg17.3%
metadata-eval17.3%
fma-def17.3%
fma-def17.3%
fma-def17.3%
fma-def17.3%
fma-def17.3%
fma-def17.3%
fma-def17.3%
Simplified17.3%
Taylor expanded in x around inf 92.7%
associate-*r/92.7%
metadata-eval92.7%
Simplified92.7%
if -1.02e6 < x < 2Initial program 99.6%
*-commutative99.6%
associate-*l/99.6%
*-commutative99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 91.6%
Taylor expanded in z around 0 91.3%
*-commutative91.3%
associate-*l*91.3%
Simplified91.3%
Taylor expanded in z around 0 91.3%
distribute-lft-out91.3%
Simplified91.3%
Final simplification92.0%
(FPCore (x y z) :precision binary64 (if (or (<= x -2200000.0) (not (<= x 2.0))) (/ (+ x -2.0) 0.24013125253755718) (* -0.0424927283095952 (+ z (* x y)))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -2200000.0) || !(x <= 2.0)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = -0.0424927283095952 * (z + (x * y));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-2200000.0d0)) .or. (.not. (x <= 2.0d0))) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else
tmp = (-0.0424927283095952d0) * (z + (x * y))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -2200000.0) || !(x <= 2.0)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = -0.0424927283095952 * (z + (x * y));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -2200000.0) or not (x <= 2.0): tmp = (x + -2.0) / 0.24013125253755718 else: tmp = -0.0424927283095952 * (z + (x * y)) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -2200000.0) || !(x <= 2.0)) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); else tmp = Float64(-0.0424927283095952 * Float64(z + Float64(x * y))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -2200000.0) || ~((x <= 2.0))) tmp = (x + -2.0) / 0.24013125253755718; else tmp = -0.0424927283095952 * (z + (x * y)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -2200000.0], N[Not[LessEqual[x, 2.0]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], N[(-0.0424927283095952 * N[(z + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2200000 \lor \neg \left(x \leq 2\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{else}:\\
\;\;\;\;-0.0424927283095952 \cdot \left(z + x \cdot y\right)\\
\end{array}
\end{array}
if x < -2.2e6 or 2 < x Initial program 12.1%
associate-/l*17.3%
sub-neg17.3%
metadata-eval17.3%
fma-def17.3%
fma-def17.3%
fma-def17.3%
fma-def17.3%
fma-def17.3%
fma-def17.3%
fma-def17.3%
Simplified17.3%
Taylor expanded in x around inf 92.7%
if -2.2e6 < x < 2Initial program 99.6%
*-commutative99.6%
associate-*l/99.6%
*-commutative99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 91.6%
Taylor expanded in z around 0 91.3%
*-commutative91.3%
associate-*l*91.3%
Simplified91.3%
Taylor expanded in z around 0 91.3%
distribute-lft-out91.3%
Simplified91.3%
Final simplification92.0%
(FPCore (x y z) :precision binary64 (if (or (<= x -0.145) (not (<= x 4e-8))) (- (* x 4.16438922228) 110.1139242984811) (* z -0.0424927283095952)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -0.145) || !(x <= 4e-8)) {
tmp = (x * 4.16438922228) - 110.1139242984811;
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-0.145d0)) .or. (.not. (x <= 4d-8))) then
tmp = (x * 4.16438922228d0) - 110.1139242984811d0
else
tmp = z * (-0.0424927283095952d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -0.145) || !(x <= 4e-8)) {
tmp = (x * 4.16438922228) - 110.1139242984811;
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -0.145) or not (x <= 4e-8): tmp = (x * 4.16438922228) - 110.1139242984811 else: tmp = z * -0.0424927283095952 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -0.145) || !(x <= 4e-8)) tmp = Float64(Float64(x * 4.16438922228) - 110.1139242984811); else tmp = Float64(z * -0.0424927283095952); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -0.145) || ~((x <= 4e-8))) tmp = (x * 4.16438922228) - 110.1139242984811; else tmp = z * -0.0424927283095952; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -0.145], N[Not[LessEqual[x, 4e-8]], $MachinePrecision]], N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision], N[(z * -0.0424927283095952), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.145 \lor \neg \left(x \leq 4 \cdot 10^{-8}\right):\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\
\mathbf{else}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\end{array}
\end{array}
if x < -0.14499999999999999 or 4.0000000000000001e-8 < x Initial program 15.4%
*-commutative15.4%
associate-*l/20.4%
*-commutative20.4%
sub-neg20.4%
metadata-eval20.4%
Simplified20.4%
Taylor expanded in x around inf 89.0%
if -0.14499999999999999 < x < 4.0000000000000001e-8Initial program 99.6%
*-commutative99.6%
associate-*l/99.7%
*-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 65.3%
*-commutative65.3%
Simplified65.3%
Final simplification77.4%
(FPCore (x y z) :precision binary64 (if (or (<= x -0.18) (not (<= x 4e-8))) (/ (+ x -2.0) 0.24013125253755718) (* z -0.0424927283095952)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -0.18) || !(x <= 4e-8)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-0.18d0)) .or. (.not. (x <= 4d-8))) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else
tmp = z * (-0.0424927283095952d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -0.18) || !(x <= 4e-8)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -0.18) or not (x <= 4e-8): tmp = (x + -2.0) / 0.24013125253755718 else: tmp = z * -0.0424927283095952 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -0.18) || !(x <= 4e-8)) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); else tmp = Float64(z * -0.0424927283095952); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -0.18) || ~((x <= 4e-8))) tmp = (x + -2.0) / 0.24013125253755718; else tmp = z * -0.0424927283095952; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -0.18], N[Not[LessEqual[x, 4e-8]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], N[(z * -0.0424927283095952), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.18 \lor \neg \left(x \leq 4 \cdot 10^{-8}\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{else}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\end{array}
\end{array}
if x < -0.17999999999999999 or 4.0000000000000001e-8 < x Initial program 15.4%
associate-/l*20.4%
sub-neg20.4%
metadata-eval20.4%
fma-def20.4%
fma-def20.4%
fma-def20.4%
fma-def20.4%
fma-def20.4%
fma-def20.4%
fma-def20.4%
Simplified20.4%
Taylor expanded in x around inf 89.4%
if -0.17999999999999999 < x < 4.0000000000000001e-8Initial program 99.6%
*-commutative99.6%
associate-*l/99.7%
*-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 65.3%
*-commutative65.3%
Simplified65.3%
Final simplification77.6%
(FPCore (x y z) :precision binary64 (if (<= x -0.08) (* x 4.16438922228) (if (<= x 1.6) (* z -0.0424927283095952) (* x 4.16438922228))))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.08) {
tmp = x * 4.16438922228;
} else if (x <= 1.6) {
tmp = z * -0.0424927283095952;
} else {
tmp = x * 4.16438922228;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-0.08d0)) then
tmp = x * 4.16438922228d0
else if (x <= 1.6d0) then
tmp = z * (-0.0424927283095952d0)
else
tmp = x * 4.16438922228d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -0.08) {
tmp = x * 4.16438922228;
} else if (x <= 1.6) {
tmp = z * -0.0424927283095952;
} else {
tmp = x * 4.16438922228;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -0.08: tmp = x * 4.16438922228 elif x <= 1.6: tmp = z * -0.0424927283095952 else: tmp = x * 4.16438922228 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -0.08) tmp = Float64(x * 4.16438922228); elseif (x <= 1.6) tmp = Float64(z * -0.0424927283095952); else tmp = Float64(x * 4.16438922228); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -0.08) tmp = x * 4.16438922228; elseif (x <= 1.6) tmp = z * -0.0424927283095952; else tmp = x * 4.16438922228; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -0.08], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 1.6], N[(z * -0.0424927283095952), $MachinePrecision], N[(x * 4.16438922228), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.08:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 1.6:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228\\
\end{array}
\end{array}
if x < -0.0800000000000000017 or 1.6000000000000001 < x Initial program 14.1%
associate-/l*19.2%
sub-neg19.2%
metadata-eval19.2%
fma-def19.2%
fma-def19.2%
fma-def19.2%
fma-def19.2%
fma-def19.2%
fma-def19.2%
fma-def19.2%
Simplified19.2%
Applied egg-rr19.2%
Taylor expanded in x around inf 90.2%
*-commutative90.2%
Simplified90.2%
if -0.0800000000000000017 < x < 1.6000000000000001Initial program 99.6%
*-commutative99.6%
associate-*l/99.7%
*-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 64.3%
*-commutative64.3%
Simplified64.3%
Final simplification77.4%
(FPCore (x y z) :precision binary64 (* x -0.3407596943375357))
double code(double x, double y, double z) {
return x * -0.3407596943375357;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x * (-0.3407596943375357d0)
end function
public static double code(double x, double y, double z) {
return x * -0.3407596943375357;
}
def code(x, y, z): return x * -0.3407596943375357
function code(x, y, z) return Float64(x * -0.3407596943375357) end
function tmp = code(x, y, z) tmp = x * -0.3407596943375357; end
code[x_, y_, z_] := N[(x * -0.3407596943375357), $MachinePrecision]
\begin{array}{l}
\\
x \cdot -0.3407596943375357
\end{array}
Initial program 56.5%
associate-/l*59.0%
sub-neg59.0%
metadata-eval59.0%
fma-def59.0%
fma-def59.0%
fma-def59.0%
fma-def59.0%
fma-def59.0%
fma-def59.0%
fma-def59.0%
Simplified59.0%
Taylor expanded in x around inf 47.7%
associate-*r/47.7%
metadata-eval47.7%
Simplified47.7%
Taylor expanded in x around 0 2.4%
*-commutative2.4%
Simplified2.4%
Final simplification2.4%
(FPCore (x y z) :precision binary64 (* x 0.5218852675289308))
double code(double x, double y, double z) {
return x * 0.5218852675289308;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x * 0.5218852675289308d0
end function
public static double code(double x, double y, double z) {
return x * 0.5218852675289308;
}
def code(x, y, z): return x * 0.5218852675289308
function code(x, y, z) return Float64(x * 0.5218852675289308) end
function tmp = code(x, y, z) tmp = x * 0.5218852675289308; end
code[x_, y_, z_] := N[(x * 0.5218852675289308), $MachinePrecision]
\begin{array}{l}
\\
x \cdot 0.5218852675289308
\end{array}
Initial program 56.5%
Taylor expanded in x around 0 53.0%
*-commutative53.0%
Simplified53.0%
Taylor expanded in x around 0 51.6%
*-commutative51.6%
Simplified51.6%
Taylor expanded in x around inf 9.4%
*-commutative9.4%
Simplified9.4%
Final simplification9.4%
(FPCore (x y z) :precision binary64 (* x 4.16438922228))
double code(double x, double y, double z) {
return x * 4.16438922228;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x * 4.16438922228d0
end function
public static double code(double x, double y, double z) {
return x * 4.16438922228;
}
def code(x, y, z): return x * 4.16438922228
function code(x, y, z) return Float64(x * 4.16438922228) end
function tmp = code(x, y, z) tmp = x * 4.16438922228; end
code[x_, y_, z_] := N[(x * 4.16438922228), $MachinePrecision]
\begin{array}{l}
\\
x \cdot 4.16438922228
\end{array}
Initial program 56.5%
associate-/l*59.0%
sub-neg59.0%
metadata-eval59.0%
fma-def59.0%
fma-def59.0%
fma-def59.0%
fma-def59.0%
fma-def59.0%
fma-def59.0%
fma-def59.0%
Simplified59.0%
Applied egg-rr58.9%
Taylor expanded in x around inf 47.3%
*-commutative47.3%
Simplified47.3%
Final simplification47.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- (+ (/ y (* x x)) (* 4.16438922228 x)) 110.1139242984811)))
(if (< x -3.326128725870005e+62)
t_0
(if (< x 9.429991714554673e+55)
(*
(/ (- x 2.0) 1.0)
(/
(+
(*
(+
(* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x)
y)
x)
z)
(+
(*
(+
(+ (* 263.505074721 x) (+ (* 43.3400022514 (* x x)) (* x (* x x))))
313.399215894)
x)
47.066876606)))
t_0))))
double code(double x, double y, double z) {
double t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811;
double tmp;
if (x < -3.326128725870005e+62) {
tmp = t_0;
} else if (x < 9.429991714554673e+55) {
tmp = ((x - 2.0) / 1.0) * (((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / (((((263.505074721 * x) + ((43.3400022514 * (x * x)) + (x * (x * x)))) + 313.399215894) * x) + 47.066876606));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = ((y / (x * x)) + (4.16438922228d0 * x)) - 110.1139242984811d0
if (x < (-3.326128725870005d+62)) then
tmp = t_0
else if (x < 9.429991714554673d+55) then
tmp = ((x - 2.0d0) / 1.0d0) * (((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z) / (((((263.505074721d0 * x) + ((43.3400022514d0 * (x * x)) + (x * (x * x)))) + 313.399215894d0) * x) + 47.066876606d0))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811;
double tmp;
if (x < -3.326128725870005e+62) {
tmp = t_0;
} else if (x < 9.429991714554673e+55) {
tmp = ((x - 2.0) / 1.0) * (((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / (((((263.505074721 * x) + ((43.3400022514 * (x * x)) + (x * (x * x)))) + 313.399215894) * x) + 47.066876606));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811 tmp = 0 if x < -3.326128725870005e+62: tmp = t_0 elif x < 9.429991714554673e+55: tmp = ((x - 2.0) / 1.0) * (((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / (((((263.505074721 * x) + ((43.3400022514 * (x * x)) + (x * (x * x)))) + 313.399215894) * x) + 47.066876606)) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(y / Float64(x * x)) + Float64(4.16438922228 * x)) - 110.1139242984811) tmp = 0.0 if (x < -3.326128725870005e+62) tmp = t_0; elseif (x < 9.429991714554673e+55) tmp = Float64(Float64(Float64(x - 2.0) / 1.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / Float64(Float64(Float64(Float64(Float64(263.505074721 * x) + Float64(Float64(43.3400022514 * Float64(x * x)) + Float64(x * Float64(x * x)))) + 313.399215894) * x) + 47.066876606))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811; tmp = 0.0; if (x < -3.326128725870005e+62) tmp = t_0; elseif (x < 9.429991714554673e+55) tmp = ((x - 2.0) / 1.0) * (((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / (((((263.505074721 * x) + ((43.3400022514 * (x * x)) + (x * (x * x)))) + 313.399215894) * x) + 47.066876606)); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(4.16438922228 * x), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision]}, If[Less[x, -3.326128725870005e+62], t$95$0, If[Less[x, 9.429991714554673e+55], N[(N[(N[(x - 2.0), $MachinePrecision] / 1.0), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision] * x), $MachinePrecision] + 137.519416416), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision] / N[(N[(N[(N[(N[(263.505074721 * x), $MachinePrecision] + N[(N[(43.3400022514 * N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision] * x), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\frac{y}{x \cdot x} + 4.16438922228 \cdot x\right) - 110.1139242984811\\
\mathbf{if}\;x < -3.326128725870005 \cdot 10^{+62}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x < 9.429991714554673 \cdot 10^{+55}:\\
\;\;\;\;\frac{x - 2}{1} \cdot \frac{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}{\left(\left(263.505074721 \cdot x + \left(43.3400022514 \cdot \left(x \cdot x\right) + x \cdot \left(x \cdot x\right)\right)\right) + 313.399215894\right) \cdot x + 47.066876606}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
herbie shell --seed 2023275
(FPCore (x y z)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, C"
:precision binary64
:herbie-target
(if (< x -3.326128725870005e+62) (- (+ (/ y (* x x)) (* 4.16438922228 x)) 110.1139242984811) (if (< x 9.429991714554673e+55) (* (/ (- x 2.0) 1.0) (/ (+ (* (+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y) x) z) (+ (* (+ (+ (* 263.505074721 x) (+ (* 43.3400022514 (* x x)) (* x (* x x)))) 313.399215894) x) 47.066876606))) (- (+ (/ y (* x x)) (* 4.16438922228 x)) 110.1139242984811)))
(/ (* (- x 2.0) (+ (* (+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y) x) z)) (+ (* (+ (* (+ (* (+ x 43.3400022514) x) 263.505074721) x) 313.399215894) x) 47.066876606)))