
(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 19 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 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+301)
(/
(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)
(+ x -2.0)))
(-
(+ (fma x 4.16438922228 (/ 3655.1204654076414 x)) (/ y (* x x)))
(+ 110.1139242984811 (/ 130977.50649958357 (* x x))))))
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+301) {
tmp = 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) / (x + -2.0));
} else {
tmp = (fma(x, 4.16438922228, (3655.1204654076414 / x)) + (y / (x * x))) - (110.1139242984811 + (130977.50649958357 / (x * x)));
}
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+301) tmp = Float64(fma(x, fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), z) / Float64(fma(x, fma(x, fma(x, Float64(x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606) / Float64(x + -2.0))); else tmp = Float64(Float64(fma(x, 4.16438922228, Float64(3655.1204654076414 / x)) + Float64(y / Float64(x * x))) - Float64(110.1139242984811 + Float64(130977.50649958357 / Float64(x * x)))); 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+301], N[(N[(x * N[(x * N[(x * N[(x * 4.16438922228 + 78.6994924154), $MachinePrecision] + 137.519416416), $MachinePrecision] + y), $MachinePrecision] + z), $MachinePrecision] / N[(N[(x * N[(x * N[(x * N[(x + 43.3400022514), $MachinePrecision] + 263.505074721), $MachinePrecision] + 313.399215894), $MachinePrecision] + 47.066876606), $MachinePrecision] / N[(x + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 4.16438922228 + N[(3655.1204654076414 / x), $MachinePrecision]), $MachinePrecision] + N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(110.1139242984811 + N[(130977.50649958357 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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^{+301}:\\
\;\;\;\;\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)}{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}{x + -2}}\\
\mathbf{else}:\\
\;\;\;\;\left(\mathsf{fma}\left(x, 4.16438922228, \frac{3655.1204654076414}{x}\right) + \frac{y}{x \cdot x}\right) - \left(110.1139242984811 + \frac{130977.50649958357}{x \cdot x}\right)\\
\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)) < 5.0000000000000004e301Initial program 96.6%
*-commutative96.6%
associate-/l*98.9%
*-commutative98.9%
fma-def98.9%
*-commutative98.9%
fma-def98.9%
*-commutative98.9%
fma-def98.9%
fma-def98.9%
Simplified98.9%
if 5.0000000000000004e301 < (/.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.2%
*-commutative0.2%
associate-*r/2.2%
*-commutative2.2%
fma-def2.2%
*-commutative2.2%
fma-def2.2%
*-commutative2.2%
fma-def2.2%
fma-def2.2%
Simplified2.2%
Taylor expanded in x around inf 99.1%
*-commutative99.1%
associate-+r+99.1%
fma-def99.1%
associate-*r/99.1%
metadata-eval99.1%
unpow299.1%
associate-*r/99.1%
metadata-eval99.1%
unpow299.1%
Simplified99.1%
Final simplification99.0%
(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+301)
(*
(fma
x
(fma x (fma x (fma x 4.16438922228 78.6994924154) 137.519416416) y)
z)
(/
(+ x -2.0)
(fma
x
(fma x (fma x (+ x 43.3400022514) 263.505074721) 313.399215894)
47.066876606)))
(-
(+ (fma x 4.16438922228 (/ 3655.1204654076414 x)) (/ y (* x x)))
(+ 110.1139242984811 (/ 130977.50649958357 (* x x))))))
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+301) {
tmp = fma(x, fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), z) * ((x + -2.0) / 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 / (x * x))) - (110.1139242984811 + (130977.50649958357 / (x * x)));
}
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+301) tmp = Float64(fma(x, fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), z) * Float64(Float64(x + -2.0) / 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(y / Float64(x * x))) - Float64(110.1139242984811 + Float64(130977.50649958357 / Float64(x * x)))); 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+301], N[(N[(x * N[(x * N[(x * N[(x * 4.16438922228 + 78.6994924154), $MachinePrecision] + 137.519416416), $MachinePrecision] + y), $MachinePrecision] + z), $MachinePrecision] * N[(N[(x + -2.0), $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[(y / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(110.1139242984811 + N[(130977.50649958357 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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^{+301}:\\
\;\;\;\;\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) \cdot \frac{x + -2}{\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}{x \cdot x}\right) - \left(110.1139242984811 + \frac{130977.50649958357}{x \cdot x}\right)\\
\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)) < 5.0000000000000004e301Initial program 96.6%
*-commutative96.6%
associate-*r/98.7%
*-commutative98.7%
fma-def98.7%
*-commutative98.7%
fma-def98.7%
*-commutative98.7%
fma-def98.7%
fma-def98.7%
Simplified98.7%
if 5.0000000000000004e301 < (/.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.2%
*-commutative0.2%
associate-*r/2.2%
*-commutative2.2%
fma-def2.2%
*-commutative2.2%
fma-def2.2%
*-commutative2.2%
fma-def2.2%
fma-def2.2%
Simplified2.2%
Taylor expanded in x around inf 99.1%
*-commutative99.1%
associate-+r+99.1%
fma-def99.1%
associate-*r/99.1%
metadata-eval99.1%
unpow299.1%
associate-*r/99.1%
metadata-eval99.1%
unpow299.1%
Simplified99.1%
Final simplification98.9%
(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+301)
(/
(+ x -2.0)
(/
(fma
(fma (fma (+ x 43.3400022514) x 263.505074721) x 313.399215894)
x
47.066876606)
(fma
(fma (fma (fma x 4.16438922228 78.6994924154) x 137.519416416) x y)
x
z)))
(-
(+ (fma x 4.16438922228 (/ 3655.1204654076414 x)) (/ y (* x x)))
(+ 110.1139242984811 (/ 130977.50649958357 (* x x))))))
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+301) {
tmp = (x + -2.0) / (fma(fma(fma((x + 43.3400022514), x, 263.505074721), x, 313.399215894), x, 47.066876606) / fma(fma(fma(fma(x, 4.16438922228, 78.6994924154), x, 137.519416416), x, y), x, z));
} else {
tmp = (fma(x, 4.16438922228, (3655.1204654076414 / x)) + (y / (x * x))) - (110.1139242984811 + (130977.50649958357 / (x * x)));
}
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+301) tmp = Float64(Float64(x + -2.0) / Float64(fma(fma(fma(Float64(x + 43.3400022514), x, 263.505074721), x, 313.399215894), x, 47.066876606) / fma(fma(fma(fma(x, 4.16438922228, 78.6994924154), x, 137.519416416), x, y), x, z))); else tmp = Float64(Float64(fma(x, 4.16438922228, Float64(3655.1204654076414 / x)) + Float64(y / Float64(x * x))) - Float64(110.1139242984811 + Float64(130977.50649958357 / Float64(x * x)))); 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+301], N[(N[(x + -2.0), $MachinePrecision] / N[(N[(N[(N[(N[(x + 43.3400022514), $MachinePrecision] * x + 263.505074721), $MachinePrecision] * x + 313.399215894), $MachinePrecision] * x + 47.066876606), $MachinePrecision] / N[(N[(N[(N[(x * 4.16438922228 + 78.6994924154), $MachinePrecision] * x + 137.519416416), $MachinePrecision] * x + y), $MachinePrecision] * x + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 4.16438922228 + N[(3655.1204654076414 / x), $MachinePrecision]), $MachinePrecision] + N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(110.1139242984811 + N[(130977.50649958357 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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^{+301}:\\
\;\;\;\;\frac{x + -2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), x, 47.066876606\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), x, 137.519416416\right), x, y\right), x, z\right)}}\\
\mathbf{else}:\\
\;\;\;\;\left(\mathsf{fma}\left(x, 4.16438922228, \frac{3655.1204654076414}{x}\right) + \frac{y}{x \cdot x}\right) - \left(110.1139242984811 + \frac{130977.50649958357}{x \cdot x}\right)\\
\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)) < 5.0000000000000004e301Initial program 96.6%
associate-/l*98.8%
sub-neg98.8%
metadata-eval98.8%
fma-def98.8%
fma-def98.8%
fma-def98.8%
fma-def98.9%
fma-def98.9%
fma-def98.9%
fma-def98.9%
Simplified98.9%
if 5.0000000000000004e301 < (/.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.2%
*-commutative0.2%
associate-*r/2.2%
*-commutative2.2%
fma-def2.2%
*-commutative2.2%
fma-def2.2%
*-commutative2.2%
fma-def2.2%
fma-def2.2%
Simplified2.2%
Taylor expanded in x around inf 99.1%
*-commutative99.1%
associate-+r+99.1%
fma-def99.1%
associate-*r/99.1%
metadata-eval99.1%
unpow299.1%
associate-*r/99.1%
metadata-eval99.1%
unpow299.1%
Simplified99.1%
Final simplification98.9%
(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+301)
t_0
(-
(+ (fma x 4.16438922228 (/ 3655.1204654076414 x)) (/ y (* x x)))
(+ 110.1139242984811 (/ 130977.50649958357 (* x x)))))))
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+301) {
tmp = t_0;
} else {
tmp = (fma(x, 4.16438922228, (3655.1204654076414 / x)) + (y / (x * x))) - (110.1139242984811 + (130977.50649958357 / (x * x)));
}
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+301) tmp = t_0; else tmp = Float64(Float64(fma(x, 4.16438922228, Float64(3655.1204654076414 / x)) + Float64(y / Float64(x * x))) - Float64(110.1139242984811 + Float64(130977.50649958357 / Float64(x * x)))); end return 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+301], t$95$0, N[(N[(N[(x * 4.16438922228 + N[(3655.1204654076414 / x), $MachinePrecision]), $MachinePrecision] + N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(110.1139242984811 + N[(130977.50649958357 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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^{+301}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\left(\mathsf{fma}\left(x, 4.16438922228, \frac{3655.1204654076414}{x}\right) + \frac{y}{x \cdot x}\right) - \left(110.1139242984811 + \frac{130977.50649958357}{x \cdot x}\right)\\
\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)) < 5.0000000000000004e301Initial program 96.6%
if 5.0000000000000004e301 < (/.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.2%
*-commutative0.2%
associate-*r/2.2%
*-commutative2.2%
fma-def2.2%
*-commutative2.2%
fma-def2.2%
*-commutative2.2%
fma-def2.2%
fma-def2.2%
Simplified2.2%
Taylor expanded in x around inf 99.1%
*-commutative99.1%
associate-+r+99.1%
fma-def99.1%
associate-*r/99.1%
metadata-eval99.1%
unpow299.1%
associate-*r/99.1%
metadata-eval99.1%
unpow299.1%
Simplified99.1%
Final simplification97.5%
(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+301) 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+301) {
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+301) 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+301) {
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+301: 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+301) 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+301) 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+301], 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^{+301}:\\
\;\;\;\;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)) < 5.0000000000000004e301Initial program 96.6%
if 5.0000000000000004e301 < (/.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.2%
associate-/l*2.2%
sub-neg2.2%
metadata-eval2.2%
fma-def2.2%
fma-def2.2%
fma-def2.2%
fma-def2.2%
fma-def2.2%
fma-def2.2%
fma-def2.2%
Simplified2.2%
Taylor expanded in x around inf 96.6%
Final simplification96.6%
(FPCore (x y z)
:precision binary64
(if (<= x -5.4e+19)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 4500.0)
(/
(* (- 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
(- (/ 5.86923874282773 x) (/ 55.572073733743466 (* x x))))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -5.4e+19) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 4500.0) {
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 + ((5.86923874282773 / x) - (55.572073733743466 / (x * 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 <= (-5.4d+19)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 4500.0d0) 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 + ((5.86923874282773d0 / x) - (55.572073733743466d0 / (x * x))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -5.4e+19) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 4500.0) {
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 + ((5.86923874282773 / x) - (55.572073733743466 / (x * x))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -5.4e+19: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 4500.0: 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 + ((5.86923874282773 / x) - (55.572073733743466 / (x * x)))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -5.4e+19) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 4500.0) 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) / Float64(0.24013125253755718 + Float64(Float64(5.86923874282773 / x) - Float64(55.572073733743466 / Float64(x * x))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -5.4e+19) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 4500.0) 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 + ((5.86923874282773 / x) - (55.572073733743466 / (x * x)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -5.4e+19], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 4500.0], 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] / N[(0.24013125253755718 + N[(N[(5.86923874282773 / x), $MachinePrecision] - N[(55.572073733743466 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.4 \cdot 10^{+19}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 4500:\\
\;\;\;\;\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 + \left(\frac{5.86923874282773}{x} - \frac{55.572073733743466}{x \cdot x}\right)}\\
\end{array}
\end{array}
if x < -5.4e19Initial program 2.1%
associate-/l*5.9%
sub-neg5.9%
metadata-eval5.9%
fma-def5.9%
fma-def5.9%
fma-def5.9%
fma-def5.9%
fma-def5.9%
fma-def5.9%
fma-def5.9%
Simplified5.9%
Taylor expanded in x around inf 97.5%
if -5.4e19 < x < 4500Initial program 99.6%
Taylor expanded in x around 0 98.4%
*-commutative94.3%
Simplified98.4%
if 4500 < x Initial program 11.3%
associate-/l*18.3%
sub-neg18.3%
metadata-eval18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
Simplified18.3%
Taylor expanded in x around inf 88.4%
associate--l+88.4%
associate-*r/88.4%
metadata-eval88.4%
associate-*r/88.4%
metadata-eval88.4%
unpow288.4%
Simplified88.4%
Final simplification96.1%
(FPCore (x y z)
:precision binary64
(if (<= x -3600000000000.0)
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x)))
(if (<= x 2200.0)
(/
(* (- x 2.0) (+ z (* x (+ y (* x 137.519416416)))))
(+ 47.066876606 (* x (+ 313.399215894 (* x 263.505074721)))))
(/
(+ x -2.0)
(+
0.24013125253755718
(- (/ 5.86923874282773 x) (/ 55.572073733743466 (* x x))))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -3600000000000.0) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else if (x <= 2200.0) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
} else {
tmp = (x + -2.0) / (0.24013125253755718 + ((5.86923874282773 / x) - (55.572073733743466 / (x * 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 <= (-3600000000000.0d0)) then
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
else if (x <= 2200.0d0) then
tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / (47.066876606d0 + (x * (313.399215894d0 + (x * 263.505074721d0))))
else
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + ((5.86923874282773d0 / x) - (55.572073733743466d0 / (x * x))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -3600000000000.0) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else if (x <= 2200.0) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
} else {
tmp = (x + -2.0) / (0.24013125253755718 + ((5.86923874282773 / x) - (55.572073733743466 / (x * x))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -3600000000000.0: tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) elif x <= 2200.0: tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))) else: tmp = (x + -2.0) / (0.24013125253755718 + ((5.86923874282773 / x) - (55.572073733743466 / (x * x)))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -3600000000000.0) tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); elseif (x <= 2200.0) 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))))); else tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(Float64(5.86923874282773 / x) - Float64(55.572073733743466 / Float64(x * x))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -3600000000000.0) tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); elseif (x <= 2200.0) tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))); else tmp = (x + -2.0) / (0.24013125253755718 + ((5.86923874282773 / x) - (55.572073733743466 / (x * x)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -3600000000000.0], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2200.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 * N[(313.399215894 + N[(x * 263.505074721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3600000000000:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\mathbf{elif}\;x \leq 2200:\\
\;\;\;\;\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)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \left(\frac{5.86923874282773}{x} - \frac{55.572073733743466}{x \cdot x}\right)}\\
\end{array}
\end{array}
if x < -3.6e12Initial program 7.6%
associate-/l*11.2%
sub-neg11.2%
metadata-eval11.2%
fma-def11.2%
fma-def11.2%
fma-def11.2%
fma-def11.2%
fma-def11.2%
fma-def11.2%
fma-def11.2%
Simplified11.2%
Taylor expanded in x around inf 94.0%
associate-*r/94.0%
metadata-eval94.0%
Simplified94.0%
if -3.6e12 < x < 2200Initial program 99.6%
Taylor expanded in x around 0 96.4%
*-commutative96.4%
Simplified96.4%
Taylor expanded in x around 0 95.9%
*-commutative95.9%
Simplified95.9%
if 2200 < x Initial program 11.3%
associate-/l*18.3%
sub-neg18.3%
metadata-eval18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
Simplified18.3%
Taylor expanded in x around inf 88.4%
associate--l+88.4%
associate-*r/88.4%
metadata-eval88.4%
associate-*r/88.4%
metadata-eval88.4%
unpow288.4%
Simplified88.4%
Final simplification93.9%
(FPCore (x y z)
:precision binary64
(if (<= x -3600000000000.0)
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x)))
(if (<= x 21.5)
(+
(* z -0.0424927283095952)
(*
x
(- (* 0.0212463641547976 (+ z (* y -2.0))) (* z -0.28294182010212804))))
(/
(+ x -2.0)
(+
0.24013125253755718
(- (/ 5.86923874282773 x) (/ 55.572073733743466 (* x x))))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -3600000000000.0) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else if (x <= 21.5) {
tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804)));
} else {
tmp = (x + -2.0) / (0.24013125253755718 + ((5.86923874282773 / x) - (55.572073733743466 / (x * 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 <= (-3600000000000.0d0)) then
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
else if (x <= 21.5d0) then
tmp = (z * (-0.0424927283095952d0)) + (x * ((0.0212463641547976d0 * (z + (y * (-2.0d0)))) - (z * (-0.28294182010212804d0))))
else
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + ((5.86923874282773d0 / x) - (55.572073733743466d0 / (x * x))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -3600000000000.0) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else if (x <= 21.5) {
tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804)));
} else {
tmp = (x + -2.0) / (0.24013125253755718 + ((5.86923874282773 / x) - (55.572073733743466 / (x * x))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -3600000000000.0: tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) elif x <= 21.5: tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804))) else: tmp = (x + -2.0) / (0.24013125253755718 + ((5.86923874282773 / x) - (55.572073733743466 / (x * x)))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -3600000000000.0) tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); elseif (x <= 21.5) tmp = Float64(Float64(z * -0.0424927283095952) + Float64(x * Float64(Float64(0.0212463641547976 * Float64(z + Float64(y * -2.0))) - Float64(z * -0.28294182010212804)))); else tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(Float64(5.86923874282773 / x) - Float64(55.572073733743466 / Float64(x * x))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -3600000000000.0) tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); elseif (x <= 21.5) tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804))); else tmp = (x + -2.0) / (0.24013125253755718 + ((5.86923874282773 / x) - (55.572073733743466 / (x * x)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -3600000000000.0], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 21.5], N[(N[(z * -0.0424927283095952), $MachinePrecision] + N[(x * N[(N[(0.0212463641547976 * N[(z + N[(y * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * -0.28294182010212804), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3600000000000:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\mathbf{elif}\;x \leq 21.5:\\
\;\;\;\;z \cdot -0.0424927283095952 + x \cdot \left(0.0212463641547976 \cdot \left(z + y \cdot -2\right) - z \cdot -0.28294182010212804\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \left(\frac{5.86923874282773}{x} - \frac{55.572073733743466}{x \cdot x}\right)}\\
\end{array}
\end{array}
if x < -3.6e12Initial program 7.6%
associate-/l*11.2%
sub-neg11.2%
metadata-eval11.2%
fma-def11.2%
fma-def11.2%
fma-def11.2%
fma-def11.2%
fma-def11.2%
fma-def11.2%
fma-def11.2%
Simplified11.2%
Taylor expanded in x around inf 94.0%
associate-*r/94.0%
metadata-eval94.0%
Simplified94.0%
if -3.6e12 < x < 21.5Initial program 99.6%
*-commutative99.6%
associate-*r/99.4%
*-commutative99.4%
fma-def99.4%
*-commutative99.4%
fma-def99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
Simplified99.4%
Taylor expanded in x around 0 89.6%
if 21.5 < x Initial program 11.3%
associate-/l*18.3%
sub-neg18.3%
metadata-eval18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
Simplified18.3%
Taylor expanded in x around inf 88.4%
associate--l+88.4%
associate-*r/88.4%
metadata-eval88.4%
associate-*r/88.4%
metadata-eval88.4%
unpow288.4%
Simplified88.4%
Final simplification90.3%
(FPCore (x y z)
:precision binary64
(if (or (<= x -29500000000.0) (not (<= x 18.0)))
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x)))
(/
(* (- x 2.0) z)
(+ 47.066876606 (* x (+ 313.399215894 (* x 263.505074721)))))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -29500000000.0) || !(x <= 18.0)) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else {
tmp = ((x - 2.0) * z) / (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 <= (-29500000000.0d0)) .or. (.not. (x <= 18.0d0))) then
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
else
tmp = ((x - 2.0d0) * z) / (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 <= -29500000000.0) || !(x <= 18.0)) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else {
tmp = ((x - 2.0) * z) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -29500000000.0) or not (x <= 18.0): tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) else: tmp = ((x - 2.0) * z) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -29500000000.0) || !(x <= 18.0)) tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); else tmp = Float64(Float64(Float64(x - 2.0) * z) / 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 <= -29500000000.0) || ~((x <= 18.0))) tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); else tmp = ((x - 2.0) * z) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -29500000000.0], N[Not[LessEqual[x, 18.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] * z), $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 -29500000000 \lor \neg \left(x \leq 18\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot z}{47.066876606 + x \cdot \left(313.399215894 + x \cdot 263.505074721\right)}\\
\end{array}
\end{array}
if x < -2.95e10 or 18 < x Initial program 10.3%
associate-/l*15.6%
sub-neg15.6%
metadata-eval15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
Simplified15.6%
Taylor expanded in x around inf 90.2%
associate-*r/90.2%
metadata-eval90.2%
Simplified90.2%
if -2.95e10 < x < 18Initial program 99.6%
*-commutative99.6%
associate-*r/99.4%
*-commutative99.4%
fma-def99.4%
*-commutative99.4%
fma-def99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
Simplified99.4%
Taylor expanded in z around inf 70.2%
Taylor expanded in x around 0 68.3%
*-commutative68.3%
Simplified68.3%
Final simplification77.6%
(FPCore (x y z)
:precision binary64
(if (<= x -6000000000.0)
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x)))
(if (<= x 80.0)
(/
(* (- x 2.0) z)
(+ 47.066876606 (* x (+ 313.399215894 (* x 263.505074721)))))
(/
(+ x -2.0)
(+
0.24013125253755718
(- (/ 5.86923874282773 x) (/ 55.572073733743466 (* x x))))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -6000000000.0) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else if (x <= 80.0) {
tmp = ((x - 2.0) * z) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
} else {
tmp = (x + -2.0) / (0.24013125253755718 + ((5.86923874282773 / x) - (55.572073733743466 / (x * 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 <= (-6000000000.0d0)) then
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
else if (x <= 80.0d0) then
tmp = ((x - 2.0d0) * z) / (47.066876606d0 + (x * (313.399215894d0 + (x * 263.505074721d0))))
else
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + ((5.86923874282773d0 / x) - (55.572073733743466d0 / (x * x))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -6000000000.0) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else if (x <= 80.0) {
tmp = ((x - 2.0) * z) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
} else {
tmp = (x + -2.0) / (0.24013125253755718 + ((5.86923874282773 / x) - (55.572073733743466 / (x * x))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -6000000000.0: tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) elif x <= 80.0: tmp = ((x - 2.0) * z) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))) else: tmp = (x + -2.0) / (0.24013125253755718 + ((5.86923874282773 / x) - (55.572073733743466 / (x * x)))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -6000000000.0) tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); elseif (x <= 80.0) tmp = Float64(Float64(Float64(x - 2.0) * z) / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * 263.505074721))))); else tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(Float64(5.86923874282773 / x) - Float64(55.572073733743466 / Float64(x * x))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -6000000000.0) tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); elseif (x <= 80.0) tmp = ((x - 2.0) * z) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))); else tmp = (x + -2.0) / (0.24013125253755718 + ((5.86923874282773 / x) - (55.572073733743466 / (x * x)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -6000000000.0], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 80.0], N[(N[(N[(x - 2.0), $MachinePrecision] * z), $MachinePrecision] / N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * 263.505074721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6000000000:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\mathbf{elif}\;x \leq 80:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot z}{47.066876606 + x \cdot \left(313.399215894 + x \cdot 263.505074721\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \left(\frac{5.86923874282773}{x} - \frac{55.572073733743466}{x \cdot x}\right)}\\
\end{array}
\end{array}
if x < -6e9Initial program 9.3%
associate-/l*12.8%
sub-neg12.8%
metadata-eval12.8%
fma-def12.8%
fma-def12.8%
fma-def12.8%
fma-def12.8%
fma-def12.8%
fma-def12.8%
fma-def12.8%
Simplified12.8%
Taylor expanded in x around inf 92.3%
associate-*r/92.3%
metadata-eval92.3%
Simplified92.3%
if -6e9 < x < 80Initial program 99.6%
*-commutative99.6%
associate-*r/99.4%
*-commutative99.4%
fma-def99.4%
*-commutative99.4%
fma-def99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
Simplified99.4%
Taylor expanded in z around inf 70.2%
Taylor expanded in x around 0 68.3%
*-commutative68.3%
Simplified68.3%
if 80 < x Initial program 11.3%
associate-/l*18.3%
sub-neg18.3%
metadata-eval18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
Simplified18.3%
Taylor expanded in x around inf 88.4%
associate--l+88.4%
associate-*r/88.4%
metadata-eval88.4%
associate-*r/88.4%
metadata-eval88.4%
unpow288.4%
Simplified88.4%
Final simplification77.7%
(FPCore (x y z)
:precision binary64
(if (<= x -0.00026)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 350.0)
(/ (* (- x 2.0) z) (+ 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 <= -0.00026) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 350.0) {
tmp = ((x - 2.0) * z) / (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 <= (-0.00026d0)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 350.0d0) then
tmp = ((x - 2.0d0) * z) / (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 <= -0.00026) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 350.0) {
tmp = ((x - 2.0) * z) / (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 <= -0.00026: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 350.0: tmp = ((x - 2.0) * z) / (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 <= -0.00026) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 350.0) tmp = Float64(Float64(Float64(x - 2.0) * z) / 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 <= -0.00026) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 350.0) tmp = ((x - 2.0) * z) / (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, -0.00026], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 350.0], N[(N[(N[(x - 2.0), $MachinePrecision] * z), $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 -0.00026:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 350:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot z}{47.066876606 + x \cdot 313.399215894}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\end{array}
\end{array}
if x < -2.59999999999999977e-4Initial program 15.4%
associate-/l*18.7%
sub-neg18.7%
metadata-eval18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
Simplified18.7%
Taylor expanded in x around inf 86.2%
if -2.59999999999999977e-4 < x < 350Initial program 99.6%
*-commutative99.6%
associate-*r/99.4%
*-commutative99.4%
fma-def99.4%
*-commutative99.4%
fma-def99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
Simplified99.4%
Taylor expanded in z around inf 70.7%
Taylor expanded in x around 0 69.7%
*-commutative69.7%
Simplified69.7%
if 350 < x Initial program 11.3%
associate-/l*18.3%
sub-neg18.3%
metadata-eval18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
Simplified18.3%
Taylor expanded in x around inf 88.2%
associate-*r/88.2%
metadata-eval88.2%
Simplified88.2%
Final simplification77.4%
(FPCore (x y z) :precision binary64 (if (or (<= x -6000000000.0) (not (<= x 1300.0))) (/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x))) (/ (+ x -2.0) (/ 47.066876606 z))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -6000000000.0) || !(x <= 1300.0)) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else {
tmp = (x + -2.0) / (47.066876606 / z);
}
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 <= (-6000000000.0d0)) .or. (.not. (x <= 1300.0d0))) then
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
else
tmp = (x + (-2.0d0)) / (47.066876606d0 / z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -6000000000.0) || !(x <= 1300.0)) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else {
tmp = (x + -2.0) / (47.066876606 / z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -6000000000.0) or not (x <= 1300.0): tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) else: tmp = (x + -2.0) / (47.066876606 / z) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -6000000000.0) || !(x <= 1300.0)) tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); else tmp = Float64(Float64(x + -2.0) / Float64(47.066876606 / z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -6000000000.0) || ~((x <= 1300.0))) tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); else tmp = (x + -2.0) / (47.066876606 / z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -6000000000.0], N[Not[LessEqual[x, 1300.0]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / N[(47.066876606 / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6000000000 \lor \neg \left(x \leq 1300\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{\frac{47.066876606}{z}}\\
\end{array}
\end{array}
if x < -6e9 or 1300 < x Initial program 10.3%
associate-/l*15.6%
sub-neg15.6%
metadata-eval15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
Simplified15.6%
Taylor expanded in x around inf 90.2%
associate-*r/90.2%
metadata-eval90.2%
Simplified90.2%
if -6e9 < x < 1300Initial program 99.6%
associate-/l*99.5%
sub-neg99.5%
metadata-eval99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
Simplified99.5%
Taylor expanded in x around 0 67.0%
Final simplification76.9%
(FPCore (x y z)
:precision binary64
(if (<= x -0.00026)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 85.0)
(/ (+ x -2.0) (/ 47.066876606 z))
(- (+ (* x 4.16438922228) (/ 3655.1204654076414 x)) 110.1139242984811))))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.00026) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 85.0) {
tmp = (x + -2.0) / (47.066876606 / z);
} else {
tmp = ((x * 4.16438922228) + (3655.1204654076414 / x)) - 110.1139242984811;
}
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.00026d0)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 85.0d0) then
tmp = (x + (-2.0d0)) / (47.066876606d0 / z)
else
tmp = ((x * 4.16438922228d0) + (3655.1204654076414d0 / x)) - 110.1139242984811d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -0.00026) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 85.0) {
tmp = (x + -2.0) / (47.066876606 / z);
} else {
tmp = ((x * 4.16438922228) + (3655.1204654076414 / x)) - 110.1139242984811;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -0.00026: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 85.0: tmp = (x + -2.0) / (47.066876606 / z) else: tmp = ((x * 4.16438922228) + (3655.1204654076414 / x)) - 110.1139242984811 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -0.00026) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 85.0) tmp = Float64(Float64(x + -2.0) / Float64(47.066876606 / z)); else tmp = Float64(Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 / x)) - 110.1139242984811); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -0.00026) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 85.0) tmp = (x + -2.0) / (47.066876606 / z); else tmp = ((x * 4.16438922228) + (3655.1204654076414 / x)) - 110.1139242984811; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -0.00026], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 85.0], N[(N[(x + -2.0), $MachinePrecision] / N[(47.066876606 / z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 / x), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.00026:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 85:\\
\;\;\;\;\frac{x + -2}{\frac{47.066876606}{z}}\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 4.16438922228 + \frac{3655.1204654076414}{x}\right) - 110.1139242984811\\
\end{array}
\end{array}
if x < -2.59999999999999977e-4Initial program 15.4%
associate-/l*18.7%
sub-neg18.7%
metadata-eval18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
Simplified18.7%
Taylor expanded in x around inf 86.2%
if -2.59999999999999977e-4 < x < 85Initial program 99.6%
associate-/l*99.5%
sub-neg99.5%
metadata-eval99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
Simplified99.5%
Taylor expanded in x around 0 68.7%
if 85 < x Initial program 11.3%
*-commutative11.3%
associate-*r/18.2%
*-commutative18.2%
fma-def18.2%
*-commutative18.2%
fma-def18.2%
*-commutative18.2%
fma-def18.2%
fma-def18.2%
Simplified18.2%
Taylor expanded in x around inf 87.8%
Taylor expanded in x around 0 87.8%
Final simplification76.8%
(FPCore (x y z)
:precision binary64
(if (<= x -0.00026)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 34.0)
(/ (+ x -2.0) (/ 47.066876606 z))
(- (* x 4.16438922228) 110.1139242984811))))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.00026) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 34.0) {
tmp = (x + -2.0) / (47.066876606 / z);
} else {
tmp = (x * 4.16438922228) - 110.1139242984811;
}
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.00026d0)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 34.0d0) then
tmp = (x + (-2.0d0)) / (47.066876606d0 / z)
else
tmp = (x * 4.16438922228d0) - 110.1139242984811d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -0.00026) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 34.0) {
tmp = (x + -2.0) / (47.066876606 / z);
} else {
tmp = (x * 4.16438922228) - 110.1139242984811;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -0.00026: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 34.0: tmp = (x + -2.0) / (47.066876606 / z) else: tmp = (x * 4.16438922228) - 110.1139242984811 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -0.00026) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 34.0) tmp = Float64(Float64(x + -2.0) / Float64(47.066876606 / z)); else tmp = Float64(Float64(x * 4.16438922228) - 110.1139242984811); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -0.00026) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 34.0) tmp = (x + -2.0) / (47.066876606 / z); else tmp = (x * 4.16438922228) - 110.1139242984811; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -0.00026], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 34.0], N[(N[(x + -2.0), $MachinePrecision] / N[(47.066876606 / z), $MachinePrecision]), $MachinePrecision], N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.00026:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 34:\\
\;\;\;\;\frac{x + -2}{\frac{47.066876606}{z}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\
\end{array}
\end{array}
if x < -2.59999999999999977e-4Initial program 15.4%
associate-/l*18.7%
sub-neg18.7%
metadata-eval18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
Simplified18.7%
Taylor expanded in x around inf 86.2%
if -2.59999999999999977e-4 < x < 34Initial program 99.6%
associate-/l*99.5%
sub-neg99.5%
metadata-eval99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
Simplified99.5%
Taylor expanded in x around 0 68.7%
if 34 < x Initial program 11.3%
*-commutative11.3%
associate-*r/18.2%
*-commutative18.2%
fma-def18.2%
*-commutative18.2%
fma-def18.2%
*-commutative18.2%
fma-def18.2%
fma-def18.2%
Simplified18.2%
Taylor expanded in x around inf 87.6%
Final simplification76.7%
(FPCore (x y z) :precision binary64 (if (or (<= x -0.00026) (not (<= x 7.0))) (- (* x 4.16438922228) 110.1139242984811) (* z -0.0424927283095952)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -0.00026) || !(x <= 7.0)) {
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.00026d0)) .or. (.not. (x <= 7.0d0))) 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.00026) || !(x <= 7.0)) {
tmp = (x * 4.16438922228) - 110.1139242984811;
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -0.00026) or not (x <= 7.0): tmp = (x * 4.16438922228) - 110.1139242984811 else: tmp = z * -0.0424927283095952 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -0.00026) || !(x <= 7.0)) 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.00026) || ~((x <= 7.0))) 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.00026], N[Not[LessEqual[x, 7.0]], $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.00026 \lor \neg \left(x \leq 7\right):\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\
\mathbf{else}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\end{array}
\end{array}
if x < -2.59999999999999977e-4 or 7 < x Initial program 13.4%
*-commutative13.4%
associate-*r/18.4%
*-commutative18.4%
fma-def18.5%
*-commutative18.5%
fma-def18.5%
*-commutative18.5%
fma-def18.5%
fma-def18.5%
Simplified18.5%
Taylor expanded in x around inf 86.7%
if -2.59999999999999977e-4 < x < 7Initial program 99.6%
*-commutative99.6%
associate-*r/99.4%
*-commutative99.4%
fma-def99.4%
*-commutative99.4%
fma-def99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
Simplified99.4%
Taylor expanded in x around 0 68.6%
Final simplification76.6%
(FPCore (x y z)
:precision binary64
(if (<= x -0.00026)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 7.0)
(* z -0.0424927283095952)
(- (* x 4.16438922228) 110.1139242984811))))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.00026) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 7.0) {
tmp = z * -0.0424927283095952;
} else {
tmp = (x * 4.16438922228) - 110.1139242984811;
}
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.00026d0)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 7.0d0) then
tmp = z * (-0.0424927283095952d0)
else
tmp = (x * 4.16438922228d0) - 110.1139242984811d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -0.00026) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 7.0) {
tmp = z * -0.0424927283095952;
} else {
tmp = (x * 4.16438922228) - 110.1139242984811;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -0.00026: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 7.0: tmp = z * -0.0424927283095952 else: tmp = (x * 4.16438922228) - 110.1139242984811 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -0.00026) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 7.0) tmp = Float64(z * -0.0424927283095952); else tmp = Float64(Float64(x * 4.16438922228) - 110.1139242984811); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -0.00026) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 7.0) tmp = z * -0.0424927283095952; else tmp = (x * 4.16438922228) - 110.1139242984811; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -0.00026], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 7.0], N[(z * -0.0424927283095952), $MachinePrecision], N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.00026:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 7:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\
\end{array}
\end{array}
if x < -2.59999999999999977e-4Initial program 15.4%
associate-/l*18.7%
sub-neg18.7%
metadata-eval18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
Simplified18.7%
Taylor expanded in x around inf 86.2%
if -2.59999999999999977e-4 < x < 7Initial program 99.6%
*-commutative99.6%
associate-*r/99.4%
*-commutative99.4%
fma-def99.4%
*-commutative99.4%
fma-def99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
Simplified99.4%
Taylor expanded in x around 0 68.6%
if 7 < x Initial program 11.3%
*-commutative11.3%
associate-*r/18.2%
*-commutative18.2%
fma-def18.2%
*-commutative18.2%
fma-def18.2%
*-commutative18.2%
fma-def18.2%
fma-def18.2%
Simplified18.2%
Taylor expanded in x around inf 87.6%
Final simplification76.7%
(FPCore (x y z) :precision binary64 (if (<= x -0.00026) (* x 4.16438922228) (if (<= x 2.0) (* z -0.0424927283095952) (* x 4.16438922228))))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.00026) {
tmp = x * 4.16438922228;
} else if (x <= 2.0) {
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.00026d0)) then
tmp = x * 4.16438922228d0
else if (x <= 2.0d0) 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.00026) {
tmp = x * 4.16438922228;
} else if (x <= 2.0) {
tmp = z * -0.0424927283095952;
} else {
tmp = x * 4.16438922228;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -0.00026: tmp = x * 4.16438922228 elif x <= 2.0: tmp = z * -0.0424927283095952 else: tmp = x * 4.16438922228 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -0.00026) tmp = Float64(x * 4.16438922228); elseif (x <= 2.0) 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.00026) tmp = x * 4.16438922228; elseif (x <= 2.0) tmp = z * -0.0424927283095952; else tmp = x * 4.16438922228; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -0.00026], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 2.0], N[(z * -0.0424927283095952), $MachinePrecision], N[(x * 4.16438922228), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.00026:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 2:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228\\
\end{array}
\end{array}
if x < -2.59999999999999977e-4 or 2 < x Initial program 13.4%
*-commutative13.4%
associate-*r/18.4%
*-commutative18.4%
fma-def18.5%
*-commutative18.5%
fma-def18.5%
*-commutative18.5%
fma-def18.5%
fma-def18.5%
Simplified18.5%
Taylor expanded in x around inf 86.1%
*-commutative86.1%
Simplified86.1%
if -2.59999999999999977e-4 < x < 2Initial program 99.6%
*-commutative99.6%
associate-*r/99.4%
*-commutative99.4%
fma-def99.4%
*-commutative99.4%
fma-def99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
Simplified99.4%
Taylor expanded in x around 0 68.6%
Final simplification76.3%
(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 61.6%
associate-/l*63.7%
sub-neg63.7%
metadata-eval63.7%
fma-def63.7%
fma-def63.7%
fma-def63.7%
fma-def63.7%
fma-def63.7%
fma-def63.8%
fma-def63.8%
Simplified63.8%
Taylor expanded in x around inf 40.3%
associate-*r/40.3%
metadata-eval40.3%
Simplified40.3%
Taylor expanded in x around 0 2.2%
Final simplification2.2%
(FPCore (x y z) :precision binary64 (* z -0.0424927283095952))
double code(double x, double y, double z) {
return z * -0.0424927283095952;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = z * (-0.0424927283095952d0)
end function
public static double code(double x, double y, double z) {
return z * -0.0424927283095952;
}
def code(x, y, z): return z * -0.0424927283095952
function code(x, y, z) return Float64(z * -0.0424927283095952) end
function tmp = code(x, y, z) tmp = z * -0.0424927283095952; end
code[x_, y_, z_] := N[(z * -0.0424927283095952), $MachinePrecision]
\begin{array}{l}
\\
z \cdot -0.0424927283095952
\end{array}
Initial program 61.6%
*-commutative61.6%
associate-*r/63.7%
*-commutative63.7%
fma-def63.7%
*-commutative63.7%
fma-def63.7%
*-commutative63.7%
fma-def63.7%
fma-def63.7%
Simplified63.7%
Taylor expanded in x around 0 39.6%
Final simplification39.6%
(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 2023297
(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)))