
(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 14 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+306)
(*
(+ x -2.0)
(/
(fma
x
(fma x (fma x (fma x 4.16438922228 78.6994924154) 137.519416416) y)
z)
(fma
x
(fma x (fma x (+ x 43.3400022514) 263.505074721) 313.399215894)
47.066876606)))
(*
(+ x -2.0)
(+
(+ (+ 4.16438922228 (/ 3451.550173699799 (* x x))) (/ y (pow x 3.0)))
(/ -101.7851458539211 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+306) {
tmp = (x + -2.0) * (fma(x, fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), z) / fma(x, fma(x, fma(x, (x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606));
} else {
tmp = (x + -2.0) * (((4.16438922228 + (3451.550173699799 / (x * x))) + (y / pow(x, 3.0))) + (-101.7851458539211 / 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+306) tmp = Float64(Float64(x + -2.0) * Float64(fma(x, fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), z) / fma(x, fma(x, fma(x, Float64(x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606))); else tmp = Float64(Float64(x + -2.0) * Float64(Float64(Float64(4.16438922228 + Float64(3451.550173699799 / Float64(x * x))) + Float64(y / (x ^ 3.0))) + Float64(-101.7851458539211 / 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+306], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(x * N[(x * N[(x * N[(x * 4.16438922228 + 78.6994924154), $MachinePrecision] + 137.519416416), $MachinePrecision] + y), $MachinePrecision] + z), $MachinePrecision] / N[(x * N[(x * N[(x * N[(x + 43.3400022514), $MachinePrecision] + 263.505074721), $MachinePrecision] + 313.399215894), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(N[(4.16438922228 + N[(3451.550173699799 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-101.7851458539211 / x), $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^{+306}:\\
\;\;\;\;\left(x + -2\right) \cdot \frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right)}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(\left(\left(4.16438922228 + \frac{3451.550173699799}{x \cdot x}\right) + \frac{y}{{x}^{3}}\right) + \frac{-101.7851458539211}{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)) < 4.99999999999999993e306Initial program 95.8%
associate-*r/99.6%
sub-neg99.6%
metadata-eval99.6%
*-commutative99.6%
fma-def99.5%
*-commutative99.5%
fma-def99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
*-commutative99.5%
Simplified99.5%
if 4.99999999999999993e306 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) Initial program 0.1%
associate-*r/0.1%
sub-neg0.1%
metadata-eval0.1%
*-commutative0.1%
fma-def0.1%
*-commutative0.1%
fma-def0.1%
*-commutative0.1%
fma-def0.1%
fma-def0.1%
*-commutative0.1%
Simplified0.1%
Taylor expanded in x around -inf 99.1%
sub-neg99.1%
+-commutative99.1%
mul-1-neg99.1%
unsub-neg99.1%
associate-*r/99.1%
metadata-eval99.1%
unpow299.1%
mul-1-neg99.1%
unsub-neg99.1%
associate-*r/99.1%
metadata-eval99.1%
distribute-neg-frac99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in y around inf 99.1%
associate-*r/99.1%
mul-1-neg99.1%
Simplified99.1%
Final simplification99.3%
(FPCore (x y z)
:precision binary64
(if (or (<= x -3e+24) (not (<= x 1.15e+23)))
(*
(+ x -2.0)
(+
(+ (+ 4.16438922228 (/ 3451.550173699799 (* x x))) (/ y (pow x 3.0)))
(/ -101.7851458539211 x)))
(/
(*
(- x 2.0)
(+
(*
x
(+
(* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
z))
(+
47.066876606
(*
x
(+ 313.399215894 (* x (fma x (+ x 43.3400022514) 263.505074721))))))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -3e+24) || !(x <= 1.15e+23)) {
tmp = (x + -2.0) * (((4.16438922228 + (3451.550173699799 / (x * x))) + (y / pow(x, 3.0))) + (-101.7851458539211 / x));
} else {
tmp = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / (47.066876606 + (x * (313.399215894 + (x * fma(x, (x + 43.3400022514), 263.505074721)))));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if ((x <= -3e+24) || !(x <= 1.15e+23)) tmp = Float64(Float64(x + -2.0) * Float64(Float64(Float64(4.16438922228 + Float64(3451.550173699799 / Float64(x * x))) + Float64(y / (x ^ 3.0))) + Float64(-101.7851458539211 / 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(x * fma(x, Float64(x + 43.3400022514), 263.505074721)))))); end return tmp end
code[x_, y_, z_] := If[Or[LessEqual[x, -3e+24], N[Not[LessEqual[x, 1.15e+23]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(N[(4.16438922228 + N[(3451.550173699799 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-101.7851458539211 / x), $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[(x * N[(x * N[(x + 43.3400022514), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3 \cdot 10^{+24} \lor \neg \left(x \leq 1.15 \cdot 10^{+23}\right):\\
\;\;\;\;\left(x + -2\right) \cdot \left(\left(\left(4.16438922228 + \frac{3451.550173699799}{x \cdot x}\right) + \frac{y}{{x}^{3}}\right) + \frac{-101.7851458539211}{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 + x \cdot \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right)\right)}\\
\end{array}
\end{array}
if x < -2.99999999999999995e24 or 1.15e23 < x Initial program 12.8%
associate-*r/17.4%
sub-neg17.4%
metadata-eval17.4%
*-commutative17.4%
fma-def17.4%
*-commutative17.4%
fma-def17.4%
*-commutative17.4%
fma-def17.4%
fma-def17.4%
*-commutative17.4%
Simplified17.4%
Taylor expanded in x around -inf 98.3%
sub-neg98.3%
+-commutative98.3%
mul-1-neg98.3%
unsub-neg98.3%
associate-*r/98.3%
metadata-eval98.3%
unpow298.3%
mul-1-neg98.3%
unsub-neg98.3%
associate-*r/98.3%
metadata-eval98.3%
distribute-neg-frac98.3%
metadata-eval98.3%
Simplified98.3%
Taylor expanded in y around inf 98.3%
associate-*r/98.3%
mul-1-neg98.3%
Simplified98.3%
if -2.99999999999999995e24 < x < 1.15e23Initial program 99.6%
pow199.6%
*-commutative99.6%
*-commutative99.6%
fma-udef99.6%
Applied egg-rr99.6%
unpow199.6%
Simplified99.6%
Final simplification99.0%
(FPCore (x y z)
:precision binary64
(if (or (<= x -1.05e+26) (not (<= x 8.5e+23)))
(*
(+ x -2.0)
(+
(+ (+ 4.16438922228 (/ 3451.550173699799 (* x x))) (/ y (pow x 3.0)))
(/ -101.7851458539211 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.05e+26) || !(x <= 8.5e+23)) {
tmp = (x + -2.0) * (((4.16438922228 + (3451.550173699799 / (x * x))) + (y / pow(x, 3.0))) + (-101.7851458539211 / 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.05d+26)) .or. (.not. (x <= 8.5d+23))) then
tmp = (x + (-2.0d0)) * (((4.16438922228d0 + (3451.550173699799d0 / (x * x))) + (y / (x ** 3.0d0))) + ((-101.7851458539211d0) / 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.05e+26) || !(x <= 8.5e+23)) {
tmp = (x + -2.0) * (((4.16438922228 + (3451.550173699799 / (x * x))) + (y / Math.pow(x, 3.0))) + (-101.7851458539211 / 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.05e+26) or not (x <= 8.5e+23): tmp = (x + -2.0) * (((4.16438922228 + (3451.550173699799 / (x * x))) + (y / math.pow(x, 3.0))) + (-101.7851458539211 / 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.05e+26) || !(x <= 8.5e+23)) tmp = Float64(Float64(x + -2.0) * Float64(Float64(Float64(4.16438922228 + Float64(3451.550173699799 / Float64(x * x))) + Float64(y / (x ^ 3.0))) + Float64(-101.7851458539211 / 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.05e+26) || ~((x <= 8.5e+23))) tmp = (x + -2.0) * (((4.16438922228 + (3451.550173699799 / (x * x))) + (y / (x ^ 3.0))) + (-101.7851458539211 / 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.05e+26], N[Not[LessEqual[x, 8.5e+23]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(N[(4.16438922228 + N[(3451.550173699799 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-101.7851458539211 / x), $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.05 \cdot 10^{+26} \lor \neg \left(x \leq 8.5 \cdot 10^{+23}\right):\\
\;\;\;\;\left(x + -2\right) \cdot \left(\left(\left(4.16438922228 + \frac{3451.550173699799}{x \cdot x}\right) + \frac{y}{{x}^{3}}\right) + \frac{-101.7851458539211}{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.05e26 or 8.5000000000000001e23 < x Initial program 12.8%
associate-*r/17.4%
sub-neg17.4%
metadata-eval17.4%
*-commutative17.4%
fma-def17.4%
*-commutative17.4%
fma-def17.4%
*-commutative17.4%
fma-def17.4%
fma-def17.4%
*-commutative17.4%
Simplified17.4%
Taylor expanded in x around -inf 98.3%
sub-neg98.3%
+-commutative98.3%
mul-1-neg98.3%
unsub-neg98.3%
associate-*r/98.3%
metadata-eval98.3%
unpow298.3%
mul-1-neg98.3%
unsub-neg98.3%
associate-*r/98.3%
metadata-eval98.3%
distribute-neg-frac98.3%
metadata-eval98.3%
Simplified98.3%
Taylor expanded in y around inf 98.3%
associate-*r/98.3%
mul-1-neg98.3%
Simplified98.3%
if -1.05e26 < x < 8.5000000000000001e23Initial program 99.6%
Final simplification99.0%
(FPCore (x y z)
:precision binary64
(if (or (<= x -2.4e+37) (not (<= x 9.5e+35)))
(+
(+
(fma x 4.16438922228 (/ 3655.1204654076414 x))
(/ (- y 130977.50649958357) (* x x)))
-110.1139242984811)
(/
(*
(- 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 <= -2.4e+37) || !(x <= 9.5e+35)) {
tmp = (fma(x, 4.16438922228, (3655.1204654076414 / x)) + ((y - 130977.50649958357) / (x * x))) + -110.1139242984811;
} 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 <= -2.4e+37) || !(x <= 9.5e+35)) tmp = Float64(Float64(fma(x, 4.16438922228, Float64(3655.1204654076414 / x)) + Float64(Float64(y - 130977.50649958357) / Float64(x * x))) + -110.1139242984811); 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
code[x_, y_, z_] := If[Or[LessEqual[x, -2.4e+37], N[Not[LessEqual[x, 9.5e+35]], $MachinePrecision]], N[(N[(N[(x * 4.16438922228 + N[(3655.1204654076414 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(y - 130977.50649958357), $MachinePrecision] / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -110.1139242984811), $MachinePrecision], 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 -2.4 \cdot 10^{+37} \lor \neg \left(x \leq 9.5 \cdot 10^{+35}\right):\\
\;\;\;\;\left(\mathsf{fma}\left(x, 4.16438922228, \frac{3655.1204654076414}{x}\right) + \frac{y - 130977.50649958357}{x \cdot x}\right) + -110.1139242984811\\
\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 < -2.4e37 or 9.50000000000000062e35 < x Initial program 6.2%
associate-*r/11.1%
sub-neg11.1%
metadata-eval11.1%
*-commutative11.1%
fma-def11.1%
*-commutative11.1%
fma-def11.1%
*-commutative11.1%
fma-def11.1%
fma-def11.1%
*-commutative11.1%
Simplified11.1%
Taylor expanded in x around -inf 98.3%
sub-neg98.3%
+-commutative98.3%
mul-1-neg98.3%
unsub-neg98.3%
*-commutative98.3%
fma-def98.3%
associate-*r/98.3%
metadata-eval98.3%
mul-1-neg98.3%
unsub-neg98.3%
unpow298.3%
metadata-eval98.3%
Simplified98.3%
if -2.4e37 < x < 9.50000000000000062e35Initial program 99.6%
Final simplification99.0%
(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)))
(t_2 (/ (* (- x 2.0) (+ t_1 z)) t_0)))
(if (<= t_2 (- INFINITY))
(/ (+ x -2.0) (/ t_0 t_1))
(if (<= t_2 5e+306) t_2 (/ (+ x -2.0) 0.24013125253755718)))))
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 t_2 = ((x - 2.0) * (t_1 + z)) / t_0;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = (x + -2.0) / (t_0 / t_1);
} else if (t_2 <= 5e+306) {
tmp = t_2;
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
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 t_2 = ((x - 2.0) * (t_1 + z)) / t_0;
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = (x + -2.0) / (t_0 / t_1);
} else if (t_2 <= 5e+306) {
tmp = t_2;
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
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) t_2 = ((x - 2.0) * (t_1 + z)) / t_0 tmp = 0 if t_2 <= -math.inf: tmp = (x + -2.0) / (t_0 / t_1) elif t_2 <= 5e+306: tmp = t_2 else: tmp = (x + -2.0) / 0.24013125253755718 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)) t_2 = Float64(Float64(Float64(x - 2.0) * Float64(t_1 + z)) / t_0) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(x + -2.0) / Float64(t_0 / t_1)); elseif (t_2 <= 5e+306) tmp = t_2; else tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); 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); t_2 = ((x - 2.0) * (t_1 + z)) / t_0; tmp = 0.0; if (t_2 <= -Inf) tmp = (x + -2.0) / (t_0 / t_1); elseif (t_2 <= 5e+306) tmp = t_2; else tmp = (x + -2.0) / 0.24013125253755718; 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]}, Block[{t$95$2 = N[(N[(N[(x - 2.0), $MachinePrecision] * N[(t$95$1 + z), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(x + -2.0), $MachinePrecision] / N[(t$95$0 / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+306], t$95$2, N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $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)\\
t_2 := \frac{\left(x - 2\right) \cdot \left(t_1 + z\right)}{t_0}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;\frac{x + -2}{\frac{t_0}{t_1}}\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+306}:\\
\;\;\;\;t_2\\
\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)) < -inf.0Initial program 3.9%
associate-/l*99.1%
sub-neg99.1%
metadata-eval99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
Simplified99.1%
Taylor expanded in z around 0 82.6%
if -inf.0 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < 4.99999999999999993e306Initial program 99.6%
if 4.99999999999999993e306 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) Initial program 0.1%
associate-/l*0.1%
sub-neg0.1%
metadata-eval0.1%
fma-def0.1%
fma-def0.1%
fma-def0.1%
fma-def0.1%
fma-def0.1%
fma-def0.1%
fma-def0.1%
Simplified0.1%
Taylor expanded in x around inf 97.5%
Final simplification98.3%
(FPCore (x y z)
:precision binary64
(if (or (<= x -9e+52) (not (<= x 8.2e+65)))
(/ (+ x -2.0) 0.24013125253755718)
(/
(*
(- 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 <= -9e+52) || !(x <= 8.2e+65)) {
tmp = (x + -2.0) / 0.24013125253755718;
} 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 <= (-9d+52)) .or. (.not. (x <= 8.2d+65))) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
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 <= -9e+52) || !(x <= 8.2e+65)) {
tmp = (x + -2.0) / 0.24013125253755718;
} 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 <= -9e+52) or not (x <= 8.2e+65): tmp = (x + -2.0) / 0.24013125253755718 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 <= -9e+52) || !(x <= 8.2e+65)) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); 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 <= -9e+52) || ~((x <= 8.2e+65))) tmp = (x + -2.0) / 0.24013125253755718; 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, -9e+52], N[Not[LessEqual[x, 8.2e+65]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $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 -9 \cdot 10^{+52} \lor \neg \left(x \leq 8.2 \cdot 10^{+65}\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\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 < -8.9999999999999999e52 or 8.2000000000000003e65 < x Initial program 1.1%
associate-/l*4.6%
sub-neg4.6%
metadata-eval4.6%
fma-def4.6%
fma-def4.6%
fma-def4.6%
fma-def4.6%
fma-def4.6%
fma-def4.6%
fma-def4.6%
Simplified4.6%
Taylor expanded in x around inf 97.6%
if -8.9999999999999999e52 < x < 8.2000000000000003e65Initial program 97.6%
Taylor expanded in x around inf 96.2%
cube-mult96.2%
unpow296.2%
distribute-rgt-out96.2%
+-commutative96.2%
unpow296.2%
Simplified96.2%
Final simplification96.8%
(FPCore (x y z)
:precision binary64
(if (or (<= x -1.6e+27) (not (<= x 2.2e+25)))
(/ (+ x -2.0) 0.24013125253755718)
(/
(* (- 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 <= -1.6e+27) || !(x <= 2.2e+25)) {
tmp = (x + -2.0) / 0.24013125253755718;
} 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 <= (-1.6d+27)) .or. (.not. (x <= 2.2d+25))) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
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 <= -1.6e+27) || !(x <= 2.2e+25)) {
tmp = (x + -2.0) / 0.24013125253755718;
} 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 <= -1.6e+27) or not (x <= 2.2e+25): tmp = (x + -2.0) / 0.24013125253755718 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 <= -1.6e+27) || !(x <= 2.2e+25)) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); 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 <= -1.6e+27) || ~((x <= 2.2e+25))) tmp = (x + -2.0) / 0.24013125253755718; 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, -1.6e+27], N[Not[LessEqual[x, 2.2e+25]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $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 -1.6 \cdot 10^{+27} \lor \neg \left(x \leq 2.2 \cdot 10^{+25}\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\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 < -1.60000000000000008e27 or 2.2000000000000001e25 < x Initial program 11.4%
associate-/l*16.0%
sub-neg16.0%
metadata-eval16.0%
fma-def16.0%
fma-def16.0%
fma-def16.0%
fma-def16.0%
fma-def16.0%
fma-def16.0%
fma-def16.0%
Simplified16.0%
Taylor expanded in x around inf 92.5%
if -1.60000000000000008e27 < x < 2.2000000000000001e25Initial program 99.6%
Taylor expanded in x around 0 98.9%
*-commutative98.9%
Simplified98.9%
Final simplification95.8%
(FPCore (x y z)
:precision binary64
(if (or (<= x -36.0) (not (<= x 8.6e+23)))
(/ (+ x -2.0) 0.24013125253755718)
(/
(* (- x 2.0) (+ z (* x (+ y (* x 137.519416416)))))
(+ 47.066876606 (* x 313.399215894)))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -36.0) || !(x <= 8.6e+23)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-36.0d0)) .or. (.not. (x <= 8.6d+23))) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else
tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / (47.066876606d0 + (x * 313.399215894d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -36.0) || !(x <= 8.6e+23)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -36.0) or not (x <= 8.6e+23): tmp = (x + -2.0) / 0.24013125253755718 else: tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894)) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -36.0) || !(x <= 8.6e+23)) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); else tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * 137.519416416))))) / Float64(47.066876606 + Float64(x * 313.399215894))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -36.0) || ~((x <= 8.6e+23))) tmp = (x + -2.0) / 0.24013125253755718; else tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -36.0], N[Not[LessEqual[x, 8.6e+23]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $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 * 313.399215894), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -36 \lor \neg \left(x \leq 8.6 \cdot 10^{+23}\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{47.066876606 + x \cdot 313.399215894}\\
\end{array}
\end{array}
if x < -36 or 8.5999999999999997e23 < x Initial program 14.8%
associate-/l*19.2%
sub-neg19.2%
metadata-eval19.2%
fma-def19.2%
fma-def19.2%
fma-def19.3%
fma-def19.3%
fma-def19.3%
fma-def19.3%
fma-def19.3%
Simplified19.3%
Taylor expanded in x around inf 89.7%
if -36 < x < 8.5999999999999997e23Initial program 99.7%
Taylor expanded in x around 0 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in x around 0 95.8%
*-commutative95.8%
Simplified95.8%
Final simplification92.8%
(FPCore (x y z)
:precision binary64
(if (or (<= x -1.9e+17) (not (<= x 8.6e+23)))
(/ (+ x -2.0) 0.24013125253755718)
(*
(+ x -2.0)
(+
(* z 0.0212463641547976)
(* x (- (* y 0.0212463641547976) (* z 0.14147091005106402)))))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1.9e+17) || !(x <= 8.6e+23)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-1.9d+17)) .or. (.not. (x <= 8.6d+23))) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else
tmp = (x + (-2.0d0)) * ((z * 0.0212463641547976d0) + (x * ((y * 0.0212463641547976d0) - (z * 0.14147091005106402d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -1.9e+17) || !(x <= 8.6e+23)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1.9e+17) or not (x <= 8.6e+23): tmp = (x + -2.0) / 0.24013125253755718 else: tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402)))) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -1.9e+17) || !(x <= 8.6e+23)) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); else tmp = Float64(Float64(x + -2.0) * Float64(Float64(z * 0.0212463641547976) + Float64(x * Float64(Float64(y * 0.0212463641547976) - Float64(z * 0.14147091005106402))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -1.9e+17) || ~((x <= 8.6e+23))) tmp = (x + -2.0) / 0.24013125253755718; else tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -1.9e+17], N[Not[LessEqual[x, 8.6e+23]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(z * 0.0212463641547976), $MachinePrecision] + N[(x * N[(N[(y * 0.0212463641547976), $MachinePrecision] - N[(z * 0.14147091005106402), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.9 \cdot 10^{+17} \lor \neg \left(x \leq 8.6 \cdot 10^{+23}\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976 + x \cdot \left(y \cdot 0.0212463641547976 - z \cdot 0.14147091005106402\right)\right)\\
\end{array}
\end{array}
if x < -1.9e17 or 8.5999999999999997e23 < x Initial program 12.8%
associate-/l*17.4%
sub-neg17.4%
metadata-eval17.4%
fma-def17.4%
fma-def17.4%
fma-def17.4%
fma-def17.4%
fma-def17.4%
fma-def17.4%
fma-def17.4%
Simplified17.4%
Taylor expanded in x around inf 91.8%
if -1.9e17 < x < 8.5999999999999997e23Initial 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 87.6%
Final simplification89.7%
(FPCore (x y z) :precision binary64 (if (or (<= x -760000000000.0) (not (<= x 86000000000000.0))) (/ (+ x -2.0) 0.24013125253755718) (* (+ x -2.0) (* z 0.0212463641547976))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -760000000000.0) || !(x <= 86000000000000.0)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = (x + -2.0) * (z * 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 <= (-760000000000.0d0)) .or. (.not. (x <= 86000000000000.0d0))) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else
tmp = (x + (-2.0d0)) * (z * 0.0212463641547976d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -760000000000.0) || !(x <= 86000000000000.0)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = (x + -2.0) * (z * 0.0212463641547976);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -760000000000.0) or not (x <= 86000000000000.0): tmp = (x + -2.0) / 0.24013125253755718 else: tmp = (x + -2.0) * (z * 0.0212463641547976) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -760000000000.0) || !(x <= 86000000000000.0)) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); else tmp = Float64(Float64(x + -2.0) * Float64(z * 0.0212463641547976)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -760000000000.0) || ~((x <= 86000000000000.0))) tmp = (x + -2.0) / 0.24013125253755718; else tmp = (x + -2.0) * (z * 0.0212463641547976); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -760000000000.0], N[Not[LessEqual[x, 86000000000000.0]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(z * 0.0212463641547976), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -760000000000 \lor \neg \left(x \leq 86000000000000\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976\right)\\
\end{array}
\end{array}
if x < -7.6e11 or 8.6e13 < x Initial program 14.8%
associate-/l*19.2%
sub-neg19.2%
metadata-eval19.2%
fma-def19.2%
fma-def19.2%
fma-def19.2%
fma-def19.2%
fma-def19.2%
fma-def19.2%
fma-def19.2%
Simplified19.2%
Taylor expanded in x around inf 89.8%
if -7.6e11 < x < 8.6e13Initial program 99.6%
associate-*r/99.7%
sub-neg99.7%
metadata-eval99.7%
*-commutative99.7%
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 61.6%
Final simplification75.8%
(FPCore (x y z) :precision binary64 (if (or (<= x -760000000000.0) (not (<= x 86000000000000.0))) (/ (+ x -2.0) 0.24013125253755718) (/ (+ x -2.0) (/ 47.066876606 z))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -760000000000.0) || !(x <= 86000000000000.0)) {
tmp = (x + -2.0) / 0.24013125253755718;
} 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 <= (-760000000000.0d0)) .or. (.not. (x <= 86000000000000.0d0))) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
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 <= -760000000000.0) || !(x <= 86000000000000.0)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = (x + -2.0) / (47.066876606 / z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -760000000000.0) or not (x <= 86000000000000.0): tmp = (x + -2.0) / 0.24013125253755718 else: tmp = (x + -2.0) / (47.066876606 / z) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -760000000000.0) || !(x <= 86000000000000.0)) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); 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 <= -760000000000.0) || ~((x <= 86000000000000.0))) tmp = (x + -2.0) / 0.24013125253755718; else tmp = (x + -2.0) / (47.066876606 / z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -760000000000.0], N[Not[LessEqual[x, 86000000000000.0]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / N[(47.066876606 / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -760000000000 \lor \neg \left(x \leq 86000000000000\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{\frac{47.066876606}{z}}\\
\end{array}
\end{array}
if x < -7.6e11 or 8.6e13 < x Initial program 14.8%
associate-/l*19.2%
sub-neg19.2%
metadata-eval19.2%
fma-def19.2%
fma-def19.2%
fma-def19.2%
fma-def19.2%
fma-def19.2%
fma-def19.2%
fma-def19.2%
Simplified19.2%
Taylor expanded in x around inf 89.8%
if -7.6e11 < x < 8.6e13Initial program 99.6%
associate-/l*99.6%
sub-neg99.6%
metadata-eval99.6%
fma-def99.6%
fma-def99.6%
fma-def99.6%
fma-def99.6%
fma-def99.6%
fma-def99.6%
fma-def99.6%
Simplified99.6%
Taylor expanded in x around 0 61.7%
Final simplification75.8%
(FPCore (x y z) :precision binary64 (if (or (<= x -920000000000.0) (not (<= x 86000000000000.0))) (/ (+ x -2.0) 0.24013125253755718) (* z -0.0424927283095952)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -920000000000.0) || !(x <= 86000000000000.0)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-920000000000.0d0)) .or. (.not. (x <= 86000000000000.0d0))) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else
tmp = z * (-0.0424927283095952d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -920000000000.0) || !(x <= 86000000000000.0)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -920000000000.0) or not (x <= 86000000000000.0): tmp = (x + -2.0) / 0.24013125253755718 else: tmp = z * -0.0424927283095952 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -920000000000.0) || !(x <= 86000000000000.0)) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); else tmp = Float64(z * -0.0424927283095952); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -920000000000.0) || ~((x <= 86000000000000.0))) tmp = (x + -2.0) / 0.24013125253755718; else tmp = z * -0.0424927283095952; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -920000000000.0], N[Not[LessEqual[x, 86000000000000.0]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], N[(z * -0.0424927283095952), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -920000000000 \lor \neg \left(x \leq 86000000000000\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{else}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\end{array}
\end{array}
if x < -9.2e11 or 8.6e13 < x Initial program 14.8%
associate-/l*19.2%
sub-neg19.2%
metadata-eval19.2%
fma-def19.2%
fma-def19.2%
fma-def19.2%
fma-def19.2%
fma-def19.2%
fma-def19.2%
fma-def19.2%
Simplified19.2%
Taylor expanded in x around inf 89.8%
if -9.2e11 < x < 8.6e13Initial program 99.6%
associate-*r/99.7%
sub-neg99.7%
metadata-eval99.7%
*-commutative99.7%
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 61.6%
*-commutative61.6%
Simplified61.6%
Final simplification75.8%
(FPCore (x y z) :precision binary64 (if (<= x -800000000000.0) (* x 4.16438922228) (if (<= x 86000000000000.0) (* z -0.0424927283095952) (* x 4.16438922228))))
double code(double x, double y, double z) {
double tmp;
if (x <= -800000000000.0) {
tmp = x * 4.16438922228;
} else if (x <= 86000000000000.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 <= (-800000000000.0d0)) then
tmp = x * 4.16438922228d0
else if (x <= 86000000000000.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 <= -800000000000.0) {
tmp = x * 4.16438922228;
} else if (x <= 86000000000000.0) {
tmp = z * -0.0424927283095952;
} else {
tmp = x * 4.16438922228;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -800000000000.0: tmp = x * 4.16438922228 elif x <= 86000000000000.0: tmp = z * -0.0424927283095952 else: tmp = x * 4.16438922228 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -800000000000.0) tmp = Float64(x * 4.16438922228); elseif (x <= 86000000000000.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 <= -800000000000.0) tmp = x * 4.16438922228; elseif (x <= 86000000000000.0) tmp = z * -0.0424927283095952; else tmp = x * 4.16438922228; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -800000000000.0], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 86000000000000.0], N[(z * -0.0424927283095952), $MachinePrecision], N[(x * 4.16438922228), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -800000000000:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 86000000000000:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228\\
\end{array}
\end{array}
if x < -8e11 or 8.6e13 < x Initial program 14.8%
associate-*r/19.3%
sub-neg19.3%
metadata-eval19.3%
*-commutative19.3%
fma-def19.3%
*-commutative19.3%
fma-def19.3%
*-commutative19.3%
fma-def19.3%
fma-def19.3%
*-commutative19.3%
Simplified19.3%
Taylor expanded in x around inf 89.2%
Taylor expanded in x around inf 89.2%
*-commutative89.2%
Simplified89.2%
if -8e11 < x < 8.6e13Initial program 99.6%
associate-*r/99.7%
sub-neg99.7%
metadata-eval99.7%
*-commutative99.7%
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 61.6%
*-commutative61.6%
Simplified61.6%
Final simplification75.5%
(FPCore (x y z) :precision binary64 (* x 4.16438922228))
double code(double x, double y, double z) {
return x * 4.16438922228;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x * 4.16438922228d0
end function
public static double code(double x, double y, double z) {
return x * 4.16438922228;
}
def code(x, y, z): return x * 4.16438922228
function code(x, y, z) return Float64(x * 4.16438922228) end
function tmp = code(x, y, z) tmp = x * 4.16438922228; end
code[x_, y_, z_] := N[(x * 4.16438922228), $MachinePrecision]
\begin{array}{l}
\\
x \cdot 4.16438922228
\end{array}
Initial program 56.9%
associate-*r/59.1%
sub-neg59.1%
metadata-eval59.1%
*-commutative59.1%
fma-def59.1%
*-commutative59.1%
fma-def59.1%
*-commutative59.1%
fma-def59.1%
fma-def59.1%
*-commutative59.1%
Simplified59.1%
Taylor expanded in x around inf 46.8%
Taylor expanded in x around inf 46.7%
*-commutative46.7%
Simplified46.7%
Final simplification46.7%
(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 2023242
(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)))