
(FPCore (x y z)
:precision binary64
(/
(*
(- x 2.0)
(+
(*
(+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y)
x)
z))
(+
(* (+ (* (+ (* (+ x 43.3400022514) x) 263.505074721) x) 313.399215894) x)
47.066876606)))
double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((x - 2.0d0) * ((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z)) / (((((((x + 43.3400022514d0) * x) + 263.505074721d0) * x) + 313.399215894d0) * x) + 47.066876606d0)
end function
public static double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
def code(x, y, z): return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)
function code(x, y, z) return Float64(Float64(Float64(x - 2.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) end
function tmp = code(x, y, z) tmp = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606); end
code[x_, y_, z_] := N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision] * x), $MachinePrecision] + 137.519416416), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(x + 43.3400022514), $MachinePrecision] * x), $MachinePrecision] + 263.505074721), $MachinePrecision] * x), $MachinePrecision] + 313.399215894), $MachinePrecision] * x), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z)
:precision binary64
(/
(*
(- x 2.0)
(+
(*
(+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y)
x)
z))
(+
(* (+ (* (+ (* (+ x 43.3400022514) x) 263.505074721) x) 313.399215894) x)
47.066876606)))
double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((x - 2.0d0) * ((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z)) / (((((((x + 43.3400022514d0) * x) + 263.505074721d0) * x) + 313.399215894d0) * x) + 47.066876606d0)
end function
public static double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
def code(x, y, z): return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)
function code(x, y, z) return Float64(Float64(Float64(x - 2.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) end
function tmp = code(x, y, z) tmp = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606); end
code[x_, y_, z_] := N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision] * x), $MachinePrecision] + 137.519416416), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(x + 43.3400022514), $MachinePrecision] * x), $MachinePrecision] + 263.505074721), $MachinePrecision] * x), $MachinePrecision] + 313.399215894), $MachinePrecision] * x), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\end{array}
(FPCore (x y z)
:precision binary64
(if (<=
(/
(*
(- x 2.0)
(+
(*
x
(+
(* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
z))
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
4e+297)
(*
(+ x -2.0)
(/
(fma
x
(fma x (fma x (fma x 4.16438922228 78.6994924154) 137.519416416) y)
z)
(fma
x
(fma x (fma x (+ x 43.3400022514) 263.505074721) 313.399215894)
47.066876606)))
(+
(+
(fma x 4.16438922228 (/ 3655.1204654076414 x))
(/ (- y 130977.50649958357) (* x x)))
-110.1139242984811)))
double code(double x, double y, double z) {
double tmp;
if ((((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= 4e+297) {
tmp = (x + -2.0) * (fma(x, fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), z) / fma(x, fma(x, fma(x, (x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606));
} else {
tmp = (fma(x, 4.16438922228, (3655.1204654076414 / x)) + ((y - 130977.50649958357) / (x * x))) + -110.1139242984811;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= 4e+297) tmp = Float64(Float64(x + -2.0) * Float64(fma(x, fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), z) / fma(x, fma(x, fma(x, Float64(x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606))); else tmp = Float64(Float64(fma(x, 4.16438922228, Float64(3655.1204654076414 / x)) + Float64(Float64(y - 130977.50649958357) / Float64(x * x))) + -110.1139242984811); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision], 4e+297], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(x * N[(x * N[(x * N[(x * 4.16438922228 + 78.6994924154), $MachinePrecision] + 137.519416416), $MachinePrecision] + y), $MachinePrecision] + z), $MachinePrecision] / N[(x * N[(x * N[(x * N[(x + 43.3400022514), $MachinePrecision] + 263.505074721), $MachinePrecision] + 313.399215894), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 4.16438922228 + N[(3655.1204654076414 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(y - 130977.50649958357), $MachinePrecision] / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -110.1139242984811), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606} \leq 4 \cdot 10^{+297}:\\
\;\;\;\;\left(x + -2\right) \cdot \frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right)}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\mathsf{fma}\left(x, 4.16438922228, \frac{3655.1204654076414}{x}\right) + \frac{y - 130977.50649958357}{x \cdot x}\right) + -110.1139242984811\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < 4.0000000000000001e297Initial program 97.7%
*-commutative97.7%
associate-*l/98.9%
*-commutative98.9%
sub-neg98.9%
metadata-eval98.9%
Simplified98.9%
if 4.0000000000000001e297 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) Initial program 0.2%
*-commutative0.2%
associate-*l/2.0%
*-commutative2.0%
sub-neg2.0%
metadata-eval2.0%
Simplified2.0%
Taylor expanded in x around -inf 99.2%
sub-neg99.2%
+-commutative99.2%
mul-1-neg99.2%
unsub-neg99.2%
*-commutative99.2%
fma-def99.2%
associate-*r/99.2%
metadata-eval99.2%
mul-1-neg99.2%
unsub-neg99.2%
unpow299.2%
metadata-eval99.2%
Simplified99.2%
Final simplification99.0%
(FPCore (x y z)
:precision binary64
(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) 4e+297)
(* (+ x -2.0) (+ (/ z t_0) (/ t_1 t_0)))
(+
(+
(fma x 4.16438922228 (/ 3655.1204654076414 x))
(/ (- y 130977.50649958357) (* x x)))
-110.1139242984811))))
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) <= 4e+297) {
tmp = (x + -2.0) * ((z / t_0) + (t_1 / t_0));
} else {
tmp = (fma(x, 4.16438922228, (3655.1204654076414 / x)) + ((y - 130977.50649958357) / (x * x))) + -110.1139242984811;
}
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) <= 4e+297) tmp = Float64(Float64(x + -2.0) * Float64(Float64(z / t_0) + Float64(t_1 / t_0))); else tmp = Float64(Float64(fma(x, 4.16438922228, Float64(3655.1204654076414 / x)) + Float64(Float64(y - 130977.50649958357) / Float64(x * x))) + -110.1139242984811); end return tmp end
code[x_, y_, z_] := 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], 4e+297], 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 + N[(3655.1204654076414 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(y - 130977.50649958357), $MachinePrecision] / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -110.1139242984811), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
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 4 \cdot 10^{+297}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(\frac{z}{t_0} + \frac{t_1}{t_0}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\mathsf{fma}\left(x, 4.16438922228, \frac{3655.1204654076414}{x}\right) + \frac{y - 130977.50649958357}{x \cdot x}\right) + -110.1139242984811\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < 4.0000000000000001e297Initial program 97.7%
*-commutative97.7%
associate-*l/98.9%
*-commutative98.9%
sub-neg98.9%
metadata-eval98.9%
Simplified98.9%
Taylor expanded in z around 0 98.9%
if 4.0000000000000001e297 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) Initial program 0.2%
*-commutative0.2%
associate-*l/2.0%
*-commutative2.0%
sub-neg2.0%
metadata-eval2.0%
Simplified2.0%
Taylor expanded in x around -inf 99.2%
sub-neg99.2%
+-commutative99.2%
mul-1-neg99.2%
unsub-neg99.2%
*-commutative99.2%
fma-def99.2%
associate-*r/99.2%
metadata-eval99.2%
mul-1-neg99.2%
unsub-neg99.2%
unpow299.2%
metadata-eval99.2%
Simplified99.2%
Final simplification99.0%
(FPCore (x y z)
:precision binary64
(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) INFINITY)
(* (+ x -2.0) (+ (/ z t_0) (/ t_1 t_0)))
(/ (+ 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 tmp;
if ((((x - 2.0) * (t_1 + z)) / t_0) <= ((double) INFINITY)) {
tmp = (x + -2.0) * ((z / t_0) + (t_1 / t_0));
} 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 tmp;
if ((((x - 2.0) * (t_1 + z)) / t_0) <= Double.POSITIVE_INFINITY) {
tmp = (x + -2.0) * ((z / t_0) + (t_1 / t_0));
} 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) tmp = 0 if (((x - 2.0) * (t_1 + z)) / t_0) <= math.inf: tmp = (x + -2.0) * ((z / t_0) + (t_1 / t_0)) 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)) tmp = 0.0 if (Float64(Float64(Float64(x - 2.0) * Float64(t_1 + z)) / t_0) <= Inf) tmp = Float64(Float64(x + -2.0) * Float64(Float64(z / t_0) + Float64(t_1 / t_0))); else tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x * ((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) <= Inf) tmp = (x + -2.0) * ((z / t_0) + (t_1 / t_0)); 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]}, If[LessEqual[N[(N[(N[(x - 2.0), $MachinePrecision] * N[(t$95$1 + z), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], Infinity], 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[(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)\\
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(t_1 + z\right)}{t_0} \leq \infty:\\
\;\;\;\;\left(x + -2\right) \cdot \left(\frac{z}{t_0} + \frac{t_1}{t_0}\right)\\
\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 95.3%
*-commutative95.3%
associate-*l/97.7%
*-commutative97.7%
sub-neg97.7%
metadata-eval97.7%
Simplified97.7%
Taylor expanded in z around 0 97.7%
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)) Initial program 0.0%
associate-/l*0.0%
sub-neg0.0%
metadata-eval0.0%
fma-def0.0%
fma-def0.0%
fma-def0.0%
fma-def0.0%
fma-def0.0%
fma-def0.0%
fma-def0.0%
Simplified0.0%
Taylor expanded in x around inf 99.6%
Final simplification98.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(/
(*
(- x 2.0)
(+
(*
x
(+
(*
x
(+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
z))
(+
(*
x
(+
(* x (+ (* x (+ x 43.3400022514)) 263.505074721))
313.399215894))
47.066876606))))
(if (<= t_0 4e+297) t_0 (/ (+ x -2.0) 0.24013125253755718))))
double code(double x, double y, double z) {
double t_0 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
double tmp;
if (t_0 <= 4e+297) {
tmp = t_0;
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = ((x - 2.0d0) * ((x * ((x * ((x * ((x * 4.16438922228d0) + 78.6994924154d0)) + 137.519416416d0)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0)
if (t_0 <= 4d+297) then
tmp = t_0
else
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
double tmp;
if (t_0 <= 4e+297) {
tmp = t_0;
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
def code(x, y, z): t_0 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) tmp = 0 if t_0 <= 4e+297: tmp = t_0 else: tmp = (x + -2.0) / 0.24013125253755718 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) tmp = 0.0 if (t_0 <= 4e+297) tmp = t_0; else tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606); tmp = 0.0; if (t_0 <= 4e+297) tmp = t_0; else tmp = (x + -2.0) / 0.24013125253755718; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 4e+297], t$95$0, N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\\
\mathbf{if}\;t_0 \leq 4 \cdot 10^{+297}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < 4.0000000000000001e297Initial program 97.7%
if 4.0000000000000001e297 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) Initial program 0.2%
associate-/l*2.0%
sub-neg2.0%
metadata-eval2.0%
fma-def2.0%
fma-def2.0%
fma-def2.0%
fma-def2.0%
fma-def2.0%
fma-def2.0%
fma-def2.0%
Simplified2.0%
Taylor expanded in x around inf 96.9%
Final simplification97.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ (+ x -2.0) 0.24013125253755718))
(t_1
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606)))
(if (<= x -4.5e+42)
t_0
(if (<= x 1.05e-13)
(/ (* (- x 2.0) (+ z (* x (+ y (* x 137.519416416))))) t_1)
(if (<= x 2.7e+60)
(/
(+ x -2.0)
(/
t_1
(*
x
(+
(*
x
(+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))))
t_0)))))
double code(double x, double y, double z) {
double t_0 = (x + -2.0) / 0.24013125253755718;
double t_1 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double tmp;
if (x <= -4.5e+42) {
tmp = t_0;
} else if (x <= 1.05e-13) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / t_1;
} else if (x <= 2.7e+60) {
tmp = (x + -2.0) / (t_1 / (x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)));
} 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) :: t_1
real(8) :: tmp
t_0 = (x + (-2.0d0)) / 0.24013125253755718d0
t_1 = (x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0
if (x <= (-4.5d+42)) then
tmp = t_0
else if (x <= 1.05d-13) then
tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / t_1
else if (x <= 2.7d+60) then
tmp = (x + (-2.0d0)) / (t_1 / (x * ((x * ((x * ((x * 4.16438922228d0) + 78.6994924154d0)) + 137.519416416d0)) + y)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (x + -2.0) / 0.24013125253755718;
double t_1 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double tmp;
if (x <= -4.5e+42) {
tmp = t_0;
} else if (x <= 1.05e-13) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / t_1;
} else if (x <= 2.7e+60) {
tmp = (x + -2.0) / (t_1 / (x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = (x + -2.0) / 0.24013125253755718 t_1 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606 tmp = 0 if x <= -4.5e+42: tmp = t_0 elif x <= 1.05e-13: tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / t_1 elif x <= 2.7e+60: tmp = (x + -2.0) / (t_1 / (x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y))) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(x + -2.0) / 0.24013125253755718) t_1 = Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) tmp = 0.0 if (x <= -4.5e+42) tmp = t_0; elseif (x <= 1.05e-13) tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * 137.519416416))))) / t_1); elseif (x <= 2.7e+60) tmp = Float64(Float64(x + -2.0) / Float64(t_1 / Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x + -2.0) / 0.24013125253755718; t_1 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606; tmp = 0.0; if (x <= -4.5e+42) tmp = t_0; elseif (x <= 1.05e-13) tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / t_1; elseif (x <= 2.7e+60) tmp = (x + -2.0) / (t_1 / (x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y))); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]}, Block[{t$95$1 = 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[x, -4.5e+42], t$95$0, If[LessEqual[x, 1.05e-13], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * 137.519416416), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[x, 2.7e+60], N[(N[(x + -2.0), $MachinePrecision] / N[(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]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x + -2}{0.24013125253755718}\\
t_1 := x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606\\
\mathbf{if}\;x \leq -4.5 \cdot 10^{+42}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{-13}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{t_1}\\
\mathbf{elif}\;x \leq 2.7 \cdot 10^{+60}:\\
\;\;\;\;\frac{x + -2}{\frac{t_1}{x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right)}}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x < -4.50000000000000012e42 or 2.6999999999999999e60 < x Initial program 2.0%
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 98.7%
if -4.50000000000000012e42 < x < 1.04999999999999994e-13Initial program 99.6%
Taylor expanded in x around 0 98.3%
*-commutative98.3%
Simplified98.3%
if 1.04999999999999994e-13 < x < 2.6999999999999999e60Initial program 80.8%
associate-/l*86.9%
sub-neg86.9%
metadata-eval86.9%
fma-def86.9%
fma-def86.9%
fma-def86.9%
fma-def86.9%
fma-def86.9%
fma-def86.7%
fma-def86.7%
Simplified86.7%
Taylor expanded in z around 0 80.8%
Final simplification97.4%
(FPCore (x y z)
:precision binary64
(if (or (<= x -4.5e+42) (not (<= x 3e+37)))
(/ (+ 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 <= -4.5e+42) || !(x <= 3e+37)) {
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 <= (-4.5d+42)) .or. (.not. (x <= 3d+37))) 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 <= -4.5e+42) || !(x <= 3e+37)) {
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 <= -4.5e+42) or not (x <= 3e+37): 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 <= -4.5e+42) || !(x <= 3e+37)) 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 <= -4.5e+42) || ~((x <= 3e+37))) 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, -4.5e+42], N[Not[LessEqual[x, 3e+37]], $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 -4.5 \cdot 10^{+42} \lor \neg \left(x \leq 3 \cdot 10^{+37}\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 < -4.50000000000000012e42 or 3.00000000000000022e37 < x Initial program 3.8%
associate-/l*7.2%
sub-neg7.2%
metadata-eval7.2%
fma-def7.2%
fma-def7.2%
fma-def7.2%
fma-def7.2%
fma-def7.2%
fma-def7.2%
fma-def7.2%
Simplified7.2%
Taylor expanded in x around inf 96.2%
if -4.50000000000000012e42 < x < 3.00000000000000022e37Initial program 99.0%
Taylor expanded in x around 0 95.3%
*-commutative95.3%
Simplified95.3%
Final simplification95.7%
(FPCore (x y z)
:precision binary64
(if (or (<= x -4000000000000.0) (not (<= x 9.2e+23)))
(/ (+ x -2.0) 0.24013125253755718)
(*
(+ x -2.0)
(+
(* z 0.0212463641547976)
(/
(* x y)
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -4000000000000.0) || !(x <= 9.2e+23)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + ((x * y) / ((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 <= (-4000000000000.0d0)) .or. (.not. (x <= 9.2d+23))) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else
tmp = (x + (-2.0d0)) * ((z * 0.0212463641547976d0) + ((x * y) / ((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 <= -4000000000000.0) || !(x <= 9.2e+23)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + ((x * y) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -4000000000000.0) or not (x <= 9.2e+23): tmp = (x + -2.0) / 0.24013125253755718 else: tmp = (x + -2.0) * ((z * 0.0212463641547976) + ((x * y) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606))) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -4000000000000.0) || !(x <= 9.2e+23)) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); else tmp = Float64(Float64(x + -2.0) * Float64(Float64(z * 0.0212463641547976) + Float64(Float64(x * y) / 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 <= -4000000000000.0) || ~((x <= 9.2e+23))) tmp = (x + -2.0) / 0.24013125253755718; else tmp = (x + -2.0) * ((z * 0.0212463641547976) + ((x * y) / ((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, -4000000000000.0], N[Not[LessEqual[x, 9.2e+23]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(z * 0.0212463641547976), $MachinePrecision] + N[(N[(x * y), $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]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4000000000000 \lor \neg \left(x \leq 9.2 \cdot 10^{+23}\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976 + \frac{x \cdot y}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\right)\\
\end{array}
\end{array}
if x < -4e12 or 9.2000000000000002e23 < x Initial program 11.7%
associate-/l*14.8%
sub-neg14.8%
metadata-eval14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
Simplified14.8%
Taylor expanded in x around inf 91.8%
if -4e12 < x < 9.2000000000000002e23Initial program 99.0%
*-commutative99.0%
associate-*l/99.0%
*-commutative99.0%
sub-neg99.0%
metadata-eval99.0%
Simplified99.0%
Taylor expanded in z around 0 99.0%
Taylor expanded in y around inf 90.6%
Taylor expanded in x around 0 90.1%
Final simplification90.9%
(FPCore (x y z)
:precision binary64
(if (or (<= x -1.9e+16) (not (<= x 4.8e+20)))
(/ (+ x -2.0) 0.24013125253755718)
(+
(/
(* x (* (- x 2.0) y))
(+
(* x (+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
(* z -0.0424927283095952))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1.9e+16) || !(x <= 4.8e+20)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = ((x * ((x - 2.0) * y)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) + (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 <= (-1.9d+16)) .or. (.not. (x <= 4.8d+20))) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else
tmp = ((x * ((x - 2.0d0) * y)) / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0)) + (z * (-0.0424927283095952d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -1.9e+16) || !(x <= 4.8e+20)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = ((x * ((x - 2.0) * y)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) + (z * -0.0424927283095952);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1.9e+16) or not (x <= 4.8e+20): tmp = (x + -2.0) / 0.24013125253755718 else: tmp = ((x * ((x - 2.0) * y)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) + (z * -0.0424927283095952) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -1.9e+16) || !(x <= 4.8e+20)) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); else tmp = Float64(Float64(Float64(x * Float64(Float64(x - 2.0) * y)) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) + Float64(z * -0.0424927283095952)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -1.9e+16) || ~((x <= 4.8e+20))) tmp = (x + -2.0) / 0.24013125253755718; else tmp = ((x * ((x - 2.0) * y)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) + (z * -0.0424927283095952); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -1.9e+16], N[Not[LessEqual[x, 4.8e+20]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], N[(N[(N[(x * N[(N[(x - 2.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision] + N[(z * -0.0424927283095952), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.9 \cdot 10^{+16} \lor \neg \left(x \leq 4.8 \cdot 10^{+20}\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left(\left(x - 2\right) \cdot y\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606} + z \cdot -0.0424927283095952\\
\end{array}
\end{array}
if x < -1.9e16 or 4.8e20 < x Initial program 11.7%
associate-/l*14.8%
sub-neg14.8%
metadata-eval14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
Simplified14.8%
Taylor expanded in x around inf 91.8%
if -1.9e16 < x < 4.8e20Initial program 99.0%
*-commutative99.0%
associate-*l/99.0%
*-commutative99.0%
sub-neg99.0%
metadata-eval99.0%
Simplified99.0%
Taylor expanded in z around inf 99.0%
Taylor expanded in x around 0 98.5%
Taylor expanded in y around inf 90.2%
Final simplification90.9%
(FPCore (x y z)
:precision binary64
(if (<= x -16000000000.0)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 0.036)
(*
(+ x -2.0)
(+
(* z 0.0212463641547976)
(* x (- (* y 0.0212463641547976) (* z 0.14147091005106402)))))
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -16000000000.0) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 0.036) {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402))));
} else {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-16000000000.0d0)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 0.036d0) then
tmp = (x + (-2.0d0)) * ((z * 0.0212463641547976d0) + (x * ((y * 0.0212463641547976d0) - (z * 0.14147091005106402d0))))
else
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -16000000000.0) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 0.036) {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402))));
} else {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -16000000000.0: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 0.036: tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402)))) else: tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -16000000000.0) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 0.036) tmp = Float64(Float64(x + -2.0) * Float64(Float64(z * 0.0212463641547976) + Float64(x * Float64(Float64(y * 0.0212463641547976) - Float64(z * 0.14147091005106402))))); else tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -16000000000.0) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 0.036) tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402)))); else tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -16000000000.0], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 0.036], 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], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -16000000000:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 0.036:\\
\;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976 + x \cdot \left(y \cdot 0.0212463641547976 - z \cdot 0.14147091005106402\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\end{array}
\end{array}
if x < -1.6e10Initial program 12.3%
associate-/l*15.5%
sub-neg15.5%
metadata-eval15.5%
fma-def15.5%
fma-def15.5%
fma-def15.5%
fma-def15.5%
fma-def15.5%
fma-def15.5%
fma-def15.5%
Simplified15.5%
Taylor expanded in x around inf 93.0%
if -1.6e10 < x < 0.0359999999999999973Initial program 99.7%
*-commutative99.7%
associate-*l/99.7%
*-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 88.9%
if 0.0359999999999999973 < x Initial program 15.0%
associate-/l*17.7%
sub-neg17.7%
metadata-eval17.7%
fma-def17.7%
fma-def17.7%
fma-def17.7%
fma-def17.7%
fma-def17.7%
fma-def17.7%
fma-def17.7%
Simplified17.7%
Taylor expanded in x around inf 86.1%
associate-*r/86.1%
metadata-eval86.1%
Simplified86.1%
Final simplification89.1%
(FPCore (x y z)
:precision binary64
(if (<= x -0.196)
(/
(+ x -2.0)
(+
0.24013125253755718
(- (/ 5.86923874282773 x) (/ 55.572073733743466 (* x x)))))
(if (<= x 0.038)
(*
(+ x -2.0)
(+
(* z 0.0212463641547976)
(/ (* x y) (+ 47.066876606 (* x 313.399215894)))))
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.196) {
tmp = (x + -2.0) / (0.24013125253755718 + ((5.86923874282773 / x) - (55.572073733743466 / (x * x))));
} else if (x <= 0.038) {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + ((x * y) / (47.066876606 + (x * 313.399215894))));
} else {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-0.196d0)) then
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + ((5.86923874282773d0 / x) - (55.572073733743466d0 / (x * x))))
else if (x <= 0.038d0) then
tmp = (x + (-2.0d0)) * ((z * 0.0212463641547976d0) + ((x * y) / (47.066876606d0 + (x * 313.399215894d0))))
else
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -0.196) {
tmp = (x + -2.0) / (0.24013125253755718 + ((5.86923874282773 / x) - (55.572073733743466 / (x * x))));
} else if (x <= 0.038) {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + ((x * y) / (47.066876606 + (x * 313.399215894))));
} else {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -0.196: tmp = (x + -2.0) / (0.24013125253755718 + ((5.86923874282773 / x) - (55.572073733743466 / (x * x)))) elif x <= 0.038: tmp = (x + -2.0) * ((z * 0.0212463641547976) + ((x * y) / (47.066876606 + (x * 313.399215894)))) else: tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -0.196) tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(Float64(5.86923874282773 / x) - Float64(55.572073733743466 / Float64(x * x))))); elseif (x <= 0.038) tmp = Float64(Float64(x + -2.0) * Float64(Float64(z * 0.0212463641547976) + Float64(Float64(x * y) / Float64(47.066876606 + Float64(x * 313.399215894))))); else tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -0.196) tmp = (x + -2.0) / (0.24013125253755718 + ((5.86923874282773 / x) - (55.572073733743466 / (x * x)))); elseif (x <= 0.038) tmp = (x + -2.0) * ((z * 0.0212463641547976) + ((x * y) / (47.066876606 + (x * 313.399215894)))); else tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -0.196], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(N[(5.86923874282773 / x), $MachinePrecision] - N[(55.572073733743466 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 0.038], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(z * 0.0212463641547976), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] / N[(47.066876606 + N[(x * 313.399215894), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.196:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \left(\frac{5.86923874282773}{x} - \frac{55.572073733743466}{x \cdot x}\right)}\\
\mathbf{elif}\;x \leq 0.038:\\
\;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976 + \frac{x \cdot y}{47.066876606 + x \cdot 313.399215894}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\end{array}
\end{array}
if x < -0.19600000000000001Initial program 15.2%
associate-/l*18.4%
sub-neg18.4%
metadata-eval18.4%
fma-def18.4%
fma-def18.4%
fma-def18.4%
fma-def18.4%
fma-def18.4%
fma-def18.4%
fma-def18.4%
Simplified18.4%
Taylor expanded in x around inf 90.0%
associate--l+90.0%
associate-*r/90.0%
metadata-eval90.0%
associate-*r/90.0%
metadata-eval90.0%
unpow290.0%
Simplified90.0%
if -0.19600000000000001 < x < 0.0379999999999999991Initial program 99.7%
*-commutative99.7%
associate-*l/99.7%
*-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 99.7%
Taylor expanded in y around inf 92.4%
Taylor expanded in x around 0 91.6%
*-commutative67.0%
Simplified91.6%
Taylor expanded in x around 0 91.1%
if 0.0379999999999999991 < x Initial program 15.0%
associate-/l*17.7%
sub-neg17.7%
metadata-eval17.7%
fma-def17.7%
fma-def17.7%
fma-def17.7%
fma-def17.7%
fma-def17.7%
fma-def17.7%
fma-def17.7%
Simplified17.7%
Taylor expanded in x around inf 86.1%
associate-*r/86.1%
metadata-eval86.1%
Simplified86.1%
Final simplification89.5%
(FPCore (x y z) :precision binary64 (if (or (<= x -16000000000.0) (not (<= x 0.038))) (/ (+ x -2.0) 0.24013125253755718) (+ (* -0.0424927283095952 (* x y)) (* z -0.0424927283095952))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -16000000000.0) || !(x <= 0.038)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = (-0.0424927283095952 * (x * y)) + (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 <= (-16000000000.0d0)) .or. (.not. (x <= 0.038d0))) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else
tmp = ((-0.0424927283095952d0) * (x * y)) + (z * (-0.0424927283095952d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -16000000000.0) || !(x <= 0.038)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = (-0.0424927283095952 * (x * y)) + (z * -0.0424927283095952);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -16000000000.0) or not (x <= 0.038): tmp = (x + -2.0) / 0.24013125253755718 else: tmp = (-0.0424927283095952 * (x * y)) + (z * -0.0424927283095952) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -16000000000.0) || !(x <= 0.038)) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); else tmp = Float64(Float64(-0.0424927283095952 * Float64(x * y)) + Float64(z * -0.0424927283095952)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -16000000000.0) || ~((x <= 0.038))) tmp = (x + -2.0) / 0.24013125253755718; else tmp = (-0.0424927283095952 * (x * y)) + (z * -0.0424927283095952); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -16000000000.0], N[Not[LessEqual[x, 0.038]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], N[(N[(-0.0424927283095952 * N[(x * y), $MachinePrecision]), $MachinePrecision] + N[(z * -0.0424927283095952), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -16000000000 \lor \neg \left(x \leq 0.038\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{else}:\\
\;\;\;\;-0.0424927283095952 \cdot \left(x \cdot y\right) + z \cdot -0.0424927283095952\\
\end{array}
\end{array}
if x < -1.6e10 or 0.0379999999999999991 < x Initial program 13.7%
associate-/l*16.7%
sub-neg16.7%
metadata-eval16.7%
fma-def16.7%
fma-def16.7%
fma-def16.7%
fma-def16.7%
fma-def16.7%
fma-def16.7%
fma-def16.7%
Simplified16.7%
Taylor expanded in x around inf 89.2%
if -1.6e10 < x < 0.0379999999999999991Initial program 99.7%
*-commutative99.7%
associate-*l/99.7%
*-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 99.7%
Taylor expanded in x around 0 99.2%
Taylor expanded in x around 0 88.6%
Final simplification88.9%
(FPCore (x y z)
:precision binary64
(if (<= x -16000000000.0)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 0.038)
(+ (* -0.0424927283095952 (* x y)) (* z -0.0424927283095952))
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -16000000000.0) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 0.038) {
tmp = (-0.0424927283095952 * (x * y)) + (z * -0.0424927283095952);
} else {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-16000000000.0d0)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 0.038d0) then
tmp = ((-0.0424927283095952d0) * (x * y)) + (z * (-0.0424927283095952d0))
else
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -16000000000.0) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 0.038) {
tmp = (-0.0424927283095952 * (x * y)) + (z * -0.0424927283095952);
} else {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -16000000000.0: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 0.038: tmp = (-0.0424927283095952 * (x * y)) + (z * -0.0424927283095952) else: tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -16000000000.0) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 0.038) tmp = Float64(Float64(-0.0424927283095952 * Float64(x * y)) + Float64(z * -0.0424927283095952)); else tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -16000000000.0) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 0.038) tmp = (-0.0424927283095952 * (x * y)) + (z * -0.0424927283095952); else tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -16000000000.0], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 0.038], N[(N[(-0.0424927283095952 * N[(x * y), $MachinePrecision]), $MachinePrecision] + N[(z * -0.0424927283095952), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -16000000000:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 0.038:\\
\;\;\;\;-0.0424927283095952 \cdot \left(x \cdot y\right) + z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\end{array}
\end{array}
if x < -1.6e10Initial program 12.3%
associate-/l*15.5%
sub-neg15.5%
metadata-eval15.5%
fma-def15.5%
fma-def15.5%
fma-def15.5%
fma-def15.5%
fma-def15.5%
fma-def15.5%
fma-def15.5%
Simplified15.5%
Taylor expanded in x around inf 93.0%
if -1.6e10 < x < 0.0379999999999999991Initial program 99.7%
*-commutative99.7%
associate-*l/99.7%
*-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 99.7%
Taylor expanded in x around 0 99.2%
Taylor expanded in x around 0 88.6%
if 0.0379999999999999991 < x Initial program 15.0%
associate-/l*17.7%
sub-neg17.7%
metadata-eval17.7%
fma-def17.7%
fma-def17.7%
fma-def17.7%
fma-def17.7%
fma-def17.7%
fma-def17.7%
fma-def17.7%
Simplified17.7%
Taylor expanded in x around inf 86.1%
associate-*r/86.1%
metadata-eval86.1%
Simplified86.1%
Final simplification88.9%
(FPCore (x y z) :precision binary64 (if (or (<= x -5.9e-8) (not (<= x 2.3e-19))) (/ (+ x -2.0) 0.24013125253755718) (* (+ x -2.0) (* z 0.0212463641547976))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -5.9e-8) || !(x <= 2.3e-19)) {
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 <= (-5.9d-8)) .or. (.not. (x <= 2.3d-19))) 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 <= -5.9e-8) || !(x <= 2.3e-19)) {
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 <= -5.9e-8) or not (x <= 2.3e-19): 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 <= -5.9e-8) || !(x <= 2.3e-19)) 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 <= -5.9e-8) || ~((x <= 2.3e-19))) 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, -5.9e-8], N[Not[LessEqual[x, 2.3e-19]], $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 -5.9 \cdot 10^{-8} \lor \neg \left(x \leq 2.3 \cdot 10^{-19}\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 < -5.8999999999999999e-8 or 2.2999999999999998e-19 < x Initial program 21.2%
associate-/l*23.9%
sub-neg23.9%
metadata-eval23.9%
fma-def23.9%
fma-def23.9%
fma-def23.9%
fma-def23.9%
fma-def23.9%
fma-def23.9%
fma-def23.9%
Simplified23.9%
Taylor expanded in x around inf 81.8%
if -5.8999999999999999e-8 < x < 2.2999999999999998e-19Initial program 99.7%
*-commutative99.7%
associate-*l/99.7%
*-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 71.8%
Final simplification77.2%
(FPCore (x y z) :precision binary64 (if (or (<= x -5.9e-8) (not (<= x 2.3e-19))) (/ (+ x -2.0) 0.24013125253755718) (/ (* (- x 2.0) z) 47.066876606)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -5.9e-8) || !(x <= 2.3e-19)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = ((x - 2.0) * z) / 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 <= (-5.9d-8)) .or. (.not. (x <= 2.3d-19))) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else
tmp = ((x - 2.0d0) * z) / 47.066876606d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -5.9e-8) || !(x <= 2.3e-19)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = ((x - 2.0) * z) / 47.066876606;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -5.9e-8) or not (x <= 2.3e-19): tmp = (x + -2.0) / 0.24013125253755718 else: tmp = ((x - 2.0) * z) / 47.066876606 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -5.9e-8) || !(x <= 2.3e-19)) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); else tmp = Float64(Float64(Float64(x - 2.0) * z) / 47.066876606); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -5.9e-8) || ~((x <= 2.3e-19))) tmp = (x + -2.0) / 0.24013125253755718; else tmp = ((x - 2.0) * z) / 47.066876606; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -5.9e-8], N[Not[LessEqual[x, 2.3e-19]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], N[(N[(N[(x - 2.0), $MachinePrecision] * z), $MachinePrecision] / 47.066876606), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.9 \cdot 10^{-8} \lor \neg \left(x \leq 2.3 \cdot 10^{-19}\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot z}{47.066876606}\\
\end{array}
\end{array}
if x < -5.8999999999999999e-8 or 2.2999999999999998e-19 < x Initial program 21.2%
associate-/l*23.9%
sub-neg23.9%
metadata-eval23.9%
fma-def23.9%
fma-def23.9%
fma-def23.9%
fma-def23.9%
fma-def23.9%
fma-def23.9%
fma-def23.9%
Simplified23.9%
Taylor expanded in x around inf 81.8%
if -5.8999999999999999e-8 < x < 2.2999999999999998e-19Initial program 99.7%
*-commutative99.7%
associate-*l/99.7%
*-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 72.4%
Taylor expanded in x around 0 72.4%
*-commutative72.4%
Simplified72.4%
Taylor expanded in x around 0 72.0%
Final simplification77.3%
(FPCore (x y z) :precision binary64 (if (or (<= x -5.9e-8) (not (<= x 2.3e-19))) (- (* x 4.16438922228) 110.1139242984811) (* z -0.0424927283095952)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -5.9e-8) || !(x <= 2.3e-19)) {
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 <= (-5.9d-8)) .or. (.not. (x <= 2.3d-19))) 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 <= -5.9e-8) || !(x <= 2.3e-19)) {
tmp = (x * 4.16438922228) - 110.1139242984811;
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -5.9e-8) or not (x <= 2.3e-19): tmp = (x * 4.16438922228) - 110.1139242984811 else: tmp = z * -0.0424927283095952 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -5.9e-8) || !(x <= 2.3e-19)) 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 <= -5.9e-8) || ~((x <= 2.3e-19))) tmp = (x * 4.16438922228) - 110.1139242984811; else tmp = z * -0.0424927283095952; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -5.9e-8], N[Not[LessEqual[x, 2.3e-19]], $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 -5.9 \cdot 10^{-8} \lor \neg \left(x \leq 2.3 \cdot 10^{-19}\right):\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\
\mathbf{else}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\end{array}
\end{array}
if x < -5.8999999999999999e-8 or 2.2999999999999998e-19 < x Initial program 21.2%
*-commutative21.2%
associate-*l/23.9%
*-commutative23.9%
sub-neg23.9%
metadata-eval23.9%
Simplified23.9%
Taylor expanded in x around inf 81.3%
if -5.8999999999999999e-8 < x < 2.2999999999999998e-19Initial program 99.7%
*-commutative99.7%
associate-*l/99.7%
*-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 71.8%
*-commutative71.8%
Simplified71.8%
Final simplification76.9%
(FPCore (x y z) :precision binary64 (if (or (<= x -5.9e-8) (not (<= x 2.3e-19))) (/ (+ x -2.0) 0.24013125253755718) (* z -0.0424927283095952)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -5.9e-8) || !(x <= 2.3e-19)) {
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 <= (-5.9d-8)) .or. (.not. (x <= 2.3d-19))) 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 <= -5.9e-8) || !(x <= 2.3e-19)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -5.9e-8) or not (x <= 2.3e-19): tmp = (x + -2.0) / 0.24013125253755718 else: tmp = z * -0.0424927283095952 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -5.9e-8) || !(x <= 2.3e-19)) 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 <= -5.9e-8) || ~((x <= 2.3e-19))) tmp = (x + -2.0) / 0.24013125253755718; else tmp = z * -0.0424927283095952; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -5.9e-8], N[Not[LessEqual[x, 2.3e-19]], $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 -5.9 \cdot 10^{-8} \lor \neg \left(x \leq 2.3 \cdot 10^{-19}\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{else}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\end{array}
\end{array}
if x < -5.8999999999999999e-8 or 2.2999999999999998e-19 < x Initial program 21.2%
associate-/l*23.9%
sub-neg23.9%
metadata-eval23.9%
fma-def23.9%
fma-def23.9%
fma-def23.9%
fma-def23.9%
fma-def23.9%
fma-def23.9%
fma-def23.9%
Simplified23.9%
Taylor expanded in x around inf 81.8%
if -5.8999999999999999e-8 < x < 2.2999999999999998e-19Initial program 99.7%
*-commutative99.7%
associate-*l/99.7%
*-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 71.8%
*-commutative71.8%
Simplified71.8%
Final simplification77.2%
(FPCore (x y z) :precision binary64 (if (<= x -5.9e-8) (* 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 <= -5.9e-8) {
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 <= (-5.9d-8)) 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 <= -5.9e-8) {
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 <= -5.9e-8: 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 <= -5.9e-8) 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 <= -5.9e-8) 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, -5.9e-8], 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 -5.9 \cdot 10^{-8}:\\
\;\;\;\;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 < -5.8999999999999999e-8 or 2 < x Initial program 16.4%
*-commutative16.4%
associate-*l/19.2%
*-commutative19.2%
sub-neg19.2%
metadata-eval19.2%
Simplified19.2%
Taylor expanded in x around inf 86.1%
Taylor expanded in x around inf 86.1%
*-commutative86.1%
Simplified86.1%
if -5.8999999999999999e-8 < x < 2Initial program 99.7%
*-commutative99.7%
associate-*l/99.7%
*-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 67.6%
*-commutative67.6%
Simplified67.6%
Final simplification76.9%
(FPCore (x y z) :precision binary64 (* x -0.3407596943375357))
double code(double x, double y, double z) {
return x * -0.3407596943375357;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x * (-0.3407596943375357d0)
end function
public static double code(double x, double y, double z) {
return x * -0.3407596943375357;
}
def code(x, y, z): return x * -0.3407596943375357
function code(x, y, z) return Float64(x * -0.3407596943375357) end
function tmp = code(x, y, z) tmp = x * -0.3407596943375357; end
code[x_, y_, z_] := N[(x * -0.3407596943375357), $MachinePrecision]
\begin{array}{l}
\\
x \cdot -0.3407596943375357
\end{array}
Initial program 57.7%
associate-/l*59.1%
sub-neg59.1%
metadata-eval59.1%
fma-def59.1%
fma-def59.1%
fma-def59.1%
fma-def59.1%
fma-def59.1%
fma-def59.1%
fma-def59.1%
Simplified59.1%
Taylor expanded in x around inf 45.4%
Taylor expanded in x around 0 2.3%
*-commutative2.3%
Simplified2.3%
Final simplification2.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 57.7%
*-commutative57.7%
associate-*l/59.2%
*-commutative59.2%
sub-neg59.2%
metadata-eval59.2%
Simplified59.2%
Taylor expanded in x around inf 45.0%
Taylor expanded in x around inf 45.1%
*-commutative45.1%
Simplified45.1%
Final simplification45.1%
(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 2023271
(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)))