
(FPCore (x y z)
:precision binary64
(/
(*
(- x 2.0)
(+
(*
(+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y)
x)
z))
(+
(* (+ (* (+ (* (+ x 43.3400022514) x) 263.505074721) x) 313.399215894) x)
47.066876606)))
double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((x - 2.0d0) * ((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z)) / (((((((x + 43.3400022514d0) * x) + 263.505074721d0) * x) + 313.399215894d0) * x) + 47.066876606d0)
end function
public static double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
def code(x, y, z): return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)
function code(x, y, z) return Float64(Float64(Float64(x - 2.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) end
function tmp = code(x, y, z) tmp = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606); end
code[x_, y_, z_] := N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision] * x), $MachinePrecision] + 137.519416416), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(x + 43.3400022514), $MachinePrecision] * x), $MachinePrecision] + 263.505074721), $MachinePrecision] * x), $MachinePrecision] + 313.399215894), $MachinePrecision] * x), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z)
:precision binary64
(/
(*
(- x 2.0)
(+
(*
(+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y)
x)
z))
(+
(* (+ (* (+ (* (+ x 43.3400022514) x) 263.505074721) x) 313.399215894) x)
47.066876606)))
double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((x - 2.0d0) * ((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z)) / (((((((x + 43.3400022514d0) * x) + 263.505074721d0) * x) + 313.399215894d0) * x) + 47.066876606d0)
end function
public static double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
def code(x, y, z): return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)
function code(x, y, z) return Float64(Float64(Float64(x - 2.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) end
function tmp = code(x, y, z) tmp = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606); end
code[x_, y_, z_] := N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision] * x), $MachinePrecision] + 137.519416416), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(x + 43.3400022514), $MachinePrecision] * x), $MachinePrecision] + 263.505074721), $MachinePrecision] * x), $MachinePrecision] + 313.399215894), $MachinePrecision] * x), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\end{array}
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
47.066876606
(*
x
(+
313.399215894
(* x (+ 263.505074721 (* x (+ x 43.3400022514))))))))
(t_1
(+
y
(*
x
(+ 137.519416416 (* x (+ (* x 4.16438922228) 78.6994924154)))))))
(if (<= (/ (* (- x 2.0) (+ (* x t_1) z)) t_0) 5e+301)
(* (+ x -2.0) (+ (/ z t_0) (* x (* t_1 (/ 1.0 t_0)))))
(+
(+
(fma x 4.16438922228 (/ 3655.1204654076414 x))
(/ (- y 130977.50649958357) (* x x)))
-110.1139242984811))))
double code(double x, double y, double z) {
double t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))));
double t_1 = y + (x * (137.519416416 + (x * ((x * 4.16438922228) + 78.6994924154))));
double tmp;
if ((((x - 2.0) * ((x * t_1) + z)) / t_0) <= 5e+301) {
tmp = (x + -2.0) * ((z / t_0) + (x * (t_1 * (1.0 / t_0))));
} else {
tmp = (fma(x, 4.16438922228, (3655.1204654076414 / x)) + ((y - 130977.50649958357) / (x * x))) + -110.1139242984811;
}
return tmp;
}
function code(x, y, z) t_0 = Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * Float64(263.505074721 + Float64(x * Float64(x + 43.3400022514))))))) t_1 = Float64(y + Float64(x * Float64(137.519416416 + Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154))))) tmp = 0.0 if (Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * t_1) + z)) / t_0) <= 5e+301) tmp = Float64(Float64(x + -2.0) * Float64(Float64(z / t_0) + Float64(x * Float64(t_1 * Float64(1.0 / t_0))))); else tmp = Float64(Float64(fma(x, 4.16438922228, Float64(3655.1204654076414 / x)) + Float64(Float64(y - 130977.50649958357) / Float64(x * x))) + -110.1139242984811); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * N[(263.505074721 + N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y + N[(x * N[(137.519416416 + N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * t$95$1), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], 5e+301], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(z / t$95$0), $MachinePrecision] + N[(x * N[(t$95$1 * N[(1.0 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 4.16438922228 + N[(3655.1204654076414 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(y - 130977.50649958357), $MachinePrecision] / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -110.1139242984811), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)\\
t_1 := y + x \cdot \left(137.519416416 + x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right)\right)\\
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(x \cdot t_1 + z\right)}{t_0} \leq 5 \cdot 10^{+301}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(\frac{z}{t_0} + x \cdot \left(t_1 \cdot \frac{1}{t_0}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\mathsf{fma}\left(x, 4.16438922228, \frac{3655.1204654076414}{x}\right) + \frac{y - 130977.50649958357}{x \cdot x}\right) + -110.1139242984811\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < 5.0000000000000004e301Initial program 96.6%
*-commutative96.6%
associate-*l/98.9%
*-commutative98.9%
sub-neg98.9%
metadata-eval98.9%
Simplified98.9%
Taylor expanded in z around 0 98.9%
div-inv98.9%
*-commutative98.9%
+-commutative98.9%
Applied egg-rr98.9%
associate-*l*99.5%
Simplified99.5%
if 5.0000000000000004e301 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) Initial program 0.2%
*-commutative0.2%
associate-*l/2.2%
*-commutative2.2%
sub-neg2.2%
metadata-eval2.2%
Simplified2.2%
Taylor expanded in x around -inf 99.1%
sub-neg99.1%
+-commutative99.1%
mul-1-neg99.1%
unsub-neg99.1%
*-commutative99.1%
fma-def99.1%
associate-*r/99.1%
metadata-eval99.1%
mul-1-neg99.1%
unsub-neg99.1%
unpow299.1%
metadata-eval99.1%
Simplified99.1%
Final simplification99.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
47.066876606
(*
x
(+
313.399215894
(* x (+ 263.505074721 (* x (+ x 43.3400022514))))))))
(t_1
(+
y
(*
x
(+ 137.519416416 (* x (+ (* x 4.16438922228) 78.6994924154)))))))
(if (<= (/ (* (- x 2.0) (+ (* x t_1) z)) t_0) INFINITY)
(* (+ x -2.0) (+ (/ z t_0) (* x (* t_1 (/ 1.0 t_0)))))
(/ (+ x -2.0) 0.24013125253755718))))
double code(double x, double y, double z) {
double t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))));
double t_1 = y + (x * (137.519416416 + (x * ((x * 4.16438922228) + 78.6994924154))));
double tmp;
if ((((x - 2.0) * ((x * t_1) + z)) / t_0) <= ((double) INFINITY)) {
tmp = (x + -2.0) * ((z / t_0) + (x * (t_1 * (1.0 / t_0))));
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
public static double code(double x, double y, double z) {
double t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))));
double t_1 = y + (x * (137.519416416 + (x * ((x * 4.16438922228) + 78.6994924154))));
double tmp;
if ((((x - 2.0) * ((x * t_1) + z)) / t_0) <= Double.POSITIVE_INFINITY) {
tmp = (x + -2.0) * ((z / t_0) + (x * (t_1 * (1.0 / t_0))));
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
def code(x, y, z): t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))) t_1 = y + (x * (137.519416416 + (x * ((x * 4.16438922228) + 78.6994924154)))) tmp = 0 if (((x - 2.0) * ((x * t_1) + z)) / t_0) <= math.inf: tmp = (x + -2.0) * ((z / t_0) + (x * (t_1 * (1.0 / t_0)))) else: tmp = (x + -2.0) / 0.24013125253755718 return tmp
function code(x, y, z) t_0 = Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * Float64(263.505074721 + Float64(x * Float64(x + 43.3400022514))))))) t_1 = Float64(y + Float64(x * Float64(137.519416416 + Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154))))) tmp = 0.0 if (Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * t_1) + z)) / t_0) <= Inf) tmp = Float64(Float64(x + -2.0) * Float64(Float64(z / t_0) + Float64(x * Float64(t_1 * Float64(1.0 / t_0))))); else tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))); t_1 = y + (x * (137.519416416 + (x * ((x * 4.16438922228) + 78.6994924154)))); tmp = 0.0; if ((((x - 2.0) * ((x * t_1) + z)) / t_0) <= Inf) tmp = (x + -2.0) * ((z / t_0) + (x * (t_1 * (1.0 / t_0)))); else tmp = (x + -2.0) / 0.24013125253755718; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * N[(263.505074721 + N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y + N[(x * N[(137.519416416 + N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * t$95$1), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], Infinity], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(z / t$95$0), $MachinePrecision] + N[(x * N[(t$95$1 * N[(1.0 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)\\
t_1 := y + x \cdot \left(137.519416416 + x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right)\right)\\
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(x \cdot t_1 + z\right)}{t_0} \leq \infty:\\
\;\;\;\;\left(x + -2\right) \cdot \left(\frac{z}{t_0} + x \cdot \left(t_1 \cdot \frac{1}{t_0}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < +inf.0Initial program 94.4%
*-commutative94.4%
associate-*l/97.8%
*-commutative97.8%
sub-neg97.8%
metadata-eval97.8%
Simplified97.8%
Taylor expanded in z around 0 97.8%
div-inv97.8%
*-commutative97.8%
+-commutative97.8%
Applied egg-rr97.8%
associate-*l*99.4%
Simplified99.4%
if +inf.0 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) Initial program 0.0%
associate-/l*0.0%
sub-neg0.0%
metadata-eval0.0%
fma-def0.0%
fma-def0.0%
fma-def0.0%
fma-def0.0%
fma-def0.0%
fma-def0.0%
fma-def0.0%
Simplified0.0%
Taylor expanded in x around inf 98.6%
Final simplification99.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
47.066876606
(*
x
(+
313.399215894
(* x (+ 263.505074721 (* x (+ x 43.3400022514))))))))
(t_1
(*
x
(+
y
(*
x
(+ 137.519416416 (* x (+ (* x 4.16438922228) 78.6994924154))))))))
(if (<= (/ (* (- x 2.0) (+ t_1 z)) t_0) 5e+301)
(* (+ x -2.0) (+ (/ z t_0) (/ t_1 t_0)))
(/ (+ x -2.0) 0.24013125253755718))))
double code(double x, double y, double z) {
double t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))));
double t_1 = x * (y + (x * (137.519416416 + (x * ((x * 4.16438922228) + 78.6994924154)))));
double tmp;
if ((((x - 2.0) * (t_1 + z)) / t_0) <= 5e+301) {
tmp = (x + -2.0) * ((z / t_0) + (t_1 / t_0));
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 47.066876606d0 + (x * (313.399215894d0 + (x * (263.505074721d0 + (x * (x + 43.3400022514d0))))))
t_1 = x * (y + (x * (137.519416416d0 + (x * ((x * 4.16438922228d0) + 78.6994924154d0)))))
if ((((x - 2.0d0) * (t_1 + z)) / t_0) <= 5d+301) then
tmp = (x + (-2.0d0)) * ((z / t_0) + (t_1 / t_0))
else
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))));
double t_1 = x * (y + (x * (137.519416416 + (x * ((x * 4.16438922228) + 78.6994924154)))));
double tmp;
if ((((x - 2.0) * (t_1 + z)) / t_0) <= 5e+301) {
tmp = (x + -2.0) * ((z / t_0) + (t_1 / t_0));
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
def code(x, y, z): t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))) t_1 = x * (y + (x * (137.519416416 + (x * ((x * 4.16438922228) + 78.6994924154))))) tmp = 0 if (((x - 2.0) * (t_1 + z)) / t_0) <= 5e+301: tmp = (x + -2.0) * ((z / t_0) + (t_1 / t_0)) else: tmp = (x + -2.0) / 0.24013125253755718 return tmp
function code(x, y, z) t_0 = Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * Float64(263.505074721 + Float64(x * Float64(x + 43.3400022514))))))) t_1 = Float64(x * Float64(y + Float64(x * Float64(137.519416416 + Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)))))) tmp = 0.0 if (Float64(Float64(Float64(x - 2.0) * Float64(t_1 + z)) / t_0) <= 5e+301) tmp = Float64(Float64(x + -2.0) * Float64(Float64(z / t_0) + Float64(t_1 / t_0))); else tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))); t_1 = x * (y + (x * (137.519416416 + (x * ((x * 4.16438922228) + 78.6994924154))))); tmp = 0.0; if ((((x - 2.0) * (t_1 + z)) / t_0) <= 5e+301) tmp = (x + -2.0) * ((z / t_0) + (t_1 / t_0)); else tmp = (x + -2.0) / 0.24013125253755718; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * N[(263.505074721 + N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(y + N[(x * N[(137.519416416 + N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(x - 2.0), $MachinePrecision] * N[(t$95$1 + z), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], 5e+301], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(z / t$95$0), $MachinePrecision] + N[(t$95$1 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)\\
t_1 := x \cdot \left(y + x \cdot \left(137.519416416 + x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right)\right)\right)\\
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(t_1 + z\right)}{t_0} \leq 5 \cdot 10^{+301}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(\frac{z}{t_0} + \frac{t_1}{t_0}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < 5.0000000000000004e301Initial program 96.6%
*-commutative96.6%
associate-*l/98.9%
*-commutative98.9%
sub-neg98.9%
metadata-eval98.9%
Simplified98.9%
Taylor expanded in z around 0 98.9%
if 5.0000000000000004e301 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) Initial program 0.2%
associate-/l*2.2%
sub-neg2.2%
metadata-eval2.2%
fma-def2.2%
fma-def2.2%
fma-def2.2%
fma-def2.2%
fma-def2.2%
fma-def2.2%
fma-def2.2%
Simplified2.2%
Taylor expanded in x around inf 96.6%
Final simplification98.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(/
(*
(- x 2.0)
(+
(*
x
(+
y
(*
x
(+ 137.519416416 (* x (+ (* x 4.16438922228) 78.6994924154))))))
z))
(+
47.066876606
(*
x
(+
313.399215894
(* x (+ 263.505074721 (* x (+ x 43.3400022514))))))))))
(if (<= t_0 5e+301) t_0 (/ (+ x -2.0) 0.24013125253755718))))
double code(double x, double y, double z) {
double t_0 = ((x - 2.0) * ((x * (y + (x * (137.519416416 + (x * ((x * 4.16438922228) + 78.6994924154)))))) + z)) / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))));
double tmp;
if (t_0 <= 5e+301) {
tmp = t_0;
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = ((x - 2.0d0) * ((x * (y + (x * (137.519416416d0 + (x * ((x * 4.16438922228d0) + 78.6994924154d0)))))) + z)) / (47.066876606d0 + (x * (313.399215894d0 + (x * (263.505074721d0 + (x * (x + 43.3400022514d0)))))))
if (t_0 <= 5d+301) then
tmp = t_0
else
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((x - 2.0) * ((x * (y + (x * (137.519416416 + (x * ((x * 4.16438922228) + 78.6994924154)))))) + z)) / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))));
double tmp;
if (t_0 <= 5e+301) {
tmp = t_0;
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
def code(x, y, z): t_0 = ((x - 2.0) * ((x * (y + (x * (137.519416416 + (x * ((x * 4.16438922228) + 78.6994924154)))))) + z)) / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))))) tmp = 0 if t_0 <= 5e+301: tmp = t_0 else: tmp = (x + -2.0) / 0.24013125253755718 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(y + Float64(x * Float64(137.519416416 + Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)))))) + z)) / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * Float64(263.505074721 + Float64(x * Float64(x + 43.3400022514)))))))) tmp = 0.0 if (t_0 <= 5e+301) tmp = t_0; else tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((x - 2.0) * ((x * (y + (x * (137.519416416 + (x * ((x * 4.16438922228) + 78.6994924154)))))) + z)) / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))))); tmp = 0.0; if (t_0 <= 5e+301) tmp = t_0; else tmp = (x + -2.0) / 0.24013125253755718; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(y + N[(x * N[(137.519416416 + N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * N[(263.505074721 + N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 5e+301], t$95$0, N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\left(x - 2\right) \cdot \left(x \cdot \left(y + x \cdot \left(137.519416416 + x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right)\right)\right) + z\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)}\\
\mathbf{if}\;t_0 \leq 5 \cdot 10^{+301}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < 5.0000000000000004e301Initial program 96.6%
if 5.0000000000000004e301 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) Initial program 0.2%
associate-/l*2.2%
sub-neg2.2%
metadata-eval2.2%
fma-def2.2%
fma-def2.2%
fma-def2.2%
fma-def2.2%
fma-def2.2%
fma-def2.2%
fma-def2.2%
Simplified2.2%
Taylor expanded in x around inf 96.6%
Final simplification96.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
47.066876606
(*
x
(+
313.399215894
(* x (+ 263.505074721 (* x (+ x 43.3400022514)))))))))
(if (<= x -5.4e+19)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 7.2e-7)
(/ (* (- 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 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))));
double tmp;
if (x <= -5.4e+19) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 7.2e-7) {
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 = 47.066876606d0 + (x * (313.399215894d0 + (x * (263.505074721d0 + (x * (x + 43.3400022514d0))))))
if (x <= (-5.4d+19)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 7.2d-7) 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 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))));
double tmp;
if (x <= -5.4e+19) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 7.2e-7) {
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 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))) tmp = 0 if x <= -5.4e+19: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 7.2e-7: 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(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * Float64(263.505074721 + Float64(x * Float64(x + 43.3400022514))))))) tmp = 0.0 if (x <= -5.4e+19) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 7.2e-7) 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 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))); tmp = 0.0; if (x <= -5.4e+19) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 7.2e-7) 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[(47.066876606 + N[(x * N[(313.399215894 + N[(x * N[(263.505074721 + N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.4e+19], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 7.2e-7], 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 := 47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)\\
\mathbf{if}\;x \leq -5.4 \cdot 10^{+19}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 7.2 \cdot 10^{-7}:\\
\;\;\;\;\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 < -5.4e19Initial program 2.1%
associate-/l*5.9%
sub-neg5.9%
metadata-eval5.9%
fma-def5.9%
fma-def5.9%
fma-def5.9%
fma-def5.9%
fma-def5.9%
fma-def5.9%
fma-def5.9%
Simplified5.9%
Taylor expanded in x around inf 97.5%
if -5.4e19 < x < 7.19999999999999989e-7Initial program 99.6%
Taylor expanded in x around 0 98.4%
*-commutative98.4%
Simplified98.4%
if 7.19999999999999989e-7 < x Initial program 15.9%
*-commutative15.9%
associate-*l/22.5%
*-commutative22.5%
sub-neg22.5%
metadata-eval22.5%
Simplified22.5%
Taylor expanded in z around 0 22.5%
Taylor expanded in x around inf 90.6%
Final simplification96.4%
(FPCore (x y z)
:precision binary64
(if (or (<= x -1.65e-5) (not (<= x 5.5e-7)))
(*
(+ x -2.0)
(+
4.16438922228
(/
z
(+
47.066876606
(*
x
(+
313.399215894
(* x (+ 263.505074721 (* x (+ x 43.3400022514))))))))))
(*
(+ x -2.0)
(+
(* z 0.0212463641547976)
(* x (- (* y 0.0212463641547976) (* z 0.14147091005106402)))))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1.65e-5) || !(x <= 5.5e-7)) {
tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))))));
} else {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-1.65d-5)) .or. (.not. (x <= 5.5d-7))) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 + (z / (47.066876606d0 + (x * (313.399215894d0 + (x * (263.505074721d0 + (x * (x + 43.3400022514d0)))))))))
else
tmp = (x + (-2.0d0)) * ((z * 0.0212463641547976d0) + (x * ((y * 0.0212463641547976d0) - (z * 0.14147091005106402d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -1.65e-5) || !(x <= 5.5e-7)) {
tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))))));
} else {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1.65e-5) or not (x <= 5.5e-7): tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))))))) else: tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402)))) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -1.65e-5) || !(x <= 5.5e-7)) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(z / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * Float64(263.505074721 + Float64(x * Float64(x + 43.3400022514)))))))))); else tmp = Float64(Float64(x + -2.0) * Float64(Float64(z * 0.0212463641547976) + Float64(x * Float64(Float64(y * 0.0212463641547976) - Float64(z * 0.14147091005106402))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -1.65e-5) || ~((x <= 5.5e-7))) tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))))))); else tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -1.65e-5], N[Not[LessEqual[x, 5.5e-7]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(z / N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * N[(263.505074721 + N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(z * 0.0212463641547976), $MachinePrecision] + N[(x * N[(N[(y * 0.0212463641547976), $MachinePrecision] - N[(z * 0.14147091005106402), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.65 \cdot 10^{-5} \lor \neg \left(x \leq 5.5 \cdot 10^{-7}\right):\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{z}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976 + x \cdot \left(y \cdot 0.0212463641547976 - z \cdot 0.14147091005106402\right)\right)\\
\end{array}
\end{array}
if x < -1.6500000000000001e-5 or 5.5000000000000003e-7 < x Initial program 15.7%
*-commutative15.7%
associate-*l/20.6%
*-commutative20.6%
sub-neg20.6%
metadata-eval20.6%
Simplified20.6%
Taylor expanded in z around 0 20.6%
Taylor expanded in x around inf 89.9%
if -1.6500000000000001e-5 < x < 5.5000000000000003e-7Initial program 99.6%
*-commutative99.6%
associate-*l/99.6%
*-commutative99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 94.2%
Final simplification92.2%
(FPCore (x y z)
:precision binary64
(if (or (<= x -3.6e-5) (not (<= x 7.2e-7)))
(*
(+ x -2.0)
(+
4.16438922228
(/
z
(+
47.066876606
(* x (+ 313.399215894 (* x (+ 263.505074721 (* x x)))))))))
(*
(+ x -2.0)
(+
(* z 0.0212463641547976)
(* x (- (* y 0.0212463641547976) (* z 0.14147091005106402)))))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -3.6e-5) || !(x <= 7.2e-7)) {
tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * x))))))));
} else {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-3.6d-5)) .or. (.not. (x <= 7.2d-7))) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 + (z / (47.066876606d0 + (x * (313.399215894d0 + (x * (263.505074721d0 + (x * x))))))))
else
tmp = (x + (-2.0d0)) * ((z * 0.0212463641547976d0) + (x * ((y * 0.0212463641547976d0) - (z * 0.14147091005106402d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -3.6e-5) || !(x <= 7.2e-7)) {
tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * x))))))));
} else {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -3.6e-5) or not (x <= 7.2e-7): tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * x)))))))) else: tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402)))) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -3.6e-5) || !(x <= 7.2e-7)) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(z / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * Float64(263.505074721 + Float64(x * x))))))))); else tmp = Float64(Float64(x + -2.0) * Float64(Float64(z * 0.0212463641547976) + Float64(x * Float64(Float64(y * 0.0212463641547976) - Float64(z * 0.14147091005106402))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -3.6e-5) || ~((x <= 7.2e-7))) tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * x)))))))); else tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -3.6e-5], N[Not[LessEqual[x, 7.2e-7]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(z / N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * N[(263.505074721 + N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(z * 0.0212463641547976), $MachinePrecision] + N[(x * N[(N[(y * 0.0212463641547976), $MachinePrecision] - N[(z * 0.14147091005106402), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.6 \cdot 10^{-5} \lor \neg \left(x \leq 7.2 \cdot 10^{-7}\right):\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{z}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot x\right)\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976 + x \cdot \left(y \cdot 0.0212463641547976 - z \cdot 0.14147091005106402\right)\right)\\
\end{array}
\end{array}
if x < -3.60000000000000009e-5 or 7.19999999999999989e-7 < x Initial program 15.7%
*-commutative15.7%
associate-*l/20.6%
*-commutative20.6%
sub-neg20.6%
metadata-eval20.6%
Simplified20.6%
Taylor expanded in z around 0 20.6%
Taylor expanded in x around inf 89.9%
Taylor expanded in x around inf 88.2%
unpow288.2%
Simplified88.2%
if -3.60000000000000009e-5 < x < 7.19999999999999989e-7Initial program 99.6%
*-commutative99.6%
associate-*l/99.6%
*-commutative99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 94.2%
Final simplification91.5%
(FPCore (x y z)
:precision binary64
(if (<= x -3600000000000.0)
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x)))
(if (<= x 21.0)
(*
(+ x -2.0)
(+
(* z 0.0212463641547976)
(* x (- (* y 0.0212463641547976) (* z 0.14147091005106402)))))
(/
(+ x -2.0)
(+
0.24013125253755718
(- (/ 5.86923874282773 x) (/ 55.572073733743466 (* x x))))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -3600000000000.0) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else if (x <= 21.0) {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402))));
} else {
tmp = (x + -2.0) / (0.24013125253755718 + ((5.86923874282773 / x) - (55.572073733743466 / (x * x))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-3600000000000.0d0)) then
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
else if (x <= 21.0d0) then
tmp = (x + (-2.0d0)) * ((z * 0.0212463641547976d0) + (x * ((y * 0.0212463641547976d0) - (z * 0.14147091005106402d0))))
else
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + ((5.86923874282773d0 / x) - (55.572073733743466d0 / (x * x))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -3600000000000.0) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else if (x <= 21.0) {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402))));
} else {
tmp = (x + -2.0) / (0.24013125253755718 + ((5.86923874282773 / x) - (55.572073733743466 / (x * x))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -3600000000000.0: tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) elif x <= 21.0: tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402)))) else: tmp = (x + -2.0) / (0.24013125253755718 + ((5.86923874282773 / x) - (55.572073733743466 / (x * x)))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -3600000000000.0) tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); elseif (x <= 21.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(0.24013125253755718 + Float64(Float64(5.86923874282773 / x) - Float64(55.572073733743466 / Float64(x * x))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -3600000000000.0) tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); elseif (x <= 21.0) tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402)))); else tmp = (x + -2.0) / (0.24013125253755718 + ((5.86923874282773 / x) - (55.572073733743466 / (x * x)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -3600000000000.0], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 21.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[(0.24013125253755718 + N[(N[(5.86923874282773 / x), $MachinePrecision] - N[(55.572073733743466 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3600000000000:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\mathbf{elif}\;x \leq 21:\\
\;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976 + x \cdot \left(y \cdot 0.0212463641547976 - z \cdot 0.14147091005106402\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \left(\frac{5.86923874282773}{x} - \frac{55.572073733743466}{x \cdot x}\right)}\\
\end{array}
\end{array}
if x < -3.6e12Initial program 7.6%
associate-/l*11.2%
sub-neg11.2%
metadata-eval11.2%
fma-def11.2%
fma-def11.2%
fma-def11.2%
fma-def11.2%
fma-def11.2%
fma-def11.2%
fma-def11.2%
Simplified11.2%
Taylor expanded in x around inf 94.0%
associate-*r/94.0%
metadata-eval94.0%
Simplified94.0%
if -3.6e12 < x < 21Initial program 99.6%
*-commutative99.6%
associate-*l/99.5%
*-commutative99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.6%
Taylor expanded in x around 0 90.3%
if 21 < x Initial program 11.3%
associate-/l*18.3%
sub-neg18.3%
metadata-eval18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
Simplified18.3%
Taylor expanded in x around inf 88.4%
associate--l+88.4%
associate-*r/88.4%
metadata-eval88.4%
associate-*r/88.4%
metadata-eval88.4%
unpow288.4%
Simplified88.4%
Final simplification90.6%
(FPCore (x y z)
:precision binary64
(if (<= x -6000000000.0)
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x)))
(if (<= x 0.2)
(+
(* x (- (* z 0.0212463641547976) (* z -0.28294182010212804)))
(* z -0.0424927283095952))
(/
(+ x -2.0)
(+
0.24013125253755718
(- (/ 5.86923874282773 x) (/ 55.572073733743466 (* x x))))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -6000000000.0) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else if (x <= 0.2) {
tmp = (x * ((z * 0.0212463641547976) - (z * -0.28294182010212804))) + (z * -0.0424927283095952);
} else {
tmp = (x + -2.0) / (0.24013125253755718 + ((5.86923874282773 / x) - (55.572073733743466 / (x * x))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-6000000000.0d0)) then
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
else if (x <= 0.2d0) then
tmp = (x * ((z * 0.0212463641547976d0) - (z * (-0.28294182010212804d0)))) + (z * (-0.0424927283095952d0))
else
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + ((5.86923874282773d0 / x) - (55.572073733743466d0 / (x * x))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -6000000000.0) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else if (x <= 0.2) {
tmp = (x * ((z * 0.0212463641547976) - (z * -0.28294182010212804))) + (z * -0.0424927283095952);
} else {
tmp = (x + -2.0) / (0.24013125253755718 + ((5.86923874282773 / x) - (55.572073733743466 / (x * x))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -6000000000.0: tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) elif x <= 0.2: tmp = (x * ((z * 0.0212463641547976) - (z * -0.28294182010212804))) + (z * -0.0424927283095952) else: tmp = (x + -2.0) / (0.24013125253755718 + ((5.86923874282773 / x) - (55.572073733743466 / (x * x)))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -6000000000.0) tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); elseif (x <= 0.2) tmp = Float64(Float64(x * Float64(Float64(z * 0.0212463641547976) - Float64(z * -0.28294182010212804))) + Float64(z * -0.0424927283095952)); else tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(Float64(5.86923874282773 / x) - Float64(55.572073733743466 / Float64(x * x))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -6000000000.0) tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); elseif (x <= 0.2) tmp = (x * ((z * 0.0212463641547976) - (z * -0.28294182010212804))) + (z * -0.0424927283095952); else tmp = (x + -2.0) / (0.24013125253755718 + ((5.86923874282773 / x) - (55.572073733743466 / (x * x)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -6000000000.0], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 0.2], N[(N[(x * N[(N[(z * 0.0212463641547976), $MachinePrecision] - N[(z * -0.28294182010212804), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z * -0.0424927283095952), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(N[(5.86923874282773 / x), $MachinePrecision] - N[(55.572073733743466 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6000000000:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\mathbf{elif}\;x \leq 0.2:\\
\;\;\;\;x \cdot \left(z \cdot 0.0212463641547976 - z \cdot -0.28294182010212804\right) + z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \left(\frac{5.86923874282773}{x} - \frac{55.572073733743466}{x \cdot x}\right)}\\
\end{array}
\end{array}
if x < -6e9Initial program 9.3%
associate-/l*12.8%
sub-neg12.8%
metadata-eval12.8%
fma-def12.8%
fma-def12.8%
fma-def12.8%
fma-def12.8%
fma-def12.8%
fma-def12.8%
fma-def12.8%
Simplified12.8%
Taylor expanded in x around inf 92.3%
associate-*r/92.3%
metadata-eval92.3%
Simplified92.3%
if -6e9 < x < 0.20000000000000001Initial program 99.6%
associate-/l*99.5%
sub-neg99.5%
metadata-eval99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
Simplified99.5%
Taylor expanded in y around 0 75.0%
Taylor expanded in x around 0 74.5%
*-commutative74.5%
unpow274.5%
associate-*l*74.5%
Simplified74.5%
Taylor expanded in x around 0 67.7%
if 0.20000000000000001 < x Initial program 11.3%
associate-/l*18.3%
sub-neg18.3%
metadata-eval18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
Simplified18.3%
Taylor expanded in x around inf 88.4%
associate--l+88.4%
associate-*r/88.4%
metadata-eval88.4%
associate-*r/88.4%
metadata-eval88.4%
unpow288.4%
Simplified88.4%
Final simplification77.3%
(FPCore (x y z)
:precision binary64
(if (<= x -0.00026)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 22.0)
(/ (+ x -2.0) (+ (* 313.399215894 (/ x z)) (* 47.066876606 (/ 1.0 z))))
(/
(+ x -2.0)
(+
0.24013125253755718
(- (/ 5.86923874282773 x) (/ 55.572073733743466 (* x x))))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.00026) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 22.0) {
tmp = (x + -2.0) / ((313.399215894 * (x / z)) + (47.066876606 * (1.0 / z)));
} else {
tmp = (x + -2.0) / (0.24013125253755718 + ((5.86923874282773 / x) - (55.572073733743466 / (x * x))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-0.00026d0)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 22.0d0) then
tmp = (x + (-2.0d0)) / ((313.399215894d0 * (x / z)) + (47.066876606d0 * (1.0d0 / z)))
else
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + ((5.86923874282773d0 / x) - (55.572073733743466d0 / (x * x))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -0.00026) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 22.0) {
tmp = (x + -2.0) / ((313.399215894 * (x / z)) + (47.066876606 * (1.0 / z)));
} else {
tmp = (x + -2.0) / (0.24013125253755718 + ((5.86923874282773 / x) - (55.572073733743466 / (x * x))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -0.00026: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 22.0: tmp = (x + -2.0) / ((313.399215894 * (x / z)) + (47.066876606 * (1.0 / z))) else: tmp = (x + -2.0) / (0.24013125253755718 + ((5.86923874282773 / x) - (55.572073733743466 / (x * x)))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -0.00026) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 22.0) tmp = Float64(Float64(x + -2.0) / Float64(Float64(313.399215894 * Float64(x / z)) + Float64(47.066876606 * Float64(1.0 / z)))); else tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(Float64(5.86923874282773 / x) - Float64(55.572073733743466 / Float64(x * x))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -0.00026) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 22.0) tmp = (x + -2.0) / ((313.399215894 * (x / z)) + (47.066876606 * (1.0 / z))); else tmp = (x + -2.0) / (0.24013125253755718 + ((5.86923874282773 / x) - (55.572073733743466 / (x * x)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -0.00026], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 22.0], N[(N[(x + -2.0), $MachinePrecision] / N[(N[(313.399215894 * N[(x / z), $MachinePrecision]), $MachinePrecision] + N[(47.066876606 * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(N[(5.86923874282773 / x), $MachinePrecision] - N[(55.572073733743466 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.00026:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 22:\\
\;\;\;\;\frac{x + -2}{313.399215894 \cdot \frac{x}{z} + 47.066876606 \cdot \frac{1}{z}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \left(\frac{5.86923874282773}{x} - \frac{55.572073733743466}{x \cdot x}\right)}\\
\end{array}
\end{array}
if x < -2.59999999999999977e-4Initial program 15.4%
associate-/l*18.7%
sub-neg18.7%
metadata-eval18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
Simplified18.7%
Taylor expanded in x around inf 86.2%
if -2.59999999999999977e-4 < x < 22Initial program 99.6%
associate-/l*99.5%
sub-neg99.5%
metadata-eval99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
Simplified99.5%
Taylor expanded in y around 0 75.0%
Taylor expanded in x around 0 69.4%
if 22 < x Initial program 11.3%
associate-/l*18.3%
sub-neg18.3%
metadata-eval18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
fma-def18.3%
Simplified18.3%
Taylor expanded in x around inf 88.4%
associate--l+88.4%
associate-*r/88.4%
metadata-eval88.4%
associate-*r/88.4%
metadata-eval88.4%
unpow288.4%
Simplified88.4%
Final simplification77.3%
(FPCore (x y z)
:precision binary64
(if (or (<= x -6000000000.0) (not (<= x 0.14)))
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x)))
(+
(* x (- (* z 0.0212463641547976) (* z -0.28294182010212804)))
(* z -0.0424927283095952))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -6000000000.0) || !(x <= 0.14)) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else {
tmp = (x * ((z * 0.0212463641547976) - (z * -0.28294182010212804))) + (z * -0.0424927283095952);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-6000000000.0d0)) .or. (.not. (x <= 0.14d0))) then
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
else
tmp = (x * ((z * 0.0212463641547976d0) - (z * (-0.28294182010212804d0)))) + (z * (-0.0424927283095952d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -6000000000.0) || !(x <= 0.14)) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else {
tmp = (x * ((z * 0.0212463641547976) - (z * -0.28294182010212804))) + (z * -0.0424927283095952);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -6000000000.0) or not (x <= 0.14): tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) else: tmp = (x * ((z * 0.0212463641547976) - (z * -0.28294182010212804))) + (z * -0.0424927283095952) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -6000000000.0) || !(x <= 0.14)) tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); else tmp = Float64(Float64(x * Float64(Float64(z * 0.0212463641547976) - Float64(z * -0.28294182010212804))) + Float64(z * -0.0424927283095952)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -6000000000.0) || ~((x <= 0.14))) tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); else tmp = (x * ((z * 0.0212463641547976) - (z * -0.28294182010212804))) + (z * -0.0424927283095952); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -6000000000.0], N[Not[LessEqual[x, 0.14]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[(z * 0.0212463641547976), $MachinePrecision] - N[(z * -0.28294182010212804), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z * -0.0424927283095952), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6000000000 \lor \neg \left(x \leq 0.14\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(z \cdot 0.0212463641547976 - z \cdot -0.28294182010212804\right) + z \cdot -0.0424927283095952\\
\end{array}
\end{array}
if x < -6e9 or 0.14000000000000001 < x Initial program 10.3%
associate-/l*15.6%
sub-neg15.6%
metadata-eval15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
Simplified15.6%
Taylor expanded in x around inf 90.2%
associate-*r/90.2%
metadata-eval90.2%
Simplified90.2%
if -6e9 < x < 0.14000000000000001Initial program 99.6%
associate-/l*99.5%
sub-neg99.5%
metadata-eval99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
Simplified99.5%
Taylor expanded in y around 0 75.0%
Taylor expanded in x around 0 74.5%
*-commutative74.5%
unpow274.5%
associate-*l*74.5%
Simplified74.5%
Taylor expanded in x around 0 67.7%
Final simplification77.3%
(FPCore (x y z) :precision binary64 (if (or (<= x -6000000000.0) (not (<= x 430.0))) (/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x))) (/ (+ x -2.0) (/ 47.066876606 z))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -6000000000.0) || !(x <= 430.0)) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else {
tmp = (x + -2.0) / (47.066876606 / z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-6000000000.0d0)) .or. (.not. (x <= 430.0d0))) then
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
else
tmp = (x + (-2.0d0)) / (47.066876606d0 / z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -6000000000.0) || !(x <= 430.0)) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else {
tmp = (x + -2.0) / (47.066876606 / z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -6000000000.0) or not (x <= 430.0): tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) else: tmp = (x + -2.0) / (47.066876606 / z) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -6000000000.0) || !(x <= 430.0)) tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); else tmp = Float64(Float64(x + -2.0) / Float64(47.066876606 / z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -6000000000.0) || ~((x <= 430.0))) tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); else tmp = (x + -2.0) / (47.066876606 / z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -6000000000.0], N[Not[LessEqual[x, 430.0]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / N[(47.066876606 / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6000000000 \lor \neg \left(x \leq 430\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{\frac{47.066876606}{z}}\\
\end{array}
\end{array}
if x < -6e9 or 430 < x Initial program 10.3%
associate-/l*15.6%
sub-neg15.6%
metadata-eval15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
fma-def15.6%
Simplified15.6%
Taylor expanded in x around inf 90.2%
associate-*r/90.2%
metadata-eval90.2%
Simplified90.2%
if -6e9 < x < 430Initial program 99.6%
associate-/l*99.5%
sub-neg99.5%
metadata-eval99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
Simplified99.5%
Taylor expanded in x around 0 67.0%
Final simplification76.9%
(FPCore (x y z)
:precision binary64
(if (<= x -0.00026)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 1300.0)
(* z (- (/ x 47.066876606) 0.0424927283095952))
(- (* x 4.16438922228) 110.1139242984811))))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.00026) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 1300.0) {
tmp = z * ((x / 47.066876606) - 0.0424927283095952);
} else {
tmp = (x * 4.16438922228) - 110.1139242984811;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-0.00026d0)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 1300.0d0) then
tmp = z * ((x / 47.066876606d0) - 0.0424927283095952d0)
else
tmp = (x * 4.16438922228d0) - 110.1139242984811d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -0.00026) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 1300.0) {
tmp = z * ((x / 47.066876606) - 0.0424927283095952);
} else {
tmp = (x * 4.16438922228) - 110.1139242984811;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -0.00026: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 1300.0: tmp = z * ((x / 47.066876606) - 0.0424927283095952) else: tmp = (x * 4.16438922228) - 110.1139242984811 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -0.00026) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 1300.0) tmp = Float64(z * Float64(Float64(x / 47.066876606) - 0.0424927283095952)); else tmp = Float64(Float64(x * 4.16438922228) - 110.1139242984811); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -0.00026) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 1300.0) tmp = z * ((x / 47.066876606) - 0.0424927283095952); else tmp = (x * 4.16438922228) - 110.1139242984811; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -0.00026], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 1300.0], N[(z * N[(N[(x / 47.066876606), $MachinePrecision] - 0.0424927283095952), $MachinePrecision]), $MachinePrecision], N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.00026:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 1300:\\
\;\;\;\;z \cdot \left(\frac{x}{47.066876606} - 0.0424927283095952\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\
\end{array}
\end{array}
if x < -2.59999999999999977e-4Initial program 15.4%
associate-/l*18.7%
sub-neg18.7%
metadata-eval18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
Simplified18.7%
Taylor expanded in x around inf 86.2%
if -2.59999999999999977e-4 < x < 1300Initial program 99.6%
associate-/l*99.5%
sub-neg99.5%
metadata-eval99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
Simplified99.5%
Taylor expanded in x around 0 68.7%
Taylor expanded in x around 0 68.6%
metadata-eval68.6%
associate-*r*68.6%
*-commutative68.6%
associate-*l*68.6%
*-commutative68.6%
distribute-rgt-in68.6%
metadata-eval68.6%
associate-/r/68.7%
+-commutative68.7%
associate-*l/68.7%
*-commutative68.7%
*-rgt-identity68.7%
associate-/r/68.6%
*-commutative68.6%
metadata-eval68.6%
sub-neg68.6%
div-sub68.6%
metadata-eval68.6%
Simplified68.6%
if 1300 < x Initial program 11.3%
*-commutative11.3%
associate-*l/18.3%
*-commutative18.3%
sub-neg18.3%
metadata-eval18.3%
Simplified18.3%
Taylor expanded in x around inf 87.6%
Final simplification76.7%
(FPCore (x y z)
:precision binary64
(if (<= x -0.00026)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 45.0)
(/ (+ x -2.0) (/ 47.066876606 z))
(- (* x 4.16438922228) 110.1139242984811))))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.00026) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 45.0) {
tmp = (x + -2.0) / (47.066876606 / z);
} else {
tmp = (x * 4.16438922228) - 110.1139242984811;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-0.00026d0)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 45.0d0) then
tmp = (x + (-2.0d0)) / (47.066876606d0 / z)
else
tmp = (x * 4.16438922228d0) - 110.1139242984811d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -0.00026) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 45.0) {
tmp = (x + -2.0) / (47.066876606 / z);
} else {
tmp = (x * 4.16438922228) - 110.1139242984811;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -0.00026: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 45.0: tmp = (x + -2.0) / (47.066876606 / z) else: tmp = (x * 4.16438922228) - 110.1139242984811 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -0.00026) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 45.0) tmp = Float64(Float64(x + -2.0) / Float64(47.066876606 / z)); else tmp = Float64(Float64(x * 4.16438922228) - 110.1139242984811); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -0.00026) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 45.0) tmp = (x + -2.0) / (47.066876606 / z); else tmp = (x * 4.16438922228) - 110.1139242984811; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -0.00026], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 45.0], N[(N[(x + -2.0), $MachinePrecision] / N[(47.066876606 / z), $MachinePrecision]), $MachinePrecision], N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.00026:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 45:\\
\;\;\;\;\frac{x + -2}{\frac{47.066876606}{z}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\
\end{array}
\end{array}
if x < -2.59999999999999977e-4Initial program 15.4%
associate-/l*18.7%
sub-neg18.7%
metadata-eval18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
Simplified18.7%
Taylor expanded in x around inf 86.2%
if -2.59999999999999977e-4 < x < 45Initial program 99.6%
associate-/l*99.5%
sub-neg99.5%
metadata-eval99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
Simplified99.5%
Taylor expanded in x around 0 68.7%
if 45 < x Initial program 11.3%
*-commutative11.3%
associate-*l/18.3%
*-commutative18.3%
sub-neg18.3%
metadata-eval18.3%
Simplified18.3%
Taylor expanded in x around inf 87.6%
Final simplification76.7%
(FPCore (x y z) :precision binary64 (if (or (<= x -0.00026) (not (<= x 26.0))) (- (* x 4.16438922228) 110.1139242984811) (* z -0.0424927283095952)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -0.00026) || !(x <= 26.0)) {
tmp = (x * 4.16438922228) - 110.1139242984811;
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-0.00026d0)) .or. (.not. (x <= 26.0d0))) then
tmp = (x * 4.16438922228d0) - 110.1139242984811d0
else
tmp = z * (-0.0424927283095952d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -0.00026) || !(x <= 26.0)) {
tmp = (x * 4.16438922228) - 110.1139242984811;
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -0.00026) or not (x <= 26.0): tmp = (x * 4.16438922228) - 110.1139242984811 else: tmp = z * -0.0424927283095952 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -0.00026) || !(x <= 26.0)) tmp = Float64(Float64(x * 4.16438922228) - 110.1139242984811); else tmp = Float64(z * -0.0424927283095952); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -0.00026) || ~((x <= 26.0))) tmp = (x * 4.16438922228) - 110.1139242984811; else tmp = z * -0.0424927283095952; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -0.00026], N[Not[LessEqual[x, 26.0]], $MachinePrecision]], N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision], N[(z * -0.0424927283095952), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.00026 \lor \neg \left(x \leq 26\right):\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\
\mathbf{else}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\end{array}
\end{array}
if x < -2.59999999999999977e-4 or 26 < x Initial program 13.4%
*-commutative13.4%
associate-*l/18.5%
*-commutative18.5%
sub-neg18.5%
metadata-eval18.5%
Simplified18.5%
Taylor expanded in x around inf 86.7%
if -2.59999999999999977e-4 < x < 26Initial program 99.6%
*-commutative99.6%
associate-*l/99.6%
*-commutative99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 68.6%
*-commutative68.6%
Simplified68.6%
Final simplification76.6%
(FPCore (x y z) :precision binary64 (if (<= x -0.00026) (* x 4.16438922228) (if (<= x 1.95) (* z -0.0424927283095952) (* 4.16438922228 (+ x -2.0)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.00026) {
tmp = x * 4.16438922228;
} else if (x <= 1.95) {
tmp = z * -0.0424927283095952;
} else {
tmp = 4.16438922228 * (x + -2.0);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-0.00026d0)) then
tmp = x * 4.16438922228d0
else if (x <= 1.95d0) then
tmp = z * (-0.0424927283095952d0)
else
tmp = 4.16438922228d0 * (x + (-2.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -0.00026) {
tmp = x * 4.16438922228;
} else if (x <= 1.95) {
tmp = z * -0.0424927283095952;
} else {
tmp = 4.16438922228 * (x + -2.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -0.00026: tmp = x * 4.16438922228 elif x <= 1.95: tmp = z * -0.0424927283095952 else: tmp = 4.16438922228 * (x + -2.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -0.00026) tmp = Float64(x * 4.16438922228); elseif (x <= 1.95) tmp = Float64(z * -0.0424927283095952); else tmp = Float64(4.16438922228 * Float64(x + -2.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -0.00026) tmp = x * 4.16438922228; elseif (x <= 1.95) tmp = z * -0.0424927283095952; else tmp = 4.16438922228 * (x + -2.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -0.00026], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 1.95], N[(z * -0.0424927283095952), $MachinePrecision], N[(4.16438922228 * N[(x + -2.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.00026:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 1.95:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;4.16438922228 \cdot \left(x + -2\right)\\
\end{array}
\end{array}
if x < -2.59999999999999977e-4Initial program 15.4%
*-commutative15.4%
associate-*l/18.7%
*-commutative18.7%
sub-neg18.7%
metadata-eval18.7%
Simplified18.7%
Taylor expanded in x around inf 85.9%
Taylor expanded in x around inf 85.7%
*-commutative85.7%
Simplified85.7%
if -2.59999999999999977e-4 < x < 1.94999999999999996Initial program 99.6%
*-commutative99.6%
associate-*l/99.6%
*-commutative99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 68.6%
*-commutative68.6%
Simplified68.6%
if 1.94999999999999996 < x Initial program 11.3%
*-commutative11.3%
associate-*l/18.3%
*-commutative18.3%
sub-neg18.3%
metadata-eval18.3%
Simplified18.3%
Taylor expanded in x around inf 86.5%
Final simplification76.3%
(FPCore (x y z)
:precision binary64
(if (<= x -0.00026)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 26.0)
(* z -0.0424927283095952)
(- (* x 4.16438922228) 110.1139242984811))))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.00026) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 26.0) {
tmp = z * -0.0424927283095952;
} else {
tmp = (x * 4.16438922228) - 110.1139242984811;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-0.00026d0)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 26.0d0) then
tmp = z * (-0.0424927283095952d0)
else
tmp = (x * 4.16438922228d0) - 110.1139242984811d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -0.00026) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 26.0) {
tmp = z * -0.0424927283095952;
} else {
tmp = (x * 4.16438922228) - 110.1139242984811;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -0.00026: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 26.0: tmp = z * -0.0424927283095952 else: tmp = (x * 4.16438922228) - 110.1139242984811 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -0.00026) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 26.0) tmp = Float64(z * -0.0424927283095952); else tmp = Float64(Float64(x * 4.16438922228) - 110.1139242984811); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -0.00026) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 26.0) tmp = z * -0.0424927283095952; else tmp = (x * 4.16438922228) - 110.1139242984811; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -0.00026], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 26.0], N[(z * -0.0424927283095952), $MachinePrecision], N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.00026:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 26:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\
\end{array}
\end{array}
if x < -2.59999999999999977e-4Initial program 15.4%
associate-/l*18.7%
sub-neg18.7%
metadata-eval18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
fma-def18.7%
Simplified18.7%
Taylor expanded in x around inf 86.2%
if -2.59999999999999977e-4 < x < 26Initial program 99.6%
*-commutative99.6%
associate-*l/99.6%
*-commutative99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 68.6%
*-commutative68.6%
Simplified68.6%
if 26 < x Initial program 11.3%
*-commutative11.3%
associate-*l/18.3%
*-commutative18.3%
sub-neg18.3%
metadata-eval18.3%
Simplified18.3%
Taylor expanded in x around inf 87.6%
Final simplification76.7%
(FPCore (x y z) :precision binary64 (if (<= x -0.00026) (* x 4.16438922228) (if (<= x 2.0) (* z -0.0424927283095952) (* x 4.16438922228))))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.00026) {
tmp = x * 4.16438922228;
} else if (x <= 2.0) {
tmp = z * -0.0424927283095952;
} else {
tmp = x * 4.16438922228;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-0.00026d0)) then
tmp = x * 4.16438922228d0
else if (x <= 2.0d0) then
tmp = z * (-0.0424927283095952d0)
else
tmp = x * 4.16438922228d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -0.00026) {
tmp = x * 4.16438922228;
} else if (x <= 2.0) {
tmp = z * -0.0424927283095952;
} else {
tmp = x * 4.16438922228;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -0.00026: tmp = x * 4.16438922228 elif x <= 2.0: tmp = z * -0.0424927283095952 else: tmp = x * 4.16438922228 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -0.00026) tmp = Float64(x * 4.16438922228); elseif (x <= 2.0) tmp = Float64(z * -0.0424927283095952); else tmp = Float64(x * 4.16438922228); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -0.00026) tmp = x * 4.16438922228; elseif (x <= 2.0) tmp = z * -0.0424927283095952; else tmp = x * 4.16438922228; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -0.00026], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 2.0], N[(z * -0.0424927283095952), $MachinePrecision], N[(x * 4.16438922228), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.00026:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 2:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228\\
\end{array}
\end{array}
if x < -2.59999999999999977e-4 or 2 < x Initial program 13.4%
*-commutative13.4%
associate-*l/18.5%
*-commutative18.5%
sub-neg18.5%
metadata-eval18.5%
Simplified18.5%
Taylor expanded in x around inf 86.7%
Taylor expanded in x around inf 86.1%
*-commutative86.1%
Simplified86.1%
if -2.59999999999999977e-4 < x < 2Initial program 99.6%
*-commutative99.6%
associate-*l/99.6%
*-commutative99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 68.6%
*-commutative68.6%
Simplified68.6%
Final simplification76.3%
(FPCore (x y z) :precision binary64 (* x 4.16438922228))
double code(double x, double y, double z) {
return x * 4.16438922228;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x * 4.16438922228d0
end function
public static double code(double x, double y, double z) {
return x * 4.16438922228;
}
def code(x, y, z): return x * 4.16438922228
function code(x, y, z) return Float64(x * 4.16438922228) end
function tmp = code(x, y, z) tmp = x * 4.16438922228; end
code[x_, y_, z_] := N[(x * 4.16438922228), $MachinePrecision]
\begin{array}{l}
\\
x \cdot 4.16438922228
\end{array}
Initial program 61.6%
*-commutative61.6%
associate-*l/63.8%
*-commutative63.8%
sub-neg63.8%
metadata-eval63.8%
Simplified63.8%
Taylor expanded in x around inf 40.0%
Taylor expanded in x around inf 39.9%
*-commutative39.9%
Simplified39.9%
Final simplification39.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- (+ (/ y (* x x)) (* 4.16438922228 x)) 110.1139242984811)))
(if (< x -3.326128725870005e+62)
t_0
(if (< x 9.429991714554673e+55)
(*
(/ (- x 2.0) 1.0)
(/
(+
(*
(+
(* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x)
y)
x)
z)
(+
(*
(+
(+ (* 263.505074721 x) (+ (* 43.3400022514 (* x x)) (* x (* x x))))
313.399215894)
x)
47.066876606)))
t_0))))
double code(double x, double y, double z) {
double t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811;
double tmp;
if (x < -3.326128725870005e+62) {
tmp = t_0;
} else if (x < 9.429991714554673e+55) {
tmp = ((x - 2.0) / 1.0) * (((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / (((((263.505074721 * x) + ((43.3400022514 * (x * x)) + (x * (x * x)))) + 313.399215894) * x) + 47.066876606));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = ((y / (x * x)) + (4.16438922228d0 * x)) - 110.1139242984811d0
if (x < (-3.326128725870005d+62)) then
tmp = t_0
else if (x < 9.429991714554673d+55) then
tmp = ((x - 2.0d0) / 1.0d0) * (((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z) / (((((263.505074721d0 * x) + ((43.3400022514d0 * (x * x)) + (x * (x * x)))) + 313.399215894d0) * x) + 47.066876606d0))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811;
double tmp;
if (x < -3.326128725870005e+62) {
tmp = t_0;
} else if (x < 9.429991714554673e+55) {
tmp = ((x - 2.0) / 1.0) * (((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / (((((263.505074721 * x) + ((43.3400022514 * (x * x)) + (x * (x * x)))) + 313.399215894) * x) + 47.066876606));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811 tmp = 0 if x < -3.326128725870005e+62: tmp = t_0 elif x < 9.429991714554673e+55: tmp = ((x - 2.0) / 1.0) * (((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / (((((263.505074721 * x) + ((43.3400022514 * (x * x)) + (x * (x * x)))) + 313.399215894) * x) + 47.066876606)) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(y / Float64(x * x)) + Float64(4.16438922228 * x)) - 110.1139242984811) tmp = 0.0 if (x < -3.326128725870005e+62) tmp = t_0; elseif (x < 9.429991714554673e+55) tmp = Float64(Float64(Float64(x - 2.0) / 1.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / Float64(Float64(Float64(Float64(Float64(263.505074721 * x) + Float64(Float64(43.3400022514 * Float64(x * x)) + Float64(x * Float64(x * x)))) + 313.399215894) * x) + 47.066876606))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811; tmp = 0.0; if (x < -3.326128725870005e+62) tmp = t_0; elseif (x < 9.429991714554673e+55) tmp = ((x - 2.0) / 1.0) * (((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / (((((263.505074721 * x) + ((43.3400022514 * (x * x)) + (x * (x * x)))) + 313.399215894) * x) + 47.066876606)); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(4.16438922228 * x), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision]}, If[Less[x, -3.326128725870005e+62], t$95$0, If[Less[x, 9.429991714554673e+55], N[(N[(N[(x - 2.0), $MachinePrecision] / 1.0), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision] * x), $MachinePrecision] + 137.519416416), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision] / N[(N[(N[(N[(N[(263.505074721 * x), $MachinePrecision] + N[(N[(43.3400022514 * N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision] * x), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\frac{y}{x \cdot x} + 4.16438922228 \cdot x\right) - 110.1139242984811\\
\mathbf{if}\;x < -3.326128725870005 \cdot 10^{+62}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x < 9.429991714554673 \cdot 10^{+55}:\\
\;\;\;\;\frac{x - 2}{1} \cdot \frac{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}{\left(\left(263.505074721 \cdot x + \left(43.3400022514 \cdot \left(x \cdot x\right) + x \cdot \left(x \cdot x\right)\right)\right) + 313.399215894\right) \cdot x + 47.066876606}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
herbie shell --seed 2023297
(FPCore (x y z)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, C"
:precision binary64
:herbie-target
(if (< x -3.326128725870005e+62) (- (+ (/ y (* x x)) (* 4.16438922228 x)) 110.1139242984811) (if (< x 9.429991714554673e+55) (* (/ (- x 2.0) 1.0) (/ (+ (* (+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y) x) z) (+ (* (+ (+ (* 263.505074721 x) (+ (* 43.3400022514 (* x x)) (* x (* x x)))) 313.399215894) x) 47.066876606))) (- (+ (/ y (* x x)) (* 4.16438922228 x)) 110.1139242984811)))
(/ (* (- x 2.0) (+ (* (+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y) x) z)) (+ (* (+ (* (+ (* (+ x 43.3400022514) x) 263.505074721) x) 313.399215894) x) 47.066876606)))