
(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 20 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
(let* ((t_0
(fma
(fma (fma (+ x 43.3400022514) x 263.505074721) x 313.399215894)
x
47.066876606)))
(if (<=
(/
(*
(- x 2.0)
(+
(*
x
(+
(*
x
(+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
z))
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
2e+294)
(+
(* (/ z t_0) (+ x -2.0))
(/
(+
y
(*
x
(+
137.519416416
(* x (+ 78.6994924154 (* x (cbrt 72.2194108904232)))))))
(/ t_0 (* x (+ x -2.0)))))
(+
(fma x 4.16438922228 -110.1139242984811)
(+ (/ 3655.1204654076414 x) (/ (- y 130977.50649958357) (* x x)))))))
double code(double x, double y, double z) {
double t_0 = fma(fma(fma((x + 43.3400022514), x, 263.505074721), x, 313.399215894), x, 47.066876606);
double tmp;
if ((((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= 2e+294) {
tmp = ((z / t_0) * (x + -2.0)) + ((y + (x * (137.519416416 + (x * (78.6994924154 + (x * cbrt(72.2194108904232))))))) / (t_0 / (x * (x + -2.0))));
} else {
tmp = fma(x, 4.16438922228, -110.1139242984811) + ((3655.1204654076414 / x) + ((y - 130977.50649958357) / (x * x)));
}
return tmp;
}
function code(x, y, z) t_0 = fma(fma(fma(Float64(x + 43.3400022514), x, 263.505074721), x, 313.399215894), x, 47.066876606) tmp = 0.0 if (Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= 2e+294) tmp = Float64(Float64(Float64(z / t_0) * Float64(x + -2.0)) + Float64(Float64(y + Float64(x * Float64(137.519416416 + Float64(x * Float64(78.6994924154 + Float64(x * cbrt(72.2194108904232))))))) / Float64(t_0 / Float64(x * Float64(x + -2.0))))); else tmp = Float64(fma(x, 4.16438922228, -110.1139242984811) + Float64(Float64(3655.1204654076414 / x) + Float64(Float64(y - 130977.50649958357) / Float64(x * x)))); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(x + 43.3400022514), $MachinePrecision] * x + 263.505074721), $MachinePrecision] * x + 313.399215894), $MachinePrecision] * x + 47.066876606), $MachinePrecision]}, If[LessEqual[N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision], 2e+294], N[(N[(N[(z / t$95$0), $MachinePrecision] * N[(x + -2.0), $MachinePrecision]), $MachinePrecision] + N[(N[(y + N[(x * N[(137.519416416 + N[(x * N[(78.6994924154 + N[(x * N[Power[72.2194108904232, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$0 / N[(x * N[(x + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 4.16438922228 + -110.1139242984811), $MachinePrecision] + N[(N[(3655.1204654076414 / x), $MachinePrecision] + N[(N[(y - 130977.50649958357), $MachinePrecision] / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), x, 47.066876606\right)\\
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606} \leq 2 \cdot 10^{+294}:\\
\;\;\;\;\frac{z}{t_0} \cdot \left(x + -2\right) + \frac{y + x \cdot \left(137.519416416 + x \cdot \left(78.6994924154 + x \cdot \sqrt[3]{72.2194108904232}\right)\right)}{\frac{t_0}{x \cdot \left(x + -2\right)}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, 4.16438922228, -110.1139242984811\right) + \left(\frac{3655.1204654076414}{x} + \frac{y - 130977.50649958357}{x \cdot x}\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < 2.00000000000000013e294Initial program 96.4%
add-cbrt-cube96.4%
Applied egg-rr96.4%
Taylor expanded in z around inf 96.3%
Simplified99.4%
if 2.00000000000000013e294 < (/.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/2.9%
sub-neg2.9%
metadata-eval2.9%
*-commutative2.9%
fma-def2.9%
*-commutative2.9%
fma-def2.9%
*-commutative2.9%
fma-def2.9%
fma-def2.9%
*-commutative2.9%
Simplified2.9%
Taylor expanded in x around -inf 99.2%
sub-neg99.2%
+-commutative99.2%
+-commutative99.2%
*-commutative99.2%
associate-+l+99.2%
associate-+r+99.2%
+-commutative99.2%
fma-def99.2%
metadata-eval99.2%
mul-1-neg99.2%
unsub-neg99.2%
associate-*r/99.2%
metadata-eval99.2%
mul-1-neg99.2%
unsub-neg99.2%
unpow299.2%
Simplified99.2%
Final simplification99.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
(t_1
(*
x
(+
(* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))))
(if (<= (/ (* (- x 2.0) (+ t_1 z)) t_0) 2e+294)
(*
(+ x -2.0)
(+
(/ t_1 t_0)
(/
z
(+
47.066876606
(+
(* x 313.399215894)
(+
(* 43.3400022514 (pow x 3.0))
(+ (* 263.505074721 (pow x 2.0)) (pow x 4.0))))))))
(+
(fma x 4.16438922228 -110.1139242984811)
(+ (/ 3655.1204654076414 x) (/ (- y 130977.50649958357) (* x x)))))))
double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double t_1 = x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y);
double tmp;
if ((((x - 2.0) * (t_1 + z)) / t_0) <= 2e+294) {
tmp = (x + -2.0) * ((t_1 / t_0) + (z / (47.066876606 + ((x * 313.399215894) + ((43.3400022514 * pow(x, 3.0)) + ((263.505074721 * pow(x, 2.0)) + pow(x, 4.0)))))));
} else {
tmp = fma(x, 4.16438922228, -110.1139242984811) + ((3655.1204654076414 / x) + ((y - 130977.50649958357) / (x * x)));
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) t_1 = Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) tmp = 0.0 if (Float64(Float64(Float64(x - 2.0) * Float64(t_1 + z)) / t_0) <= 2e+294) tmp = Float64(Float64(x + -2.0) * Float64(Float64(t_1 / t_0) + Float64(z / Float64(47.066876606 + Float64(Float64(x * 313.399215894) + Float64(Float64(43.3400022514 * (x ^ 3.0)) + Float64(Float64(263.505074721 * (x ^ 2.0)) + (x ^ 4.0)))))))); else tmp = Float64(fma(x, 4.16438922228, -110.1139242984811) + Float64(Float64(3655.1204654076414 / x) + Float64(Float64(y - 130977.50649958357) / Float64(x * x)))); 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], 2e+294], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(t$95$1 / t$95$0), $MachinePrecision] + N[(z / N[(47.066876606 + N[(N[(x * 313.399215894), $MachinePrecision] + N[(N[(43.3400022514 * N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(N[(263.505074721 * N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[Power[x, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 4.16438922228 + -110.1139242984811), $MachinePrecision] + N[(N[(3655.1204654076414 / x), $MachinePrecision] + N[(N[(y - 130977.50649958357), $MachinePrecision] / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606\\
t_1 := x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right)\\
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(t_1 + z\right)}{t_0} \leq 2 \cdot 10^{+294}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(\frac{t_1}{t_0} + \frac{z}{47.066876606 + \left(x \cdot 313.399215894 + \left(43.3400022514 \cdot {x}^{3} + \left(263.505074721 \cdot {x}^{2} + {x}^{4}\right)\right)\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, 4.16438922228, -110.1139242984811\right) + \left(\frac{3655.1204654076414}{x} + \frac{y - 130977.50649958357}{x \cdot x}\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < 2.00000000000000013e294Initial program 96.4%
associate-*r/98.2%
sub-neg98.2%
metadata-eval98.2%
*-commutative98.2%
fma-def98.2%
*-commutative98.2%
fma-def98.2%
*-commutative98.2%
fma-def98.2%
fma-def98.2%
*-commutative98.2%
Simplified98.2%
Taylor expanded in z around 0 98.2%
Taylor expanded in x around 0 98.2%
if 2.00000000000000013e294 < (/.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/2.9%
sub-neg2.9%
metadata-eval2.9%
*-commutative2.9%
fma-def2.9%
*-commutative2.9%
fma-def2.9%
*-commutative2.9%
fma-def2.9%
fma-def2.9%
*-commutative2.9%
Simplified2.9%
Taylor expanded in x around -inf 99.2%
sub-neg99.2%
+-commutative99.2%
+-commutative99.2%
*-commutative99.2%
associate-+l+99.2%
associate-+r+99.2%
+-commutative99.2%
fma-def99.2%
metadata-eval99.2%
mul-1-neg99.2%
unsub-neg99.2%
associate-*r/99.2%
metadata-eval99.2%
mul-1-neg99.2%
unsub-neg99.2%
unpow299.2%
Simplified99.2%
Final simplification98.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
(t_1
(*
x
(+
(* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))))
(if (<= (/ (* (- x 2.0) (+ t_1 z)) t_0) 2e+294)
(* (+ x -2.0) (+ (/ t_1 t_0) (/ z t_0)))
(+
(fma x 4.16438922228 -110.1139242984811)
(+ (/ 3655.1204654076414 x) (/ (- y 130977.50649958357) (* x x)))))))
double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double t_1 = x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y);
double tmp;
if ((((x - 2.0) * (t_1 + z)) / t_0) <= 2e+294) {
tmp = (x + -2.0) * ((t_1 / t_0) + (z / t_0));
} else {
tmp = fma(x, 4.16438922228, -110.1139242984811) + ((3655.1204654076414 / x) + ((y - 130977.50649958357) / (x * x)));
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) t_1 = Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) tmp = 0.0 if (Float64(Float64(Float64(x - 2.0) * Float64(t_1 + z)) / t_0) <= 2e+294) tmp = Float64(Float64(x + -2.0) * Float64(Float64(t_1 / t_0) + Float64(z / t_0))); else tmp = Float64(fma(x, 4.16438922228, -110.1139242984811) + Float64(Float64(3655.1204654076414 / x) + Float64(Float64(y - 130977.50649958357) / Float64(x * x)))); 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], 2e+294], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(t$95$1 / t$95$0), $MachinePrecision] + N[(z / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 4.16438922228 + -110.1139242984811), $MachinePrecision] + N[(N[(3655.1204654076414 / x), $MachinePrecision] + N[(N[(y - 130977.50649958357), $MachinePrecision] / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606\\
t_1 := x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right)\\
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(t_1 + z\right)}{t_0} \leq 2 \cdot 10^{+294}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(\frac{t_1}{t_0} + \frac{z}{t_0}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, 4.16438922228, -110.1139242984811\right) + \left(\frac{3655.1204654076414}{x} + \frac{y - 130977.50649958357}{x \cdot x}\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < 2.00000000000000013e294Initial program 96.4%
associate-*r/98.2%
sub-neg98.2%
metadata-eval98.2%
*-commutative98.2%
fma-def98.2%
*-commutative98.2%
fma-def98.2%
*-commutative98.2%
fma-def98.2%
fma-def98.2%
*-commutative98.2%
Simplified98.2%
Taylor expanded in z around 0 98.2%
if 2.00000000000000013e294 < (/.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/2.9%
sub-neg2.9%
metadata-eval2.9%
*-commutative2.9%
fma-def2.9%
*-commutative2.9%
fma-def2.9%
*-commutative2.9%
fma-def2.9%
fma-def2.9%
*-commutative2.9%
Simplified2.9%
Taylor expanded in x around -inf 99.2%
sub-neg99.2%
+-commutative99.2%
+-commutative99.2%
*-commutative99.2%
associate-+l+99.2%
associate-+r+99.2%
+-commutative99.2%
fma-def99.2%
metadata-eval99.2%
mul-1-neg99.2%
unsub-neg99.2%
associate-*r/99.2%
metadata-eval99.2%
mul-1-neg99.2%
unsub-neg99.2%
unpow299.2%
Simplified99.2%
Final simplification98.6%
(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) (+ (/ t_1 t_0) (/ z t_0)))
(* x 4.16438922228))))
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) * ((t_1 / t_0) + (z / t_0));
} else {
tmp = x * 4.16438922228;
}
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) * ((t_1 / t_0) + (z / t_0));
} else {
tmp = x * 4.16438922228;
}
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) * ((t_1 / t_0) + (z / t_0)) else: tmp = x * 4.16438922228 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(t_1 / t_0) + Float64(z / t_0))); else tmp = Float64(x * 4.16438922228); 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) * ((t_1 / t_0) + (z / t_0)); else tmp = x * 4.16438922228; 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[(t$95$1 / t$95$0), $MachinePrecision] + N[(z / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * 4.16438922228), $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{t_1}{t_0} + \frac{z}{t_0}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228\\
\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 94.6%
associate-*r/98.2%
sub-neg98.2%
metadata-eval98.2%
*-commutative98.2%
fma-def98.2%
*-commutative98.2%
fma-def98.2%
*-commutative98.2%
fma-def98.2%
fma-def98.2%
*-commutative98.2%
Simplified98.2%
Taylor expanded in z around 0 98.2%
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-*r/0.0%
sub-neg0.0%
metadata-eval0.0%
*-commutative0.0%
fma-def0.0%
*-commutative0.0%
fma-def0.0%
*-commutative0.0%
fma-def0.0%
fma-def0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x around inf 99.2%
*-commutative99.2%
Simplified99.2%
Final simplification98.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
(t_1
(/
(*
(- x 2.0)
(+
(*
x
(+
(*
x
(+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
z))
t_0)))
(if (<= t_1 4e+238)
t_1
(+
(* (- x 2.0) 4.16438922228)
(*
z
(-
(/
x
(+
47.066876606
(* x (+ 313.399215894 (* (+ x 43.3400022514) (* x x))))))
(* 2.0 (/ 1.0 t_0))))))))
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 - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0;
double tmp;
if (t_1 <= 4e+238) {
tmp = t_1;
} else {
tmp = ((x - 2.0) * 4.16438922228) + (z * ((x / (47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (x * x)))))) - (2.0 * (1.0 / 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 * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0
t_1 = ((x - 2.0d0) * ((x * ((x * ((x * ((x * 4.16438922228d0) + 78.6994924154d0)) + 137.519416416d0)) + y)) + z)) / t_0
if (t_1 <= 4d+238) then
tmp = t_1
else
tmp = ((x - 2.0d0) * 4.16438922228d0) + (z * ((x / (47.066876606d0 + (x * (313.399215894d0 + ((x + 43.3400022514d0) * (x * x)))))) - (2.0d0 * (1.0d0 / t_0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double t_1 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0;
double tmp;
if (t_1 <= 4e+238) {
tmp = t_1;
} else {
tmp = ((x - 2.0) * 4.16438922228) + (z * ((x / (47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (x * x)))))) - (2.0 * (1.0 / t_0))));
}
return tmp;
}
def code(x, y, z): t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606 t_1 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0 tmp = 0 if t_1 <= 4e+238: tmp = t_1 else: tmp = ((x - 2.0) * 4.16438922228) + (z * ((x / (47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (x * x)))))) - (2.0 * (1.0 / t_0)))) 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(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0) tmp = 0.0 if (t_1 <= 4e+238) tmp = t_1; else tmp = Float64(Float64(Float64(x - 2.0) * 4.16438922228) + Float64(z * Float64(Float64(x / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(Float64(x + 43.3400022514) * Float64(x * x)))))) - Float64(2.0 * Float64(1.0 / t_0))))); 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 - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0; tmp = 0.0; if (t_1 <= 4e+238) tmp = t_1; else tmp = ((x - 2.0) * 4.16438922228) + (z * ((x / (47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (x * x)))))) - (2.0 * (1.0 / t_0)))); 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[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[t$95$1, 4e+238], t$95$1, N[(N[(N[(x - 2.0), $MachinePrecision] * 4.16438922228), $MachinePrecision] + N[(z * N[(N[(x / N[(47.066876606 + N[(x * N[(313.399215894 + N[(N[(x + 43.3400022514), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[(1.0 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606\\
t_1 := \frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{t_0}\\
\mathbf{if}\;t_1 \leq 4 \cdot 10^{+238}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\left(x - 2\right) \cdot 4.16438922228 + z \cdot \left(\frac{x}{47.066876606 + x \cdot \left(313.399215894 + \left(x + 43.3400022514\right) \cdot \left(x \cdot x\right)\right)} - 2 \cdot \frac{1}{t_0}\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.0000000000000002e238Initial program 96.3%
if 4.0000000000000002e238 < (/.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 3.8%
associate-*r/6.4%
sub-neg6.4%
metadata-eval6.4%
*-commutative6.4%
fma-def6.4%
*-commutative6.4%
fma-def6.4%
*-commutative6.4%
fma-def6.4%
fma-def6.4%
*-commutative6.4%
Simplified6.4%
Taylor expanded in z around 0 6.4%
Taylor expanded in x around inf 98.3%
Taylor expanded in z around 0 98.3%
Taylor expanded in x around inf 60.7%
cube-mult60.7%
unpow260.7%
distribute-rgt-out98.3%
unpow298.3%
+-commutative98.3%
Simplified98.3%
Final simplification97.2%
(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+238)
t_0
(*
(+ x -2.0)
(+
4.16438922228
(/
z
(+
47.066876606
(* x (+ 313.399215894 (* (+ x 43.3400022514) (* x x)))))))))))
double code(double x, double y, double z) {
double t_0 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
double tmp;
if (t_0 <= 4e+238) {
tmp = t_0;
} else {
tmp = (x + -2.0) * (4.16438922228 + (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) :: 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+238) then
tmp = t_0
else
tmp = (x + (-2.0d0)) * (4.16438922228d0 + (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 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+238) {
tmp = t_0;
} else {
tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (x * x)))))));
}
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+238: tmp = t_0 else: tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (x * x))))))) return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) tmp = 0.0 if (t_0 <= 4e+238) tmp = t_0; else tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(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) 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+238) tmp = t_0; else tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (x * x))))))); 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+238], t$95$0, N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(z / N[(47.066876606 + N[(x * N[(313.399215894 + N[(N[(x + 43.3400022514), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\\
\mathbf{if}\;t_0 \leq 4 \cdot 10^{+238}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{z}{47.066876606 + x \cdot \left(313.399215894 + \left(x + 43.3400022514\right) \cdot \left(x \cdot x\right)\right)}\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.0000000000000002e238Initial program 96.3%
if 4.0000000000000002e238 < (/.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 3.8%
associate-*r/6.4%
sub-neg6.4%
metadata-eval6.4%
*-commutative6.4%
fma-def6.4%
*-commutative6.4%
fma-def6.4%
*-commutative6.4%
fma-def6.4%
fma-def6.4%
*-commutative6.4%
Simplified6.4%
Taylor expanded in z around 0 6.4%
Taylor expanded in x around inf 98.3%
Taylor expanded in x around inf 60.7%
cube-mult60.7%
unpow260.7%
distribute-rgt-out98.3%
unpow298.3%
+-commutative98.3%
Simplified98.3%
Final simplification97.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606)))
(if (<= x -2.9e+16)
(*
(+ x -2.0)
(+
4.16438922228
(/
z
(+
47.066876606
(* x (+ 313.399215894 (* (+ x 43.3400022514) (* x x))))))))
(if (<= x 35.0)
(/ (* (- x 2.0) (+ z (* x (+ y (* x 137.519416416))))) t_0)
(* (+ x -2.0) (+ 4.16438922228 (/ z t_0)))))))
double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double tmp;
if (x <= -2.9e+16) {
tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (x * x)))))));
} else if (x <= 35.0) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / t_0;
} else {
tmp = (x + -2.0) * (4.16438922228 + (z / 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 = (x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0
if (x <= (-2.9d+16)) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 + (z / (47.066876606d0 + (x * (313.399215894d0 + ((x + 43.3400022514d0) * (x * x)))))))
else if (x <= 35.0d0) then
tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / t_0
else
tmp = (x + (-2.0d0)) * (4.16438922228d0 + (z / t_0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double tmp;
if (x <= -2.9e+16) {
tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (x * x)))))));
} else if (x <= 35.0) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / t_0;
} else {
tmp = (x + -2.0) * (4.16438922228 + (z / t_0));
}
return tmp;
}
def code(x, y, z): t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606 tmp = 0 if x <= -2.9e+16: tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (x * x))))))) elif x <= 35.0: tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / t_0 else: tmp = (x + -2.0) * (4.16438922228 + (z / t_0)) return tmp
function code(x, y, z) t_0 = Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) tmp = 0.0 if (x <= -2.9e+16) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(z / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(Float64(x + 43.3400022514) * Float64(x * x)))))))); elseif (x <= 35.0) tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * 137.519416416))))) / t_0); else tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(z / t_0))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606; tmp = 0.0; if (x <= -2.9e+16) tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (x * x))))))); elseif (x <= 35.0) tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / t_0; else tmp = (x + -2.0) * (4.16438922228 + (z / t_0)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]}, If[LessEqual[x, -2.9e+16], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(z / N[(47.066876606 + N[(x * N[(313.399215894 + N[(N[(x + 43.3400022514), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 35.0], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * 137.519416416), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(z / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606\\
\mathbf{if}\;x \leq -2.9 \cdot 10^{+16}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{z}{47.066876606 + x \cdot \left(313.399215894 + \left(x + 43.3400022514\right) \cdot \left(x \cdot x\right)\right)}\right)\\
\mathbf{elif}\;x \leq 35:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{z}{t_0}\right)\\
\end{array}
\end{array}
if x < -2.9e16Initial program 17.0%
associate-*r/20.9%
sub-neg20.9%
metadata-eval20.9%
*-commutative20.9%
fma-def20.9%
*-commutative20.9%
fma-def20.9%
*-commutative20.9%
fma-def20.9%
fma-def20.9%
*-commutative20.9%
Simplified20.9%
Taylor expanded in z around 0 20.9%
Taylor expanded in x around inf 95.5%
Taylor expanded in x around inf 38.2%
cube-mult38.2%
unpow238.2%
distribute-rgt-out95.5%
unpow295.5%
+-commutative95.5%
Simplified95.5%
if -2.9e16 < x < 35Initial program 99.7%
Taylor expanded in x around 0 99.4%
*-commutative99.4%
Simplified99.4%
if 35 < x Initial program 16.7%
associate-*r/21.4%
sub-neg21.4%
metadata-eval21.4%
*-commutative21.4%
fma-def21.4%
*-commutative21.4%
fma-def21.4%
*-commutative21.4%
fma-def21.4%
fma-def21.4%
*-commutative21.4%
Simplified21.4%
Taylor expanded in z around 0 21.4%
Taylor expanded in x around inf 91.7%
Final simplification96.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
47.066876606
(* x (+ 313.399215894 (* (+ x 43.3400022514) (* x x)))))))
(if (<= x -3.9e+16)
(* (+ x -2.0) (+ 4.16438922228 (/ z t_0)))
(if (<= x 0.0065)
(/ (* (- x 2.0) (+ z (* x (+ y (* x 137.519416416))))) t_0)
(*
(+ x -2.0)
(+
4.16438922228
(/
z
(+
(*
x
(+
(* x (+ (* x (+ x 43.3400022514)) 263.505074721))
313.399215894))
47.066876606))))))))
double code(double x, double y, double z) {
double t_0 = 47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (x * x))));
double tmp;
if (x <= -3.9e+16) {
tmp = (x + -2.0) * (4.16438922228 + (z / t_0));
} else if (x <= 0.0065) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / t_0;
} else {
tmp = (x + -2.0) * (4.16438922228 + (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) :: t_0
real(8) :: tmp
t_0 = 47.066876606d0 + (x * (313.399215894d0 + ((x + 43.3400022514d0) * (x * x))))
if (x <= (-3.9d+16)) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 + (z / t_0))
else if (x <= 0.0065d0) then
tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / t_0
else
tmp = (x + (-2.0d0)) * (4.16438922228d0 + (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 t_0 = 47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (x * x))));
double tmp;
if (x <= -3.9e+16) {
tmp = (x + -2.0) * (4.16438922228 + (z / t_0));
} else if (x <= 0.0065) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / t_0;
} else {
tmp = (x + -2.0) * (4.16438922228 + (z / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)));
}
return tmp;
}
def code(x, y, z): t_0 = 47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (x * x)))) tmp = 0 if x <= -3.9e+16: tmp = (x + -2.0) * (4.16438922228 + (z / t_0)) elif x <= 0.0065: tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / t_0 else: tmp = (x + -2.0) * (4.16438922228 + (z / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606))) return tmp
function code(x, y, z) t_0 = Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(Float64(x + 43.3400022514) * Float64(x * x))))) tmp = 0.0 if (x <= -3.9e+16) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(z / t_0))); elseif (x <= 0.0065) tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * 137.519416416))))) / t_0); else tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(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) t_0 = 47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (x * x)))); tmp = 0.0; if (x <= -3.9e+16) tmp = (x + -2.0) * (4.16438922228 + (z / t_0)); elseif (x <= 0.0065) tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / t_0; else tmp = (x + -2.0) * (4.16438922228 + (z / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(47.066876606 + N[(x * N[(313.399215894 + N[(N[(x + 43.3400022514), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.9e+16], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(z / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 0.0065], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * 137.519416416), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(z / 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}
t_0 := 47.066876606 + x \cdot \left(313.399215894 + \left(x + 43.3400022514\right) \cdot \left(x \cdot x\right)\right)\\
\mathbf{if}\;x \leq -3.9 \cdot 10^{+16}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{z}{t_0}\right)\\
\mathbf{elif}\;x \leq 0.0065:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{z}{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 < -3.9e16Initial program 17.0%
associate-*r/20.9%
sub-neg20.9%
metadata-eval20.9%
*-commutative20.9%
fma-def20.9%
*-commutative20.9%
fma-def20.9%
*-commutative20.9%
fma-def20.9%
fma-def20.9%
*-commutative20.9%
Simplified20.9%
Taylor expanded in z around 0 20.9%
Taylor expanded in x around inf 95.5%
Taylor expanded in x around inf 38.2%
cube-mult38.2%
unpow238.2%
distribute-rgt-out95.5%
unpow295.5%
+-commutative95.5%
Simplified95.5%
if -3.9e16 < x < 0.0064999999999999997Initial program 99.7%
Taylor expanded in x around 0 99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in x around inf 98.6%
cube-mult98.6%
unpow298.6%
distribute-rgt-out98.6%
unpow298.6%
+-commutative98.6%
Simplified98.6%
if 0.0064999999999999997 < x Initial program 16.7%
associate-*r/21.4%
sub-neg21.4%
metadata-eval21.4%
*-commutative21.4%
fma-def21.4%
*-commutative21.4%
fma-def21.4%
*-commutative21.4%
fma-def21.4%
fma-def21.4%
*-commutative21.4%
Simplified21.4%
Taylor expanded in z around 0 21.4%
Taylor expanded in x around inf 91.7%
Final simplification96.1%
(FPCore (x y z)
:precision binary64
(if (or (<= x -0.0155) (not (<= x 0.00013)))
(*
(+ x -2.0)
(+
4.16438922228
(/
z
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))))
(/
(* (- 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 <= -0.0155) || !(x <= 0.00013)) {
tmp = (x + -2.0) * (4.16438922228 + (z / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)));
} 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 <= (-0.0155d0)) .or. (.not. (x <= 0.00013d0))) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 + (z / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0)))
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 <= -0.0155) || !(x <= 0.00013)) {
tmp = (x + -2.0) * (4.16438922228 + (z / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)));
} 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 <= -0.0155) or not (x <= 0.00013): tmp = (x + -2.0) * (4.16438922228 + (z / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606))) 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 <= -0.0155) || !(x <= 0.00013)) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(z / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)))); 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 <= -0.0155) || ~((x <= 0.00013))) tmp = (x + -2.0) * (4.16438922228 + (z / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606))); 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, -0.0155], N[Not[LessEqual[x, 0.00013]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(z / 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], 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 -0.0155 \lor \neg \left(x \leq 0.00013\right):\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{47.066876606 + x \cdot 313.399215894}\\
\end{array}
\end{array}
if x < -0.0155 or 1.29999999999999989e-4 < x Initial program 18.7%
associate-*r/22.9%
sub-neg22.9%
metadata-eval22.9%
*-commutative22.9%
fma-def22.9%
*-commutative22.9%
fma-def22.9%
*-commutative22.9%
fma-def22.9%
fma-def22.9%
*-commutative22.9%
Simplified22.9%
Taylor expanded in z around 0 22.9%
Taylor expanded in x around inf 93.1%
if -0.0155 < x < 1.29999999999999989e-4Initial program 99.7%
Taylor expanded in x around 0 99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in x around 0 99.1%
*-commutative99.1%
Simplified99.1%
Final simplification96.0%
(FPCore (x y z)
:precision binary64
(if (or (<= x -36.0) (not (<= x 22.0)))
(*
(+ x -2.0)
(+
4.16438922228
(/
z
(+
47.066876606
(* x (+ 313.399215894 (* (+ x 43.3400022514) (* x x))))))))
(/
(* (- 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 <= 22.0)) {
tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (x * x)))))));
} 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 <= 22.0d0))) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 + (z / (47.066876606d0 + (x * (313.399215894d0 + ((x + 43.3400022514d0) * (x * x)))))))
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 <= 22.0)) {
tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (x * x)))))));
} 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 <= 22.0): tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (x * x))))))) 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 <= 22.0)) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(z / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(Float64(x + 43.3400022514) * Float64(x * x)))))))); else tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * 137.519416416))))) / Float64(47.066876606 + Float64(x * 313.399215894))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -36.0) || ~((x <= 22.0))) tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (x * x))))))); 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, 22.0]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(z / N[(47.066876606 + N[(x * N[(313.399215894 + N[(N[(x + 43.3400022514), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * 137.519416416), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(47.066876606 + N[(x * 313.399215894), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -36 \lor \neg \left(x \leq 22\right):\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{z}{47.066876606 + x \cdot \left(313.399215894 + \left(x + 43.3400022514\right) \cdot \left(x \cdot x\right)\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{47.066876606 + x \cdot 313.399215894}\\
\end{array}
\end{array}
if x < -36 or 22 < x Initial program 18.7%
associate-*r/22.9%
sub-neg22.9%
metadata-eval22.9%
*-commutative22.9%
fma-def22.9%
*-commutative22.9%
fma-def22.9%
*-commutative22.9%
fma-def22.9%
fma-def22.9%
*-commutative22.9%
Simplified22.9%
Taylor expanded in z around 0 22.9%
Taylor expanded in x around inf 93.1%
Taylor expanded in x around inf 62.4%
cube-mult62.4%
unpow262.4%
distribute-rgt-out92.7%
unpow292.7%
+-commutative92.7%
Simplified92.7%
if -36 < x < 22Initial program 99.7%
Taylor expanded in x around 0 99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in x around 0 99.1%
*-commutative99.1%
Simplified99.1%
Final simplification95.8%
(FPCore (x y z)
:precision binary64
(if (or (<= x -36.0) (not (<= x 35.0)))
(*
(+ x -2.0)
(+
(+ 4.16438922228 (/ -101.7851458539211 x))
(/ 3451.550173699799 (* x x))))
(/
(* (- 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 <= 35.0)) {
tmp = (x + -2.0) * ((4.16438922228 + (-101.7851458539211 / x)) + (3451.550173699799 / (x * x)));
} 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 <= 35.0d0))) then
tmp = (x + (-2.0d0)) * ((4.16438922228d0 + ((-101.7851458539211d0) / x)) + (3451.550173699799d0 / (x * x)))
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 <= 35.0)) {
tmp = (x + -2.0) * ((4.16438922228 + (-101.7851458539211 / x)) + (3451.550173699799 / (x * x)));
} 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 <= 35.0): tmp = (x + -2.0) * ((4.16438922228 + (-101.7851458539211 / x)) + (3451.550173699799 / (x * x))) 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 <= 35.0)) tmp = Float64(Float64(x + -2.0) * Float64(Float64(4.16438922228 + Float64(-101.7851458539211 / x)) + Float64(3451.550173699799 / Float64(x * x)))); else tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * 137.519416416))))) / Float64(47.066876606 + Float64(x * 313.399215894))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -36.0) || ~((x <= 35.0))) tmp = (x + -2.0) * ((4.16438922228 + (-101.7851458539211 / x)) + (3451.550173699799 / (x * x))); 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, 35.0]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(4.16438922228 + N[(-101.7851458539211 / x), $MachinePrecision]), $MachinePrecision] + N[(3451.550173699799 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * 137.519416416), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(47.066876606 + N[(x * 313.399215894), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -36 \lor \neg \left(x \leq 35\right):\\
\;\;\;\;\left(x + -2\right) \cdot \left(\left(4.16438922228 + \frac{-101.7851458539211}{x}\right) + \frac{3451.550173699799}{x \cdot x}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{47.066876606 + x \cdot 313.399215894}\\
\end{array}
\end{array}
if x < -36 or 35 < x Initial program 18.7%
associate-*r/22.9%
sub-neg22.9%
metadata-eval22.9%
*-commutative22.9%
fma-def22.9%
*-commutative22.9%
fma-def22.9%
*-commutative22.9%
fma-def22.9%
fma-def22.9%
*-commutative22.9%
Simplified22.9%
Taylor expanded in x around inf 89.2%
sub-neg89.2%
+-commutative89.2%
associate-+r+89.2%
+-commutative89.2%
associate-*r/89.2%
metadata-eval89.2%
distribute-neg-frac89.2%
metadata-eval89.2%
associate-*r/89.2%
metadata-eval89.2%
unpow289.2%
Simplified89.2%
if -36 < x < 35Initial program 99.7%
Taylor expanded in x around 0 99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in x around 0 99.1%
*-commutative99.1%
Simplified99.1%
Final simplification93.9%
(FPCore (x y z)
:precision binary64
(if (<= x -2.4e+14)
(* x 4.16438922228)
(if (<= x 27.0)
(*
(+ x -2.0)
(+
(* z 0.0212463641547976)
(* x (- (* y 0.0212463641547976) (* z 0.14147091005106402)))))
(*
(+ x -2.0)
(+
(+ 4.16438922228 (/ -101.7851458539211 x))
(/ 3451.550173699799 (* x x)))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -2.4e+14) {
tmp = x * 4.16438922228;
} else if (x <= 27.0) {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402))));
} else {
tmp = (x + -2.0) * ((4.16438922228 + (-101.7851458539211 / x)) + (3451.550173699799 / (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 <= (-2.4d+14)) then
tmp = x * 4.16438922228d0
else if (x <= 27.0d0) then
tmp = (x + (-2.0d0)) * ((z * 0.0212463641547976d0) + (x * ((y * 0.0212463641547976d0) - (z * 0.14147091005106402d0))))
else
tmp = (x + (-2.0d0)) * ((4.16438922228d0 + ((-101.7851458539211d0) / x)) + (3451.550173699799d0 / (x * x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -2.4e+14) {
tmp = x * 4.16438922228;
} else if (x <= 27.0) {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402))));
} else {
tmp = (x + -2.0) * ((4.16438922228 + (-101.7851458539211 / x)) + (3451.550173699799 / (x * x)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -2.4e+14: tmp = x * 4.16438922228 elif x <= 27.0: tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402)))) else: tmp = (x + -2.0) * ((4.16438922228 + (-101.7851458539211 / x)) + (3451.550173699799 / (x * x))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -2.4e+14) tmp = Float64(x * 4.16438922228); elseif (x <= 27.0) 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(Float64(4.16438922228 + Float64(-101.7851458539211 / x)) + Float64(3451.550173699799 / Float64(x * x)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -2.4e+14) tmp = x * 4.16438922228; elseif (x <= 27.0) tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402)))); else tmp = (x + -2.0) * ((4.16438922228 + (-101.7851458539211 / x)) + (3451.550173699799 / (x * x))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -2.4e+14], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 27.0], 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[(N[(4.16438922228 + N[(-101.7851458539211 / x), $MachinePrecision]), $MachinePrecision] + N[(3451.550173699799 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.4 \cdot 10^{+14}:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 27:\\
\;\;\;\;\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}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(\left(4.16438922228 + \frac{-101.7851458539211}{x}\right) + \frac{3451.550173699799}{x \cdot x}\right)\\
\end{array}
\end{array}
if x < -2.4e14Initial program 17.0%
associate-*r/20.9%
sub-neg20.9%
metadata-eval20.9%
*-commutative20.9%
fma-def20.9%
*-commutative20.9%
fma-def20.9%
*-commutative20.9%
fma-def20.9%
fma-def20.9%
*-commutative20.9%
Simplified20.9%
Taylor expanded in x around inf 91.8%
*-commutative91.8%
Simplified91.8%
if -2.4e14 < x < 27Initial program 99.7%
associate-*r/99.6%
sub-neg99.6%
metadata-eval99.6%
*-commutative99.6%
fma-def99.6%
*-commutative99.6%
fma-def99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in x around 0 93.9%
if 27 < x Initial program 16.7%
associate-*r/21.4%
sub-neg21.4%
metadata-eval21.4%
*-commutative21.4%
fma-def21.4%
*-commutative21.4%
fma-def21.4%
*-commutative21.4%
fma-def21.4%
fma-def21.4%
*-commutative21.4%
Simplified21.4%
Taylor expanded in x around inf 90.4%
sub-neg90.4%
+-commutative90.4%
associate-+r+90.4%
+-commutative90.4%
associate-*r/90.4%
metadata-eval90.4%
distribute-neg-frac90.4%
metadata-eval90.4%
associate-*r/90.4%
metadata-eval90.4%
unpow290.4%
Simplified90.4%
Final simplification92.5%
(FPCore (x y z)
:precision binary64
(if (<= x -2.4e+14)
(* x 4.16438922228)
(if (<= x 2.8)
(+
(*
x
(- (* 0.0212463641547976 (+ z (* y -2.0))) (* z -0.28294182010212804)))
(* z -0.0424927283095952))
(*
(+ x -2.0)
(+
(+ 4.16438922228 (/ -101.7851458539211 x))
(/ 3451.550173699799 (* x x)))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -2.4e+14) {
tmp = x * 4.16438922228;
} else if (x <= 2.8) {
tmp = (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804))) + (z * -0.0424927283095952);
} else {
tmp = (x + -2.0) * ((4.16438922228 + (-101.7851458539211 / x)) + (3451.550173699799 / (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 <= (-2.4d+14)) then
tmp = x * 4.16438922228d0
else if (x <= 2.8d0) then
tmp = (x * ((0.0212463641547976d0 * (z + (y * (-2.0d0)))) - (z * (-0.28294182010212804d0)))) + (z * (-0.0424927283095952d0))
else
tmp = (x + (-2.0d0)) * ((4.16438922228d0 + ((-101.7851458539211d0) / x)) + (3451.550173699799d0 / (x * x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -2.4e+14) {
tmp = x * 4.16438922228;
} else if (x <= 2.8) {
tmp = (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804))) + (z * -0.0424927283095952);
} else {
tmp = (x + -2.0) * ((4.16438922228 + (-101.7851458539211 / x)) + (3451.550173699799 / (x * x)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -2.4e+14: tmp = x * 4.16438922228 elif x <= 2.8: tmp = (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804))) + (z * -0.0424927283095952) else: tmp = (x + -2.0) * ((4.16438922228 + (-101.7851458539211 / x)) + (3451.550173699799 / (x * x))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -2.4e+14) tmp = Float64(x * 4.16438922228); elseif (x <= 2.8) tmp = Float64(Float64(x * Float64(Float64(0.0212463641547976 * Float64(z + Float64(y * -2.0))) - Float64(z * -0.28294182010212804))) + Float64(z * -0.0424927283095952)); else tmp = Float64(Float64(x + -2.0) * Float64(Float64(4.16438922228 + Float64(-101.7851458539211 / x)) + Float64(3451.550173699799 / Float64(x * x)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -2.4e+14) tmp = x * 4.16438922228; elseif (x <= 2.8) tmp = (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804))) + (z * -0.0424927283095952); else tmp = (x + -2.0) * ((4.16438922228 + (-101.7851458539211 / x)) + (3451.550173699799 / (x * x))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -2.4e+14], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 2.8], N[(N[(x * N[(N[(0.0212463641547976 * N[(z + N[(y * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * -0.28294182010212804), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z * -0.0424927283095952), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(4.16438922228 + N[(-101.7851458539211 / x), $MachinePrecision]), $MachinePrecision] + N[(3451.550173699799 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.4 \cdot 10^{+14}:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 2.8:\\
\;\;\;\;x \cdot \left(0.0212463641547976 \cdot \left(z + y \cdot -2\right) - z \cdot -0.28294182010212804\right) + z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(\left(4.16438922228 + \frac{-101.7851458539211}{x}\right) + \frac{3451.550173699799}{x \cdot x}\right)\\
\end{array}
\end{array}
if x < -2.4e14Initial program 17.0%
associate-*r/20.9%
sub-neg20.9%
metadata-eval20.9%
*-commutative20.9%
fma-def20.9%
*-commutative20.9%
fma-def20.9%
*-commutative20.9%
fma-def20.9%
fma-def20.9%
*-commutative20.9%
Simplified20.9%
Taylor expanded in x around inf 91.8%
*-commutative91.8%
Simplified91.8%
if -2.4e14 < x < 2.7999999999999998Initial program 99.7%
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 94.0%
if 2.7999999999999998 < x Initial program 16.7%
associate-*r/21.4%
sub-neg21.4%
metadata-eval21.4%
*-commutative21.4%
fma-def21.4%
*-commutative21.4%
fma-def21.4%
*-commutative21.4%
fma-def21.4%
fma-def21.4%
*-commutative21.4%
Simplified21.4%
Taylor expanded in x around inf 90.4%
sub-neg90.4%
+-commutative90.4%
associate-+r+90.4%
+-commutative90.4%
associate-*r/90.4%
metadata-eval90.4%
distribute-neg-frac90.4%
metadata-eval90.4%
associate-*r/90.4%
metadata-eval90.4%
unpow290.4%
Simplified90.4%
Final simplification92.5%
(FPCore (x y z)
:precision binary64
(if (<= x -1.75e-10)
(* x 4.16438922228)
(if (<= x 5e-9)
(+
(* z -0.0424927283095952)
(* x (- (* z 0.0212463641547976) (* z -0.28294182010212804))))
(+ (* x 4.16438922228) (- (/ 3655.1204654076414 x) 110.1139242984811)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.75e-10) {
tmp = x * 4.16438922228;
} else if (x <= 5e-9) {
tmp = (z * -0.0424927283095952) + (x * ((z * 0.0212463641547976) - (z * -0.28294182010212804)));
} else {
tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - 110.1139242984811);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1.75d-10)) then
tmp = x * 4.16438922228d0
else if (x <= 5d-9) then
tmp = (z * (-0.0424927283095952d0)) + (x * ((z * 0.0212463641547976d0) - (z * (-0.28294182010212804d0))))
else
tmp = (x * 4.16438922228d0) + ((3655.1204654076414d0 / x) - 110.1139242984811d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1.75e-10) {
tmp = x * 4.16438922228;
} else if (x <= 5e-9) {
tmp = (z * -0.0424927283095952) + (x * ((z * 0.0212463641547976) - (z * -0.28294182010212804)));
} else {
tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - 110.1139242984811);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.75e-10: tmp = x * 4.16438922228 elif x <= 5e-9: tmp = (z * -0.0424927283095952) + (x * ((z * 0.0212463641547976) - (z * -0.28294182010212804))) else: tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - 110.1139242984811) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.75e-10) tmp = Float64(x * 4.16438922228); elseif (x <= 5e-9) tmp = Float64(Float64(z * -0.0424927283095952) + Float64(x * Float64(Float64(z * 0.0212463641547976) - Float64(z * -0.28294182010212804)))); else tmp = Float64(Float64(x * 4.16438922228) + Float64(Float64(3655.1204654076414 / x) - 110.1139242984811)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.75e-10) tmp = x * 4.16438922228; elseif (x <= 5e-9) tmp = (z * -0.0424927283095952) + (x * ((z * 0.0212463641547976) - (z * -0.28294182010212804))); else tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - 110.1139242984811); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.75e-10], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 5e-9], N[(N[(z * -0.0424927283095952), $MachinePrecision] + N[(x * N[(N[(z * 0.0212463641547976), $MachinePrecision] - N[(z * -0.28294182010212804), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 4.16438922228), $MachinePrecision] + N[(N[(3655.1204654076414 / x), $MachinePrecision] - 110.1139242984811), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.75 \cdot 10^{-10}:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 5 \cdot 10^{-9}:\\
\;\;\;\;z \cdot -0.0424927283095952 + x \cdot \left(z \cdot 0.0212463641547976 - z \cdot -0.28294182010212804\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228 + \left(\frac{3655.1204654076414}{x} - 110.1139242984811\right)\\
\end{array}
\end{array}
if x < -1.7499999999999999e-10Initial program 23.4%
associate-*r/27.0%
sub-neg27.0%
metadata-eval27.0%
*-commutative27.0%
fma-def27.0%
*-commutative27.0%
fma-def27.0%
*-commutative27.0%
fma-def27.0%
fma-def27.0%
*-commutative27.0%
Simplified27.0%
Taylor expanded in x around inf 85.1%
*-commutative85.1%
Simplified85.1%
if -1.7499999999999999e-10 < x < 5.0000000000000001e-9Initial program 99.7%
associate-*r/99.7%
sub-neg99.7%
metadata-eval99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in y around 0 73.7%
Taylor expanded in x around 0 72.7%
if 5.0000000000000001e-9 < x Initial program 19.4%
associate-*r/23.9%
sub-neg23.9%
metadata-eval23.9%
*-commutative23.9%
fma-def23.9%
*-commutative23.9%
fma-def23.9%
*-commutative23.9%
fma-def23.9%
fma-def23.9%
*-commutative23.9%
Simplified23.9%
Taylor expanded in x around inf 87.6%
associate--l+87.6%
un-div-inv87.6%
Applied egg-rr87.6%
Final simplification80.0%
(FPCore (x y z)
:precision binary64
(if (<= x -1.75e-10)
(* x 4.16438922228)
(if (<= x 5e-9)
(* (+ x -2.0) (* z 0.0212463641547976))
(* (+ x -2.0) (- 4.16438922228 (/ 101.7851458539211 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.75e-10) {
tmp = x * 4.16438922228;
} else if (x <= 5e-9) {
tmp = (x + -2.0) * (z * 0.0212463641547976);
} else {
tmp = (x + -2.0) * (4.16438922228 - (101.7851458539211 / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1.75d-10)) then
tmp = x * 4.16438922228d0
else if (x <= 5d-9) then
tmp = (x + (-2.0d0)) * (z * 0.0212463641547976d0)
else
tmp = (x + (-2.0d0)) * (4.16438922228d0 - (101.7851458539211d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1.75e-10) {
tmp = x * 4.16438922228;
} else if (x <= 5e-9) {
tmp = (x + -2.0) * (z * 0.0212463641547976);
} else {
tmp = (x + -2.0) * (4.16438922228 - (101.7851458539211 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.75e-10: tmp = x * 4.16438922228 elif x <= 5e-9: tmp = (x + -2.0) * (z * 0.0212463641547976) else: tmp = (x + -2.0) * (4.16438922228 - (101.7851458539211 / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.75e-10) tmp = Float64(x * 4.16438922228); elseif (x <= 5e-9) tmp = Float64(Float64(x + -2.0) * Float64(z * 0.0212463641547976)); else tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 - Float64(101.7851458539211 / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.75e-10) tmp = x * 4.16438922228; elseif (x <= 5e-9) tmp = (x + -2.0) * (z * 0.0212463641547976); else tmp = (x + -2.0) * (4.16438922228 - (101.7851458539211 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.75e-10], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 5e-9], N[(N[(x + -2.0), $MachinePrecision] * N[(z * 0.0212463641547976), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 - N[(101.7851458539211 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.75 \cdot 10^{-10}:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 5 \cdot 10^{-9}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211}{x}\right)\\
\end{array}
\end{array}
if x < -1.7499999999999999e-10Initial program 23.4%
associate-*r/27.0%
sub-neg27.0%
metadata-eval27.0%
*-commutative27.0%
fma-def27.0%
*-commutative27.0%
fma-def27.0%
*-commutative27.0%
fma-def27.0%
fma-def27.0%
*-commutative27.0%
Simplified27.0%
Taylor expanded in x around inf 85.1%
*-commutative85.1%
Simplified85.1%
if -1.7499999999999999e-10 < x < 5.0000000000000001e-9Initial program 99.7%
associate-*r/99.7%
sub-neg99.7%
metadata-eval99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 72.5%
if 5.0000000000000001e-9 < x Initial program 19.4%
associate-*r/23.9%
sub-neg23.9%
metadata-eval23.9%
*-commutative23.9%
fma-def23.9%
*-commutative23.9%
fma-def23.9%
*-commutative23.9%
fma-def23.9%
fma-def23.9%
*-commutative23.9%
Simplified23.9%
Taylor expanded in x around inf 87.5%
associate-*r/87.5%
metadata-eval87.5%
Simplified87.5%
Final simplification79.9%
(FPCore (x y z)
:precision binary64
(if (<= x -1.75e-10)
(* x 4.16438922228)
(if (<= x 5e-9)
(* (+ x -2.0) (* z 0.0212463641547976))
(+ (* x 4.16438922228) (- (/ 3655.1204654076414 x) 110.1139242984811)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.75e-10) {
tmp = x * 4.16438922228;
} else if (x <= 5e-9) {
tmp = (x + -2.0) * (z * 0.0212463641547976);
} else {
tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - 110.1139242984811);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1.75d-10)) then
tmp = x * 4.16438922228d0
else if (x <= 5d-9) then
tmp = (x + (-2.0d0)) * (z * 0.0212463641547976d0)
else
tmp = (x * 4.16438922228d0) + ((3655.1204654076414d0 / x) - 110.1139242984811d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1.75e-10) {
tmp = x * 4.16438922228;
} else if (x <= 5e-9) {
tmp = (x + -2.0) * (z * 0.0212463641547976);
} else {
tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - 110.1139242984811);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.75e-10: tmp = x * 4.16438922228 elif x <= 5e-9: tmp = (x + -2.0) * (z * 0.0212463641547976) else: tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - 110.1139242984811) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.75e-10) tmp = Float64(x * 4.16438922228); elseif (x <= 5e-9) tmp = Float64(Float64(x + -2.0) * Float64(z * 0.0212463641547976)); else tmp = Float64(Float64(x * 4.16438922228) + Float64(Float64(3655.1204654076414 / x) - 110.1139242984811)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.75e-10) tmp = x * 4.16438922228; elseif (x <= 5e-9) tmp = (x + -2.0) * (z * 0.0212463641547976); else tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - 110.1139242984811); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.75e-10], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 5e-9], N[(N[(x + -2.0), $MachinePrecision] * N[(z * 0.0212463641547976), $MachinePrecision]), $MachinePrecision], N[(N[(x * 4.16438922228), $MachinePrecision] + N[(N[(3655.1204654076414 / x), $MachinePrecision] - 110.1139242984811), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.75 \cdot 10^{-10}:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 5 \cdot 10^{-9}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228 + \left(\frac{3655.1204654076414}{x} - 110.1139242984811\right)\\
\end{array}
\end{array}
if x < -1.7499999999999999e-10Initial program 23.4%
associate-*r/27.0%
sub-neg27.0%
metadata-eval27.0%
*-commutative27.0%
fma-def27.0%
*-commutative27.0%
fma-def27.0%
*-commutative27.0%
fma-def27.0%
fma-def27.0%
*-commutative27.0%
Simplified27.0%
Taylor expanded in x around inf 85.1%
*-commutative85.1%
Simplified85.1%
if -1.7499999999999999e-10 < x < 5.0000000000000001e-9Initial program 99.7%
associate-*r/99.7%
sub-neg99.7%
metadata-eval99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 72.5%
if 5.0000000000000001e-9 < x Initial program 19.4%
associate-*r/23.9%
sub-neg23.9%
metadata-eval23.9%
*-commutative23.9%
fma-def23.9%
*-commutative23.9%
fma-def23.9%
*-commutative23.9%
fma-def23.9%
fma-def23.9%
*-commutative23.9%
Simplified23.9%
Taylor expanded in x around inf 87.6%
associate--l+87.6%
un-div-inv87.6%
Applied egg-rr87.6%
Final simplification79.9%
(FPCore (x y z)
:precision binary64
(if (<= x -1.75e-10)
(* x 4.16438922228)
(if (<= x 29.0)
(* (+ x -2.0) (* z 0.0212463641547976))
(- (* x 4.16438922228) 110.1139242984811))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.75e-10) {
tmp = x * 4.16438922228;
} else if (x <= 29.0) {
tmp = (x + -2.0) * (z * 0.0212463641547976);
} else {
tmp = (x * 4.16438922228) - 110.1139242984811;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1.75d-10)) then
tmp = x * 4.16438922228d0
else if (x <= 29.0d0) then
tmp = (x + (-2.0d0)) * (z * 0.0212463641547976d0)
else
tmp = (x * 4.16438922228d0) - 110.1139242984811d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1.75e-10) {
tmp = x * 4.16438922228;
} else if (x <= 29.0) {
tmp = (x + -2.0) * (z * 0.0212463641547976);
} else {
tmp = (x * 4.16438922228) - 110.1139242984811;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.75e-10: tmp = x * 4.16438922228 elif x <= 29.0: tmp = (x + -2.0) * (z * 0.0212463641547976) else: tmp = (x * 4.16438922228) - 110.1139242984811 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.75e-10) tmp = Float64(x * 4.16438922228); elseif (x <= 29.0) tmp = Float64(Float64(x + -2.0) * Float64(z * 0.0212463641547976)); else tmp = Float64(Float64(x * 4.16438922228) - 110.1139242984811); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.75e-10) tmp = x * 4.16438922228; elseif (x <= 29.0) tmp = (x + -2.0) * (z * 0.0212463641547976); else tmp = (x * 4.16438922228) - 110.1139242984811; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.75e-10], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 29.0], N[(N[(x + -2.0), $MachinePrecision] * N[(z * 0.0212463641547976), $MachinePrecision]), $MachinePrecision], N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.75 \cdot 10^{-10}:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 29:\\
\;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\
\end{array}
\end{array}
if x < -1.7499999999999999e-10Initial program 23.4%
associate-*r/27.0%
sub-neg27.0%
metadata-eval27.0%
*-commutative27.0%
fma-def27.0%
*-commutative27.0%
fma-def27.0%
*-commutative27.0%
fma-def27.0%
fma-def27.0%
*-commutative27.0%
Simplified27.0%
Taylor expanded in x around inf 85.1%
*-commutative85.1%
Simplified85.1%
if -1.7499999999999999e-10 < x < 29Initial program 99.7%
associate-*r/99.7%
sub-neg99.7%
metadata-eval99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 71.3%
if 29 < x Initial program 16.7%
associate-*r/21.4%
sub-neg21.4%
metadata-eval21.4%
*-commutative21.4%
fma-def21.4%
*-commutative21.4%
fma-def21.4%
*-commutative21.4%
fma-def21.4%
fma-def21.4%
*-commutative21.4%
Simplified21.4%
Taylor expanded in x around inf 90.2%
Final simplification79.9%
(FPCore (x y z)
:precision binary64
(if (<= x -1.75e-10)
(* x 4.16438922228)
(if (<= x 4.4)
(* z -0.0424927283095952)
(- (* x 4.16438922228) 110.1139242984811))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.75e-10) {
tmp = x * 4.16438922228;
} else if (x <= 4.4) {
tmp = z * -0.0424927283095952;
} else {
tmp = (x * 4.16438922228) - 110.1139242984811;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1.75d-10)) then
tmp = x * 4.16438922228d0
else if (x <= 4.4d0) then
tmp = z * (-0.0424927283095952d0)
else
tmp = (x * 4.16438922228d0) - 110.1139242984811d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1.75e-10) {
tmp = x * 4.16438922228;
} else if (x <= 4.4) {
tmp = z * -0.0424927283095952;
} else {
tmp = (x * 4.16438922228) - 110.1139242984811;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.75e-10: tmp = x * 4.16438922228 elif x <= 4.4: tmp = z * -0.0424927283095952 else: tmp = (x * 4.16438922228) - 110.1139242984811 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.75e-10) tmp = Float64(x * 4.16438922228); elseif (x <= 4.4) tmp = Float64(z * -0.0424927283095952); else tmp = Float64(Float64(x * 4.16438922228) - 110.1139242984811); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.75e-10) tmp = x * 4.16438922228; elseif (x <= 4.4) tmp = z * -0.0424927283095952; else tmp = (x * 4.16438922228) - 110.1139242984811; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.75e-10], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 4.4], N[(z * -0.0424927283095952), $MachinePrecision], N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.75 \cdot 10^{-10}:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 4.4:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\
\end{array}
\end{array}
if x < -1.7499999999999999e-10Initial program 23.4%
associate-*r/27.0%
sub-neg27.0%
metadata-eval27.0%
*-commutative27.0%
fma-def27.0%
*-commutative27.0%
fma-def27.0%
*-commutative27.0%
fma-def27.0%
fma-def27.0%
*-commutative27.0%
Simplified27.0%
Taylor expanded in x around inf 85.1%
*-commutative85.1%
Simplified85.1%
if -1.7499999999999999e-10 < x < 4.4000000000000004Initial program 99.7%
associate-*r/99.7%
sub-neg99.7%
metadata-eval99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 71.3%
*-commutative71.3%
Simplified71.3%
if 4.4000000000000004 < x Initial program 16.7%
associate-*r/21.4%
sub-neg21.4%
metadata-eval21.4%
*-commutative21.4%
fma-def21.4%
*-commutative21.4%
fma-def21.4%
*-commutative21.4%
fma-def21.4%
fma-def21.4%
*-commutative21.4%
Simplified21.4%
Taylor expanded in x around inf 90.2%
Final simplification79.9%
(FPCore (x y z) :precision binary64 (if (<= x -1.75e-10) (* x 4.16438922228) (if (<= x 5e-9) (* z -0.0424927283095952) (* x 4.16438922228))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.75e-10) {
tmp = x * 4.16438922228;
} else if (x <= 5e-9) {
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 <= (-1.75d-10)) then
tmp = x * 4.16438922228d0
else if (x <= 5d-9) 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 <= -1.75e-10) {
tmp = x * 4.16438922228;
} else if (x <= 5e-9) {
tmp = z * -0.0424927283095952;
} else {
tmp = x * 4.16438922228;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.75e-10: tmp = x * 4.16438922228 elif x <= 5e-9: tmp = z * -0.0424927283095952 else: tmp = x * 4.16438922228 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.75e-10) tmp = Float64(x * 4.16438922228); elseif (x <= 5e-9) 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 <= -1.75e-10) tmp = x * 4.16438922228; elseif (x <= 5e-9) tmp = z * -0.0424927283095952; else tmp = x * 4.16438922228; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.75e-10], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 5e-9], N[(z * -0.0424927283095952), $MachinePrecision], N[(x * 4.16438922228), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.75 \cdot 10^{-10}:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 5 \cdot 10^{-9}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228\\
\end{array}
\end{array}
if x < -1.7499999999999999e-10 or 5.0000000000000001e-9 < x Initial program 21.6%
associate-*r/25.6%
sub-neg25.6%
metadata-eval25.6%
*-commutative25.6%
fma-def25.6%
*-commutative25.6%
fma-def25.6%
*-commutative25.6%
fma-def25.6%
fma-def25.6%
*-commutative25.6%
Simplified25.6%
Taylor expanded in x around inf 86.1%
*-commutative86.1%
Simplified86.1%
if -1.7499999999999999e-10 < x < 5.0000000000000001e-9Initial program 99.7%
associate-*r/99.7%
sub-neg99.7%
metadata-eval99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 72.5%
*-commutative72.5%
Simplified72.5%
Final simplification79.9%
(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.3%
associate-*r/59.5%
sub-neg59.5%
metadata-eval59.5%
*-commutative59.5%
fma-def59.5%
*-commutative59.5%
fma-def59.5%
*-commutative59.5%
fma-def59.5%
fma-def59.5%
*-commutative59.5%
Simplified59.5%
Taylor expanded in x around inf 48.3%
*-commutative48.3%
Simplified48.3%
Final simplification48.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- (+ (/ y (* x x)) (* 4.16438922228 x)) 110.1139242984811)))
(if (< x -3.326128725870005e+62)
t_0
(if (< x 9.429991714554673e+55)
(*
(/ (- x 2.0) 1.0)
(/
(+
(*
(+
(* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x)
y)
x)
z)
(+
(*
(+
(+ (* 263.505074721 x) (+ (* 43.3400022514 (* x x)) (* x (* x x))))
313.399215894)
x)
47.066876606)))
t_0))))
double code(double x, double y, double z) {
double t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811;
double tmp;
if (x < -3.326128725870005e+62) {
tmp = t_0;
} else if (x < 9.429991714554673e+55) {
tmp = ((x - 2.0) / 1.0) * (((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / (((((263.505074721 * x) + ((43.3400022514 * (x * x)) + (x * (x * x)))) + 313.399215894) * x) + 47.066876606));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = ((y / (x * x)) + (4.16438922228d0 * x)) - 110.1139242984811d0
if (x < (-3.326128725870005d+62)) then
tmp = t_0
else if (x < 9.429991714554673d+55) then
tmp = ((x - 2.0d0) / 1.0d0) * (((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z) / (((((263.505074721d0 * x) + ((43.3400022514d0 * (x * x)) + (x * (x * x)))) + 313.399215894d0) * x) + 47.066876606d0))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811;
double tmp;
if (x < -3.326128725870005e+62) {
tmp = t_0;
} else if (x < 9.429991714554673e+55) {
tmp = ((x - 2.0) / 1.0) * (((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / (((((263.505074721 * x) + ((43.3400022514 * (x * x)) + (x * (x * x)))) + 313.399215894) * x) + 47.066876606));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811 tmp = 0 if x < -3.326128725870005e+62: tmp = t_0 elif x < 9.429991714554673e+55: tmp = ((x - 2.0) / 1.0) * (((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / (((((263.505074721 * x) + ((43.3400022514 * (x * x)) + (x * (x * x)))) + 313.399215894) * x) + 47.066876606)) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(y / Float64(x * x)) + Float64(4.16438922228 * x)) - 110.1139242984811) tmp = 0.0 if (x < -3.326128725870005e+62) tmp = t_0; elseif (x < 9.429991714554673e+55) tmp = Float64(Float64(Float64(x - 2.0) / 1.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / Float64(Float64(Float64(Float64(Float64(263.505074721 * x) + Float64(Float64(43.3400022514 * Float64(x * x)) + Float64(x * Float64(x * x)))) + 313.399215894) * x) + 47.066876606))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811; tmp = 0.0; if (x < -3.326128725870005e+62) tmp = t_0; elseif (x < 9.429991714554673e+55) tmp = ((x - 2.0) / 1.0) * (((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / (((((263.505074721 * x) + ((43.3400022514 * (x * x)) + (x * (x * x)))) + 313.399215894) * x) + 47.066876606)); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(4.16438922228 * x), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision]}, If[Less[x, -3.326128725870005e+62], t$95$0, If[Less[x, 9.429991714554673e+55], N[(N[(N[(x - 2.0), $MachinePrecision] / 1.0), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision] * x), $MachinePrecision] + 137.519416416), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision] / N[(N[(N[(N[(N[(263.505074721 * x), $MachinePrecision] + N[(N[(43.3400022514 * N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision] * x), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\frac{y}{x \cdot x} + 4.16438922228 \cdot x\right) - 110.1139242984811\\
\mathbf{if}\;x < -3.326128725870005 \cdot 10^{+62}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x < 9.429991714554673 \cdot 10^{+55}:\\
\;\;\;\;\frac{x - 2}{1} \cdot \frac{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}{\left(\left(263.505074721 \cdot x + \left(43.3400022514 \cdot \left(x \cdot x\right) + x \cdot \left(x \cdot x\right)\right)\right) + 313.399215894\right) \cdot x + 47.066876606}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
herbie shell --seed 2023230
(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)))