
(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 16 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 (or (<= x -1.2e+25) (not (<= x 6.5e+22)))
(-
(+ (* x 4.16438922228) (+ (/ 4752.4581585918595 x) (/ y (* x x))))
(+ 110.1139242984811 (/ 207551.7024428275 (* x x))))
(/
(*
(- 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 code(double x, double y, double z) {
double tmp;
if ((x <= -1.2e+25) || !(x <= 6.5e+22)) {
tmp = ((x * 4.16438922228) + ((4752.4581585918595 / x) + (y / (x * x)))) - (110.1139242984811 + (207551.7024428275 / (x * x)));
} else {
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);
}
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.2d+25)) .or. (.not. (x <= 6.5d+22))) then
tmp = ((x * 4.16438922228d0) + ((4752.4581585918595d0 / x) + (y / (x * x)))) - (110.1139242984811d0 + (207551.7024428275d0 / (x * x)))
else
tmp = ((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)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -1.2e+25) || !(x <= 6.5e+22)) {
tmp = ((x * 4.16438922228) + ((4752.4581585918595 / x) + (y / (x * x)))) - (110.1139242984811 + (207551.7024428275 / (x * x)));
} else {
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);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1.2e+25) or not (x <= 6.5e+22): tmp = ((x * 4.16438922228) + ((4752.4581585918595 / x) + (y / (x * x)))) - (110.1139242984811 + (207551.7024428275 / (x * x))) else: 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) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -1.2e+25) || !(x <= 6.5e+22)) tmp = Float64(Float64(Float64(x * 4.16438922228) + Float64(Float64(4752.4581585918595 / x) + Float64(y / Float64(x * x)))) - Float64(110.1139242984811 + Float64(207551.7024428275 / Float64(x * x)))); else 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)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -1.2e+25) || ~((x <= 6.5e+22))) tmp = ((x * 4.16438922228) + ((4752.4581585918595 / x) + (y / (x * x)))) - (110.1139242984811 + (207551.7024428275 / (x * x))); else 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); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -1.2e+25], N[Not[LessEqual[x, 6.5e+22]], $MachinePrecision]], N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(N[(4752.4581585918595 / x), $MachinePrecision] + N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(110.1139242984811 + N[(207551.7024428275 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.2 \cdot 10^{+25} \lor \neg \left(x \leq 6.5 \cdot 10^{+22}\right):\\
\;\;\;\;\left(x \cdot 4.16438922228 + \left(\frac{4752.4581585918595}{x} + \frac{y}{x \cdot x}\right)\right) - \left(110.1139242984811 + \frac{207551.7024428275}{x \cdot x}\right)\\
\mathbf{else}:\\
\;\;\;\;\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}\\
\end{array}
\end{array}
if x < -1.19999999999999998e25 or 6.49999999999999979e22 < x Initial program 12.7%
Taylor expanded in x around inf 12.7%
cube-mult12.7%
unpow212.7%
distribute-rgt-out12.7%
unpow212.7%
+-commutative12.7%
Simplified12.7%
Taylor expanded in x around inf 99.1%
associate-+r+99.1%
associate-*r/99.1%
metadata-eval99.1%
unpow299.1%
*-commutative99.1%
associate-*r/99.1%
metadata-eval99.1%
unpow299.1%
Simplified99.1%
if -1.19999999999999998e25 < x < 6.49999999999999979e22Initial program 99.6%
Final simplification99.4%
(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))
2e+293)
(*
(+ x -2.0)
(/
(fma
x
(fma
x
(fma
x
(/
(+ (* (* x x) 17.342137594641823) -6193.6101064416025)
(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 4.16438922228) (+ (/ 4752.4581585918595 x) (/ y (* x x))))
(+ 110.1139242984811 (/ 207551.7024428275 (* 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)) <= 2e+293) {
tmp = (x + -2.0) * (fma(x, fma(x, fma(x, ((((x * x) * 17.342137594641823) + -6193.6101064416025) / 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 = ((x * 4.16438922228) + ((4752.4581585918595 / x) + (y / (x * x)))) - (110.1139242984811 + (207551.7024428275 / (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)) <= 2e+293) tmp = Float64(Float64(x + -2.0) * Float64(fma(x, fma(x, fma(x, Float64(Float64(Float64(Float64(x * x) * 17.342137594641823) + -6193.6101064416025) / 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(Float64(x * 4.16438922228) + Float64(Float64(4752.4581585918595 / x) + Float64(y / Float64(x * x)))) - Float64(110.1139242984811 + Float64(207551.7024428275 / 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], 2e+293], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(x * N[(x * N[(x * N[(N[(N[(N[(x * x), $MachinePrecision] * 17.342137594641823), $MachinePrecision] + -6193.6101064416025), $MachinePrecision] / N[(x * 4.16438922228 + -78.6994924154), $MachinePrecision]), $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), $MachinePrecision] + N[(N[(4752.4581585918595 / x), $MachinePrecision] + N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(110.1139242984811 + N[(207551.7024428275 / 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 2 \cdot 10^{+293}:\\
\;\;\;\;\left(x + -2\right) \cdot \frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \frac{\left(x \cdot x\right) \cdot 17.342137594641823 + -6193.6101064416025}{\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(x \cdot 4.16438922228 + \left(\frac{4752.4581585918595}{x} + \frac{y}{x \cdot x}\right)\right) - \left(110.1139242984811 + \frac{207551.7024428275}{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)) < 1.9999999999999998e293Initial program 96.2%
associate-*r/99.5%
sub-neg99.5%
metadata-eval99.5%
*-commutative99.5%
fma-def99.5%
*-commutative99.5%
fma-def99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
*-commutative99.5%
Simplified99.5%
fma-def99.5%
flip-+99.5%
metadata-eval99.5%
Applied egg-rr99.5%
sub-neg99.5%
swap-sqr99.5%
metadata-eval99.5%
metadata-eval99.5%
fma-neg99.5%
metadata-eval99.5%
Simplified99.5%
if 1.9999999999999998e293 < (/.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%
Taylor expanded in x around inf 0.2%
cube-mult0.2%
unpow20.2%
distribute-rgt-out0.2%
unpow20.2%
+-commutative0.2%
Simplified0.2%
Taylor expanded in x around inf 99.1%
associate-+r+99.1%
associate-*r/99.1%
metadata-eval99.1%
unpow299.1%
*-commutative99.1%
associate-*r/99.1%
metadata-eval99.1%
unpow299.1%
Simplified99.1%
Final simplification99.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606)))
(if (<=
(/
(*
(- x 2.0)
(+
(*
x
(+
(*
x
(+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
z))
t_0)
2e+293)
(*
(+ x -2.0)
(+
(/
(*
x
(+
y
(+
(* x 137.519416416)
(+ (* 4.16438922228 (pow x 3.0)) (* 78.6994924154 (pow x 2.0))))))
t_0)
(/ z t_0)))
(-
(+ (* x 4.16438922228) (+ (/ 4752.4581585918595 x) (/ y (* x x))))
(+ 110.1139242984811 (/ 207551.7024428275 (* x x)))))))
double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double tmp;
if ((((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0) <= 2e+293) {
tmp = (x + -2.0) * (((x * (y + ((x * 137.519416416) + ((4.16438922228 * pow(x, 3.0)) + (78.6994924154 * pow(x, 2.0)))))) / t_0) + (z / t_0));
} else {
tmp = ((x * 4.16438922228) + ((4752.4581585918595 / x) + (y / (x * x)))) - (110.1139242984811 + (207551.7024428275 / (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) :: t_0
real(8) :: tmp
t_0 = (x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0
if ((((x - 2.0d0) * ((x * ((x * ((x * ((x * 4.16438922228d0) + 78.6994924154d0)) + 137.519416416d0)) + y)) + z)) / t_0) <= 2d+293) then
tmp = (x + (-2.0d0)) * (((x * (y + ((x * 137.519416416d0) + ((4.16438922228d0 * (x ** 3.0d0)) + (78.6994924154d0 * (x ** 2.0d0)))))) / t_0) + (z / t_0))
else
tmp = ((x * 4.16438922228d0) + ((4752.4581585918595d0 / x) + (y / (x * x)))) - (110.1139242984811d0 + (207551.7024428275d0 / (x * x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double tmp;
if ((((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0) <= 2e+293) {
tmp = (x + -2.0) * (((x * (y + ((x * 137.519416416) + ((4.16438922228 * Math.pow(x, 3.0)) + (78.6994924154 * Math.pow(x, 2.0)))))) / t_0) + (z / t_0));
} else {
tmp = ((x * 4.16438922228) + ((4752.4581585918595 / x) + (y / (x * x)))) - (110.1139242984811 + (207551.7024428275 / (x * x)));
}
return tmp;
}
def code(x, y, z): t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606 tmp = 0 if (((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0) <= 2e+293: tmp = (x + -2.0) * (((x * (y + ((x * 137.519416416) + ((4.16438922228 * math.pow(x, 3.0)) + (78.6994924154 * math.pow(x, 2.0)))))) / t_0) + (z / t_0)) else: tmp = ((x * 4.16438922228) + ((4752.4581585918595 / x) + (y / (x * x)))) - (110.1139242984811 + (207551.7024428275 / (x * x))) return tmp
function code(x, y, z) t_0 = Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) 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)) / t_0) <= 2e+293) tmp = Float64(Float64(x + -2.0) * Float64(Float64(Float64(x * Float64(y + Float64(Float64(x * 137.519416416) + Float64(Float64(4.16438922228 * (x ^ 3.0)) + Float64(78.6994924154 * (x ^ 2.0)))))) / t_0) + Float64(z / t_0))); else tmp = Float64(Float64(Float64(x * 4.16438922228) + Float64(Float64(4752.4581585918595 / x) + Float64(y / Float64(x * x)))) - Float64(110.1139242984811 + Float64(207551.7024428275 / Float64(x * x)))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606; tmp = 0.0; if ((((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0) <= 2e+293) tmp = (x + -2.0) * (((x * (y + ((x * 137.519416416) + ((4.16438922228 * (x ^ 3.0)) + (78.6994924154 * (x ^ 2.0)))))) / t_0) + (z / t_0)); else tmp = ((x * 4.16438922228) + ((4752.4581585918595 / x) + (y / (x * x)))) - (110.1139242984811 + (207551.7024428275 / (x * x))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = 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]}, 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] / t$95$0), $MachinePrecision], 2e+293], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(N[(x * N[(y + N[(N[(x * 137.519416416), $MachinePrecision] + N[(N[(4.16438922228 * N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(78.6994924154 * N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision] + N[(z / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(N[(4752.4581585918595 / x), $MachinePrecision] + N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(110.1139242984811 + N[(207551.7024428275 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606\\
\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)}{t_0} \leq 2 \cdot 10^{+293}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(\frac{x \cdot \left(y + \left(x \cdot 137.519416416 + \left(4.16438922228 \cdot {x}^{3} + 78.6994924154 \cdot {x}^{2}\right)\right)\right)}{t_0} + \frac{z}{t_0}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 4.16438922228 + \left(\frac{4752.4581585918595}{x} + \frac{y}{x \cdot x}\right)\right) - \left(110.1139242984811 + \frac{207551.7024428275}{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)) < 1.9999999999999998e293Initial program 96.2%
associate-*r/99.5%
sub-neg99.5%
metadata-eval99.5%
*-commutative99.5%
fma-def99.5%
*-commutative99.5%
fma-def99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in z around 0 99.5%
Taylor expanded in x around 0 99.5%
if 1.9999999999999998e293 < (/.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%
Taylor expanded in x around inf 0.2%
cube-mult0.2%
unpow20.2%
distribute-rgt-out0.2%
unpow20.2%
+-commutative0.2%
Simplified0.2%
Taylor expanded in x around inf 99.1%
associate-+r+99.1%
associate-*r/99.1%
metadata-eval99.1%
unpow299.1%
*-commutative99.1%
associate-*r/99.1%
metadata-eval99.1%
unpow299.1%
Simplified99.1%
Final simplification99.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
(t_1
(*
x
(+
(* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))))
(if (<= (/ (* (- x 2.0) (+ t_1 z)) t_0) 2e+293)
(* (+ x -2.0) (+ (/ z t_0) (/ t_1 t_0)))
(-
(+ (* x 4.16438922228) (+ (/ 4752.4581585918595 x) (/ y (* x x))))
(+ 110.1139242984811 (/ 207551.7024428275 (* x x)))))))
double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double t_1 = x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y);
double tmp;
if ((((x - 2.0) * (t_1 + z)) / t_0) <= 2e+293) {
tmp = (x + -2.0) * ((z / t_0) + (t_1 / t_0));
} else {
tmp = ((x * 4.16438922228) + ((4752.4581585918595 / x) + (y / (x * x)))) - (110.1139242984811 + (207551.7024428275 / (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) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0
t_1 = x * ((x * ((x * ((x * 4.16438922228d0) + 78.6994924154d0)) + 137.519416416d0)) + y)
if ((((x - 2.0d0) * (t_1 + z)) / t_0) <= 2d+293) then
tmp = (x + (-2.0d0)) * ((z / t_0) + (t_1 / t_0))
else
tmp = ((x * 4.16438922228d0) + ((4752.4581585918595d0 / x) + (y / (x * x)))) - (110.1139242984811d0 + (207551.7024428275d0 / (x * x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double t_1 = x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y);
double tmp;
if ((((x - 2.0) * (t_1 + z)) / t_0) <= 2e+293) {
tmp = (x + -2.0) * ((z / t_0) + (t_1 / t_0));
} else {
tmp = ((x * 4.16438922228) + ((4752.4581585918595 / x) + (y / (x * x)))) - (110.1139242984811 + (207551.7024428275 / (x * x)));
}
return tmp;
}
def code(x, y, z): t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606 t_1 = x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y) tmp = 0 if (((x - 2.0) * (t_1 + z)) / t_0) <= 2e+293: tmp = (x + -2.0) * ((z / t_0) + (t_1 / t_0)) else: tmp = ((x * 4.16438922228) + ((4752.4581585918595 / x) + (y / (x * x)))) - (110.1139242984811 + (207551.7024428275 / (x * x))) return tmp
function code(x, y, z) t_0 = Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) t_1 = Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) tmp = 0.0 if (Float64(Float64(Float64(x - 2.0) * Float64(t_1 + z)) / t_0) <= 2e+293) tmp = Float64(Float64(x + -2.0) * Float64(Float64(z / t_0) + Float64(t_1 / t_0))); else tmp = Float64(Float64(Float64(x * 4.16438922228) + Float64(Float64(4752.4581585918595 / x) + Float64(y / Float64(x * x)))) - Float64(110.1139242984811 + Float64(207551.7024428275 / Float64(x * x)))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606; t_1 = x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y); tmp = 0.0; if ((((x - 2.0) * (t_1 + z)) / t_0) <= 2e+293) tmp = (x + -2.0) * ((z / t_0) + (t_1 / t_0)); else tmp = ((x * 4.16438922228) + ((4752.4581585918595 / x) + (y / (x * x)))) - (110.1139242984811 + (207551.7024428275 / (x * x))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = 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]}, Block[{t$95$1 = 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]}, If[LessEqual[N[(N[(N[(x - 2.0), $MachinePrecision] * N[(t$95$1 + z), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], 2e+293], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(z / t$95$0), $MachinePrecision] + N[(t$95$1 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(N[(4752.4581585918595 / x), $MachinePrecision] + N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(110.1139242984811 + N[(207551.7024428275 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606\\
t_1 := x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right)\\
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(t_1 + z\right)}{t_0} \leq 2 \cdot 10^{+293}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(\frac{z}{t_0} + \frac{t_1}{t_0}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 4.16438922228 + \left(\frac{4752.4581585918595}{x} + \frac{y}{x \cdot x}\right)\right) - \left(110.1139242984811 + \frac{207551.7024428275}{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)) < 1.9999999999999998e293Initial program 96.2%
associate-*r/99.5%
sub-neg99.5%
metadata-eval99.5%
*-commutative99.5%
fma-def99.5%
*-commutative99.5%
fma-def99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in z around 0 99.5%
if 1.9999999999999998e293 < (/.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%
Taylor expanded in x around inf 0.2%
cube-mult0.2%
unpow20.2%
distribute-rgt-out0.2%
unpow20.2%
+-commutative0.2%
Simplified0.2%
Taylor expanded in x around inf 99.1%
associate-+r+99.1%
associate-*r/99.1%
metadata-eval99.1%
unpow299.1%
*-commutative99.1%
associate-*r/99.1%
metadata-eval99.1%
unpow299.1%
Simplified99.1%
Final simplification99.3%
(FPCore (x y z)
:precision binary64
(if (or (<= x -1.5e+25) (not (<= x 6.5e+22)))
(-
(+ (* x 4.16438922228) (+ (/ 4752.4581585918595 x) (/ y (* x x))))
(+ 110.1139242984811 (/ 207551.7024428275 (* x x))))
(/
(*
(- x 2.0)
(+
(*
x
(+
(* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
z))
(+ 47.066876606 (* x (+ 313.399215894 (* (+ x 43.3400022514) (* x x))))))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1.5e+25) || !(x <= 6.5e+22)) {
tmp = ((x * 4.16438922228) + ((4752.4581585918595 / x) + (y / (x * x)))) - (110.1139242984811 + (207551.7024428275 / (x * x)));
} else {
tmp = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / (47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (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 <= (-1.5d+25)) .or. (.not. (x <= 6.5d+22))) then
tmp = ((x * 4.16438922228d0) + ((4752.4581585918595d0 / x) + (y / (x * x)))) - (110.1139242984811d0 + (207551.7024428275d0 / (x * x)))
else
tmp = ((x - 2.0d0) * ((x * ((x * ((x * ((x * 4.16438922228d0) + 78.6994924154d0)) + 137.519416416d0)) + y)) + z)) / (47.066876606d0 + (x * (313.399215894d0 + ((x + 43.3400022514d0) * (x * x)))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -1.5e+25) || !(x <= 6.5e+22)) {
tmp = ((x * 4.16438922228) + ((4752.4581585918595 / x) + (y / (x * x)))) - (110.1139242984811 + (207551.7024428275 / (x * x)));
} else {
tmp = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / (47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (x * x)))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1.5e+25) or not (x <= 6.5e+22): tmp = ((x * 4.16438922228) + ((4752.4581585918595 / x) + (y / (x * x)))) - (110.1139242984811 + (207551.7024428275 / (x * x))) else: tmp = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / (47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (x * x))))) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -1.5e+25) || !(x <= 6.5e+22)) tmp = Float64(Float64(Float64(x * 4.16438922228) + Float64(Float64(4752.4581585918595 / x) + Float64(y / Float64(x * x)))) - Float64(110.1139242984811 + Float64(207551.7024428275 / Float64(x * x)))); else 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(x + 43.3400022514) * Float64(x * x)))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -1.5e+25) || ~((x <= 6.5e+22))) tmp = ((x * 4.16438922228) + ((4752.4581585918595 / x) + (y / (x * x)))) - (110.1139242984811 + (207551.7024428275 / (x * x))); else tmp = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / (47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (x * x))))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -1.5e+25], N[Not[LessEqual[x, 6.5e+22]], $MachinePrecision]], N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(N[(4752.4581585918595 / x), $MachinePrecision] + N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(110.1139242984811 + N[(207551.7024428275 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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[(x + 43.3400022514), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.5 \cdot 10^{+25} \lor \neg \left(x \leq 6.5 \cdot 10^{+22}\right):\\
\;\;\;\;\left(x \cdot 4.16438922228 + \left(\frac{4752.4581585918595}{x} + \frac{y}{x \cdot x}\right)\right) - \left(110.1139242984811 + \frac{207551.7024428275}{x \cdot x}\right)\\
\mathbf{else}:\\
\;\;\;\;\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(x + 43.3400022514\right) \cdot \left(x \cdot x\right)\right)}\\
\end{array}
\end{array}
if x < -1.50000000000000003e25 or 6.49999999999999979e22 < x Initial program 12.7%
Taylor expanded in x around inf 12.7%
cube-mult12.7%
unpow212.7%
distribute-rgt-out12.7%
unpow212.7%
+-commutative12.7%
Simplified12.7%
Taylor expanded in x around inf 99.1%
associate-+r+99.1%
associate-*r/99.1%
metadata-eval99.1%
unpow299.1%
*-commutative99.1%
associate-*r/99.1%
metadata-eval99.1%
unpow299.1%
Simplified99.1%
if -1.50000000000000003e25 < x < 6.49999999999999979e22Initial program 99.6%
Taylor expanded in x around inf 98.1%
cube-mult98.1%
unpow298.1%
distribute-rgt-out98.1%
unpow298.1%
+-commutative98.1%
Simplified98.1%
Final simplification98.5%
(FPCore (x y z)
:precision binary64
(if (or (<= x -9e+22) (not (<= x 2.4e+19)))
(-
(+ (* x 4.16438922228) (+ (/ 4752.4581585918595 x) (/ y (* x x))))
(+ 110.1139242984811 (/ 207551.7024428275 (* x x))))
(/
(* (- x 2.0) (+ z (* x (+ y (* x 137.519416416)))))
(+
(* x (+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -9e+22) || !(x <= 2.4e+19)) {
tmp = ((x * 4.16438922228) + ((4752.4581585918595 / x) + (y / (x * x)))) - (110.1139242984811 + (207551.7024428275 / (x * x)));
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
}
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 <= (-9d+22)) .or. (.not. (x <= 2.4d+19))) then
tmp = ((x * 4.16438922228d0) + ((4752.4581585918595d0 / x) + (y / (x * x)))) - (110.1139242984811d0 + (207551.7024428275d0 / (x * x)))
else
tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -9e+22) || !(x <= 2.4e+19)) {
tmp = ((x * 4.16438922228) + ((4752.4581585918595 / x) + (y / (x * x)))) - (110.1139242984811 + (207551.7024428275 / (x * x)));
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -9e+22) or not (x <= 2.4e+19): tmp = ((x * 4.16438922228) + ((4752.4581585918595 / x) + (y / (x * x)))) - (110.1139242984811 + (207551.7024428275 / (x * x))) else: tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -9e+22) || !(x <= 2.4e+19)) tmp = Float64(Float64(Float64(x * 4.16438922228) + Float64(Float64(4752.4581585918595 / x) + Float64(y / Float64(x * x)))) - Float64(110.1139242984811 + Float64(207551.7024428275 / Float64(x * x)))); else 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)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -9e+22) || ~((x <= 2.4e+19))) tmp = ((x * 4.16438922228) + ((4752.4581585918595 / x) + (y / (x * x)))) - (110.1139242984811 + (207551.7024428275 / (x * x))); else tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -9e+22], N[Not[LessEqual[x, 2.4e+19]], $MachinePrecision]], N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(N[(4752.4581585918595 / x), $MachinePrecision] + N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(110.1139242984811 + N[(207551.7024428275 / N[(x * x), $MachinePrecision]), $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[(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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9 \cdot 10^{+22} \lor \neg \left(x \leq 2.4 \cdot 10^{+19}\right):\\
\;\;\;\;\left(x \cdot 4.16438922228 + \left(\frac{4752.4581585918595}{x} + \frac{y}{x \cdot x}\right)\right) - \left(110.1139242984811 + \frac{207551.7024428275}{x \cdot x}\right)\\
\mathbf{else}:\\
\;\;\;\;\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}\\
\end{array}
\end{array}
if x < -8.9999999999999996e22 or 2.4e19 < x Initial program 12.7%
Taylor expanded in x around inf 12.7%
cube-mult12.7%
unpow212.7%
distribute-rgt-out12.7%
unpow212.7%
+-commutative12.7%
Simplified12.7%
Taylor expanded in x around inf 99.1%
associate-+r+99.1%
associate-*r/99.1%
metadata-eval99.1%
unpow299.1%
*-commutative99.1%
associate-*r/99.1%
metadata-eval99.1%
unpow299.1%
Simplified99.1%
if -8.9999999999999996e22 < x < 2.4e19Initial program 99.6%
Taylor expanded in x around 0 97.3%
*-commutative91.4%
Simplified97.3%
Final simplification98.0%
(FPCore (x y z)
:precision binary64
(if (or (<= x -9e+22) (not (<= x 4.05e+21)))
(-
(+ (* x 4.16438922228) (+ (/ 4752.4581585918595 x) (/ y (* x x))))
(+ 110.1139242984811 (/ 207551.7024428275 (* x x))))
(/
(* (- x 2.0) (+ z (* x (+ y (* x 137.519416416)))))
(+ 47.066876606 (* x (+ 313.399215894 (* (+ x 43.3400022514) (* x x))))))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -9e+22) || !(x <= 4.05e+21)) {
tmp = ((x * 4.16438922228) + ((4752.4581585918595 / x) + (y / (x * x)))) - (110.1139242984811 + (207551.7024428275 / (x * x)));
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (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 <= (-9d+22)) .or. (.not. (x <= 4.05d+21))) then
tmp = ((x * 4.16438922228d0) + ((4752.4581585918595d0 / x) + (y / (x * x)))) - (110.1139242984811d0 + (207551.7024428275d0 / (x * x)))
else
tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / (47.066876606d0 + (x * (313.399215894d0 + ((x + 43.3400022514d0) * (x * x)))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -9e+22) || !(x <= 4.05e+21)) {
tmp = ((x * 4.16438922228) + ((4752.4581585918595 / x) + (y / (x * x)))) - (110.1139242984811 + (207551.7024428275 / (x * x)));
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (x * x)))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -9e+22) or not (x <= 4.05e+21): tmp = ((x * 4.16438922228) + ((4752.4581585918595 / x) + (y / (x * x)))) - (110.1139242984811 + (207551.7024428275 / (x * x))) else: tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (x * x))))) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -9e+22) || !(x <= 4.05e+21)) tmp = Float64(Float64(Float64(x * 4.16438922228) + Float64(Float64(4752.4581585918595 / x) + Float64(y / Float64(x * x)))) - Float64(110.1139242984811 + Float64(207551.7024428275 / Float64(x * 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(Float64(x + 43.3400022514) * Float64(x * x)))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -9e+22) || ~((x <= 4.05e+21))) tmp = ((x * 4.16438922228) + ((4752.4581585918595 / x) + (y / (x * x)))) - (110.1139242984811 + (207551.7024428275 / (x * x))); else tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (x * x))))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -9e+22], N[Not[LessEqual[x, 4.05e+21]], $MachinePrecision]], N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(N[(4752.4581585918595 / x), $MachinePrecision] + N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(110.1139242984811 + N[(207551.7024428275 / N[(x * x), $MachinePrecision]), $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[(N[(x + 43.3400022514), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9 \cdot 10^{+22} \lor \neg \left(x \leq 4.05 \cdot 10^{+21}\right):\\
\;\;\;\;\left(x \cdot 4.16438922228 + \left(\frac{4752.4581585918595}{x} + \frac{y}{x \cdot x}\right)\right) - \left(110.1139242984811 + \frac{207551.7024428275}{x \cdot x}\right)\\
\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 + \left(x + 43.3400022514\right) \cdot \left(x \cdot x\right)\right)}\\
\end{array}
\end{array}
if x < -8.9999999999999996e22 or 4.05e21 < x Initial program 12.7%
Taylor expanded in x around inf 12.7%
cube-mult12.7%
unpow212.7%
distribute-rgt-out12.7%
unpow212.7%
+-commutative12.7%
Simplified12.7%
Taylor expanded in x around inf 99.1%
associate-+r+99.1%
associate-*r/99.1%
metadata-eval99.1%
unpow299.1%
*-commutative99.1%
associate-*r/99.1%
metadata-eval99.1%
unpow299.1%
Simplified99.1%
if -8.9999999999999996e22 < x < 4.05e21Initial program 99.6%
Taylor expanded in x around inf 98.1%
cube-mult98.1%
unpow298.1%
distribute-rgt-out98.1%
unpow298.1%
+-commutative98.1%
Simplified98.1%
Taylor expanded in x around 0 96.0%
*-commutative91.4%
Simplified96.0%
Final simplification97.3%
(FPCore (x y z)
:precision binary64
(if (or (<= x -16.5) (not (<= x 51.0)))
(-
(+ (* x 4.16438922228) (+ (/ 4752.4581585918595 x) (/ y (* x x))))
(+ 110.1139242984811 (/ 207551.7024428275 (* x 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 <= -16.5) || !(x <= 51.0)) {
tmp = ((x * 4.16438922228) + ((4752.4581585918595 / x) + (y / (x * x)))) - (110.1139242984811 + (207551.7024428275 / (x * 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 <= (-16.5d0)) .or. (.not. (x <= 51.0d0))) then
tmp = ((x * 4.16438922228d0) + ((4752.4581585918595d0 / x) + (y / (x * x)))) - (110.1139242984811d0 + (207551.7024428275d0 / (x * 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 <= -16.5) || !(x <= 51.0)) {
tmp = ((x * 4.16438922228) + ((4752.4581585918595 / x) + (y / (x * x)))) - (110.1139242984811 + (207551.7024428275 / (x * 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 <= -16.5) or not (x <= 51.0): tmp = ((x * 4.16438922228) + ((4752.4581585918595 / x) + (y / (x * x)))) - (110.1139242984811 + (207551.7024428275 / (x * 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 <= -16.5) || !(x <= 51.0)) tmp = Float64(Float64(Float64(x * 4.16438922228) + Float64(Float64(4752.4581585918595 / x) + Float64(y / Float64(x * x)))) - Float64(110.1139242984811 + Float64(207551.7024428275 / Float64(x * 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 <= -16.5) || ~((x <= 51.0))) tmp = ((x * 4.16438922228) + ((4752.4581585918595 / x) + (y / (x * x)))) - (110.1139242984811 + (207551.7024428275 / (x * 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, -16.5], N[Not[LessEqual[x, 51.0]], $MachinePrecision]], N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(N[(4752.4581585918595 / x), $MachinePrecision] + N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(110.1139242984811 + N[(207551.7024428275 / N[(x * x), $MachinePrecision]), $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 -16.5 \lor \neg \left(x \leq 51\right):\\
\;\;\;\;\left(x \cdot 4.16438922228 + \left(\frac{4752.4581585918595}{x} + \frac{y}{x \cdot x}\right)\right) - \left(110.1139242984811 + \frac{207551.7024428275}{x \cdot x}\right)\\
\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 < -16.5 or 51 < x Initial program 21.7%
Taylor expanded in x around inf 21.4%
cube-mult21.4%
unpow221.4%
distribute-rgt-out21.4%
unpow221.4%
+-commutative21.4%
Simplified21.4%
Taylor expanded in x around inf 93.9%
associate-+r+93.9%
associate-*r/93.9%
metadata-eval93.9%
unpow293.9%
*-commutative93.9%
associate-*r/93.9%
metadata-eval93.9%
unpow293.9%
Simplified93.9%
if -16.5 < x < 51Initial program 99.6%
Taylor expanded in x around 0 98.7%
*-commutative98.7%
Simplified98.7%
Taylor expanded in x around 0 98.3%
*-commutative98.3%
Simplified98.3%
Final simplification96.3%
(FPCore (x y z)
:precision binary64
(if (or (<= x -0.165) (not (<= x 31.5)))
(-
(+ (* x 4.16438922228) (+ (/ 4752.4581585918595 x) (/ y (* x x))))
(+ 110.1139242984811 (/ 207551.7024428275 (* x x))))
(* (+ x -2.0) (+ (* z 0.0212463641547976) (* y (* x 0.0212463641547976))))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -0.165) || !(x <= 31.5)) {
tmp = ((x * 4.16438922228) + ((4752.4581585918595 / x) + (y / (x * x)))) - (110.1139242984811 + (207551.7024428275 / (x * x)));
} else {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + (y * (x * 0.0212463641547976)));
}
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.165d0)) .or. (.not. (x <= 31.5d0))) then
tmp = ((x * 4.16438922228d0) + ((4752.4581585918595d0 / x) + (y / (x * x)))) - (110.1139242984811d0 + (207551.7024428275d0 / (x * x)))
else
tmp = (x + (-2.0d0)) * ((z * 0.0212463641547976d0) + (y * (x * 0.0212463641547976d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -0.165) || !(x <= 31.5)) {
tmp = ((x * 4.16438922228) + ((4752.4581585918595 / x) + (y / (x * x)))) - (110.1139242984811 + (207551.7024428275 / (x * x)));
} else {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + (y * (x * 0.0212463641547976)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -0.165) or not (x <= 31.5): tmp = ((x * 4.16438922228) + ((4752.4581585918595 / x) + (y / (x * x)))) - (110.1139242984811 + (207551.7024428275 / (x * x))) else: tmp = (x + -2.0) * ((z * 0.0212463641547976) + (y * (x * 0.0212463641547976))) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -0.165) || !(x <= 31.5)) tmp = Float64(Float64(Float64(x * 4.16438922228) + Float64(Float64(4752.4581585918595 / x) + Float64(y / Float64(x * x)))) - Float64(110.1139242984811 + Float64(207551.7024428275 / Float64(x * x)))); else tmp = Float64(Float64(x + -2.0) * Float64(Float64(z * 0.0212463641547976) + Float64(y * Float64(x * 0.0212463641547976)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -0.165) || ~((x <= 31.5))) tmp = ((x * 4.16438922228) + ((4752.4581585918595 / x) + (y / (x * x)))) - (110.1139242984811 + (207551.7024428275 / (x * x))); else tmp = (x + -2.0) * ((z * 0.0212463641547976) + (y * (x * 0.0212463641547976))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -0.165], N[Not[LessEqual[x, 31.5]], $MachinePrecision]], N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(N[(4752.4581585918595 / x), $MachinePrecision] + N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(110.1139242984811 + N[(207551.7024428275 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(z * 0.0212463641547976), $MachinePrecision] + N[(y * N[(x * 0.0212463641547976), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.165 \lor \neg \left(x \leq 31.5\right):\\
\;\;\;\;\left(x \cdot 4.16438922228 + \left(\frac{4752.4581585918595}{x} + \frac{y}{x \cdot x}\right)\right) - \left(110.1139242984811 + \frac{207551.7024428275}{x \cdot x}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976 + y \cdot \left(x \cdot 0.0212463641547976\right)\right)\\
\end{array}
\end{array}
if x < -0.165000000000000008 or 31.5 < x Initial program 22.3%
Taylor expanded in x around inf 21.3%
cube-mult21.4%
unpow221.4%
distribute-rgt-out21.4%
unpow221.4%
+-commutative21.4%
Simplified21.4%
Taylor expanded in x around inf 93.1%
associate-+r+93.1%
associate-*r/93.1%
metadata-eval93.1%
unpow293.1%
*-commutative93.1%
associate-*r/93.1%
metadata-eval93.1%
unpow293.1%
Simplified93.1%
if -0.165000000000000008 < x < 31.5Initial program 99.6%
associate-*r/99.6%
sub-neg99.6%
metadata-eval99.6%
*-commutative99.6%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 94.9%
Taylor expanded in y around inf 95.0%
associate-*r*94.9%
*-commutative94.9%
associate-*l*95.0%
Simplified95.0%
Final simplification94.1%
(FPCore (x y z)
:precision binary64
(if (<= x -340000000.0)
(- (* x 4.16438922228) 110.1139242984811)
(if (<= x 1950.0)
(* (+ x -2.0) (+ (* z 0.0212463641547976) (* y (* x 0.0212463641547976))))
(-
(+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x)))
110.1139242984811))))
double code(double x, double y, double z) {
double tmp;
if (x <= -340000000.0) {
tmp = (x * 4.16438922228) - 110.1139242984811;
} else if (x <= 1950.0) {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + (y * (x * 0.0212463641547976)));
} else {
tmp = ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / 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 <= (-340000000.0d0)) then
tmp = (x * 4.16438922228d0) - 110.1139242984811d0
else if (x <= 1950.0d0) then
tmp = (x + (-2.0d0)) * ((z * 0.0212463641547976d0) + (y * (x * 0.0212463641547976d0)))
else
tmp = ((x * 4.16438922228d0) + (3655.1204654076414d0 * (1.0d0 / x))) - 110.1139242984811d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -340000000.0) {
tmp = (x * 4.16438922228) - 110.1139242984811;
} else if (x <= 1950.0) {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + (y * (x * 0.0212463641547976)));
} else {
tmp = ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - 110.1139242984811;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -340000000.0: tmp = (x * 4.16438922228) - 110.1139242984811 elif x <= 1950.0: tmp = (x + -2.0) * ((z * 0.0212463641547976) + (y * (x * 0.0212463641547976))) else: tmp = ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - 110.1139242984811 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -340000000.0) tmp = Float64(Float64(x * 4.16438922228) - 110.1139242984811); elseif (x <= 1950.0) tmp = Float64(Float64(x + -2.0) * Float64(Float64(z * 0.0212463641547976) + Float64(y * Float64(x * 0.0212463641547976)))); else tmp = Float64(Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x))) - 110.1139242984811); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -340000000.0) tmp = (x * 4.16438922228) - 110.1139242984811; elseif (x <= 1950.0) tmp = (x + -2.0) * ((z * 0.0212463641547976) + (y * (x * 0.0212463641547976))); else tmp = ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - 110.1139242984811; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -340000000.0], N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision], If[LessEqual[x, 1950.0], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(z * 0.0212463641547976), $MachinePrecision] + N[(y * N[(x * 0.0212463641547976), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -340000000:\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\
\mathbf{elif}\;x \leq 1950:\\
\;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976 + y \cdot \left(x \cdot 0.0212463641547976\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - 110.1139242984811\\
\end{array}
\end{array}
if x < -3.4e8Initial program 18.1%
associate-*r/26.6%
sub-neg26.6%
metadata-eval26.6%
*-commutative26.6%
fma-def26.6%
*-commutative26.6%
fma-def26.6%
*-commutative26.6%
fma-def26.6%
fma-def26.6%
*-commutative26.6%
Simplified26.6%
Taylor expanded in x around inf 89.4%
if -3.4e8 < x < 1950Initial program 99.6%
associate-*r/99.6%
sub-neg99.6%
metadata-eval99.6%
*-commutative99.6%
fma-def99.6%
*-commutative99.6%
fma-def99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in x around 0 93.1%
Taylor expanded in y around inf 93.1%
associate-*r*93.1%
*-commutative93.1%
associate-*l*93.1%
Simplified93.1%
if 1950 < x Initial program 23.5%
associate-*r/31.4%
sub-neg31.4%
metadata-eval31.4%
*-commutative31.4%
fma-def31.4%
*-commutative31.4%
fma-def31.4%
*-commutative31.4%
fma-def31.4%
fma-def31.4%
*-commutative31.4%
Simplified31.4%
Taylor expanded in x around inf 82.8%
Final simplification90.2%
(FPCore (x y z)
:precision binary64
(if (<= x -340000000.0)
(- (* x 4.16438922228) 110.1139242984811)
(if (<= x 2.0)
(* -0.0424927283095952 (+ z (* x y)))
(-
(+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x)))
110.1139242984811))))
double code(double x, double y, double z) {
double tmp;
if (x <= -340000000.0) {
tmp = (x * 4.16438922228) - 110.1139242984811;
} else if (x <= 2.0) {
tmp = -0.0424927283095952 * (z + (x * y));
} else {
tmp = ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / 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 <= (-340000000.0d0)) then
tmp = (x * 4.16438922228d0) - 110.1139242984811d0
else if (x <= 2.0d0) then
tmp = (-0.0424927283095952d0) * (z + (x * y))
else
tmp = ((x * 4.16438922228d0) + (3655.1204654076414d0 * (1.0d0 / x))) - 110.1139242984811d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -340000000.0) {
tmp = (x * 4.16438922228) - 110.1139242984811;
} else if (x <= 2.0) {
tmp = -0.0424927283095952 * (z + (x * y));
} else {
tmp = ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - 110.1139242984811;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -340000000.0: tmp = (x * 4.16438922228) - 110.1139242984811 elif x <= 2.0: tmp = -0.0424927283095952 * (z + (x * y)) else: tmp = ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - 110.1139242984811 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -340000000.0) tmp = Float64(Float64(x * 4.16438922228) - 110.1139242984811); elseif (x <= 2.0) tmp = Float64(-0.0424927283095952 * Float64(z + Float64(x * y))); else tmp = Float64(Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x))) - 110.1139242984811); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -340000000.0) tmp = (x * 4.16438922228) - 110.1139242984811; elseif (x <= 2.0) tmp = -0.0424927283095952 * (z + (x * y)); else tmp = ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) - 110.1139242984811; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -340000000.0], N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision], If[LessEqual[x, 2.0], N[(-0.0424927283095952 * N[(z + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -340000000:\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\
\mathbf{elif}\;x \leq 2:\\
\;\;\;\;-0.0424927283095952 \cdot \left(z + x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) - 110.1139242984811\\
\end{array}
\end{array}
if x < -3.4e8Initial program 18.1%
associate-*r/26.6%
sub-neg26.6%
metadata-eval26.6%
*-commutative26.6%
fma-def26.6%
*-commutative26.6%
fma-def26.6%
*-commutative26.6%
fma-def26.6%
fma-def26.6%
*-commutative26.6%
Simplified26.6%
Taylor expanded in x around inf 89.4%
if -3.4e8 < x < 2Initial program 99.6%
*-commutative99.6%
associate-*r/99.3%
*-commutative99.3%
fma-def99.4%
*-commutative99.4%
fma-def99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
Simplified99.4%
Taylor expanded in x around 0 96.1%
Taylor expanded in x around 0 93.1%
distribute-lft-out93.1%
Simplified93.1%
if 2 < x Initial program 23.5%
associate-*r/31.4%
sub-neg31.4%
metadata-eval31.4%
*-commutative31.4%
fma-def31.4%
*-commutative31.4%
fma-def31.4%
*-commutative31.4%
fma-def31.4%
fma-def31.4%
*-commutative31.4%
Simplified31.4%
Taylor expanded in x around inf 82.8%
Final simplification90.2%
(FPCore (x y z) :precision binary64 (if (or (<= x -340000000.0) (not (<= x 2.75))) (- (* x 4.16438922228) 110.1139242984811) (* -0.0424927283095952 (+ z (* x y)))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -340000000.0) || !(x <= 2.75)) {
tmp = (x * 4.16438922228) - 110.1139242984811;
} 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 <= (-340000000.0d0)) .or. (.not. (x <= 2.75d0))) then
tmp = (x * 4.16438922228d0) - 110.1139242984811d0
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 <= -340000000.0) || !(x <= 2.75)) {
tmp = (x * 4.16438922228) - 110.1139242984811;
} else {
tmp = -0.0424927283095952 * (z + (x * y));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -340000000.0) or not (x <= 2.75): tmp = (x * 4.16438922228) - 110.1139242984811 else: tmp = -0.0424927283095952 * (z + (x * y)) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -340000000.0) || !(x <= 2.75)) tmp = Float64(Float64(x * 4.16438922228) - 110.1139242984811); 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 <= -340000000.0) || ~((x <= 2.75))) tmp = (x * 4.16438922228) - 110.1139242984811; else tmp = -0.0424927283095952 * (z + (x * y)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -340000000.0], N[Not[LessEqual[x, 2.75]], $MachinePrecision]], N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision], N[(-0.0424927283095952 * N[(z + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -340000000 \lor \neg \left(x \leq 2.75\right):\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\
\mathbf{else}:\\
\;\;\;\;-0.0424927283095952 \cdot \left(z + x \cdot y\right)\\
\end{array}
\end{array}
if x < -3.4e8 or 2.75 < x Initial program 20.3%
associate-*r/28.6%
sub-neg28.6%
metadata-eval28.6%
*-commutative28.6%
fma-def28.6%
*-commutative28.6%
fma-def28.6%
*-commutative28.6%
fma-def28.6%
fma-def28.6%
*-commutative28.6%
Simplified28.6%
Taylor expanded in x around inf 86.7%
if -3.4e8 < x < 2.75Initial program 99.6%
*-commutative99.6%
associate-*r/99.3%
*-commutative99.3%
fma-def99.4%
*-commutative99.4%
fma-def99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
Simplified99.4%
Taylor expanded in x around 0 96.1%
Taylor expanded in x around 0 93.1%
distribute-lft-out93.1%
Simplified93.1%
Final simplification90.2%
(FPCore (x y z) :precision binary64 (if (or (<= x -9.2e-29) (not (<= x 0.075))) (- (* x 4.16438922228) 110.1139242984811) (* z -0.0424927283095952)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -9.2e-29) || !(x <= 0.075)) {
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 <= (-9.2d-29)) .or. (.not. (x <= 0.075d0))) 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 <= -9.2e-29) || !(x <= 0.075)) {
tmp = (x * 4.16438922228) - 110.1139242984811;
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -9.2e-29) or not (x <= 0.075): tmp = (x * 4.16438922228) - 110.1139242984811 else: tmp = z * -0.0424927283095952 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -9.2e-29) || !(x <= 0.075)) 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 <= -9.2e-29) || ~((x <= 0.075))) tmp = (x * 4.16438922228) - 110.1139242984811; else tmp = z * -0.0424927283095952; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -9.2e-29], N[Not[LessEqual[x, 0.075]], $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 -9.2 \cdot 10^{-29} \lor \neg \left(x \leq 0.075\right):\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\
\mathbf{else}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\end{array}
\end{array}
if x < -9.19999999999999965e-29 or 0.0749999999999999972 < x Initial program 26.1%
associate-*r/33.8%
sub-neg33.8%
metadata-eval33.8%
*-commutative33.8%
fma-def33.8%
*-commutative33.8%
fma-def33.8%
*-commutative33.8%
fma-def33.8%
fma-def33.8%
*-commutative33.8%
Simplified33.8%
Taylor expanded in x around inf 80.7%
if -9.19999999999999965e-29 < x < 0.0749999999999999972Initial program 99.7%
associate-*r/99.7%
sub-neg99.7%
metadata-eval99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 72.6%
*-commutative72.6%
Simplified72.6%
Final simplification76.5%
(FPCore (x y z) :precision binary64 (if (<= x -9.2e-29) (* x 4.16438922228) (if (<= x 1.95) (* z -0.0424927283095952) (* 4.16438922228 (+ x -2.0)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -9.2e-29) {
tmp = x * 4.16438922228;
} else if (x <= 1.95) {
tmp = z * -0.0424927283095952;
} else {
tmp = 4.16438922228 * (x + -2.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) :: tmp
if (x <= (-9.2d-29)) then
tmp = x * 4.16438922228d0
else if (x <= 1.95d0) then
tmp = z * (-0.0424927283095952d0)
else
tmp = 4.16438922228d0 * (x + (-2.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -9.2e-29) {
tmp = x * 4.16438922228;
} else if (x <= 1.95) {
tmp = z * -0.0424927283095952;
} else {
tmp = 4.16438922228 * (x + -2.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -9.2e-29: tmp = x * 4.16438922228 elif x <= 1.95: tmp = z * -0.0424927283095952 else: tmp = 4.16438922228 * (x + -2.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -9.2e-29) tmp = Float64(x * 4.16438922228); elseif (x <= 1.95) tmp = Float64(z * -0.0424927283095952); else tmp = Float64(4.16438922228 * Float64(x + -2.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -9.2e-29) tmp = x * 4.16438922228; elseif (x <= 1.95) tmp = z * -0.0424927283095952; else tmp = 4.16438922228 * (x + -2.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -9.2e-29], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 1.95], N[(z * -0.0424927283095952), $MachinePrecision], N[(4.16438922228 * N[(x + -2.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.2 \cdot 10^{-29}:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 1.95:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;4.16438922228 \cdot \left(x + -2\right)\\
\end{array}
\end{array}
if x < -9.19999999999999965e-29Initial program 27.7%
associate-*r/35.2%
sub-neg35.2%
metadata-eval35.2%
*-commutative35.2%
fma-def35.2%
*-commutative35.2%
fma-def35.2%
*-commutative35.2%
fma-def35.2%
fma-def35.2%
*-commutative35.2%
Simplified35.2%
Taylor expanded in z around 0 35.2%
Simplified36.5%
Taylor expanded in x around inf 79.2%
*-commutative79.2%
Simplified79.2%
if -9.19999999999999965e-29 < x < 1.94999999999999996Initial program 99.7%
associate-*r/99.7%
sub-neg99.7%
metadata-eval99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 72.6%
*-commutative72.6%
Simplified72.6%
if 1.94999999999999996 < x Initial program 23.5%
associate-*r/31.4%
sub-neg31.4%
metadata-eval31.4%
*-commutative31.4%
fma-def31.4%
*-commutative31.4%
fma-def31.4%
*-commutative31.4%
fma-def31.4%
fma-def31.4%
*-commutative31.4%
Simplified31.4%
Taylor expanded in x around inf 82.0%
Final simplification76.3%
(FPCore (x y z) :precision binary64 (if (<= x -9.2e-29) (* 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 <= -9.2e-29) {
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 <= (-9.2d-29)) 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 <= -9.2e-29) {
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 <= -9.2e-29: 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 <= -9.2e-29) 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 <= -9.2e-29) 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, -9.2e-29], 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 -9.2 \cdot 10^{-29}:\\
\;\;\;\;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 < -9.19999999999999965e-29 or 2 < x Initial program 26.1%
associate-*r/33.8%
sub-neg33.8%
metadata-eval33.8%
*-commutative33.8%
fma-def33.8%
*-commutative33.8%
fma-def33.8%
*-commutative33.8%
fma-def33.8%
fma-def33.8%
*-commutative33.8%
Simplified33.8%
Taylor expanded in z around 0 33.8%
Simplified34.7%
Taylor expanded in x around inf 80.3%
*-commutative80.3%
Simplified80.3%
if -9.19999999999999965e-29 < x < 2Initial program 99.7%
associate-*r/99.7%
sub-neg99.7%
metadata-eval99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 72.6%
*-commutative72.6%
Simplified72.6%
Final simplification76.3%
(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 64.3%
associate-*r/68.0%
sub-neg68.0%
metadata-eval68.0%
*-commutative68.0%
fma-def68.0%
*-commutative68.0%
fma-def68.0%
*-commutative68.0%
fma-def68.0%
fma-def68.0%
*-commutative68.0%
Simplified68.0%
Taylor expanded in z around 0 68.0%
Simplified68.5%
Taylor expanded in x around inf 40.5%
*-commutative40.5%
Simplified40.5%
Final simplification40.5%
(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 2023257
(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)))