
(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 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z)
:precision binary64
(/
(*
(- x 2.0)
(+
(*
(+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y)
x)
z))
(+
(* (+ (* (+ (* (+ x 43.3400022514) x) 263.505074721) x) 313.399215894) x)
47.066876606)))
double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((x - 2.0d0) * ((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z)) / (((((((x + 43.3400022514d0) * x) + 263.505074721d0) * x) + 313.399215894d0) * x) + 47.066876606d0)
end function
public static double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
def code(x, y, z): return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)
function code(x, y, z) return Float64(Float64(Float64(x - 2.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) end
function tmp = code(x, y, z) tmp = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606); end
code[x_, y_, z_] := N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision] * x), $MachinePrecision] + 137.519416416), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(x + 43.3400022514), $MachinePrecision] * x), $MachinePrecision] + 263.505074721), $MachinePrecision] * x), $MachinePrecision] + 313.399215894), $MachinePrecision] * x), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\end{array}
(FPCore (x y z)
:precision binary64
(if (<=
(/
(*
(- x 2.0)
(+
(*
x
(+
y
(*
x
(+ 137.519416416 (* x (+ 78.6994924154 (* x 4.16438922228)))))))
z))
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
INFINITY)
(*
(+ x -2.0)
(/
(fma
x
(fma x (fma x (fma x 4.16438922228 78.6994924154) 137.519416416) y)
z)
(fma
x
(fma x (fma x (+ x 43.3400022514) 263.505074721) 313.399215894)
47.066876606)))
(+
(+
(fma x 4.16438922228 (/ 3655.1204654076414 x))
(/ (- y 130977.50649958357) (* x x)))
-110.1139242984811)))
double code(double x, double y, double z) {
double tmp;
if ((((x - 2.0) * ((x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= ((double) INFINITY)) {
tmp = (x + -2.0) * (fma(x, fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), z) / fma(x, fma(x, fma(x, (x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606));
} else {
tmp = (fma(x, 4.16438922228, (3655.1204654076414 / x)) + ((y - 130977.50649958357) / (x * x))) + -110.1139242984811;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(y + Float64(x * Float64(137.519416416 + Float64(x * Float64(78.6994924154 + Float64(x * 4.16438922228))))))) + z)) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= Inf) tmp = Float64(Float64(x + -2.0) * Float64(fma(x, fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), z) / fma(x, fma(x, fma(x, Float64(x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606))); else tmp = Float64(Float64(fma(x, 4.16438922228, Float64(3655.1204654076414 / x)) + Float64(Float64(y - 130977.50649958357) / Float64(x * x))) + -110.1139242984811); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(y + N[(x * N[(137.519416416 + N[(x * N[(78.6994924154 + N[(x * 4.16438922228), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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], Infinity], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(x * N[(x * N[(x * N[(x * 4.16438922228 + 78.6994924154), $MachinePrecision] + 137.519416416), $MachinePrecision] + y), $MachinePrecision] + z), $MachinePrecision] / N[(x * N[(x * N[(x * N[(x + 43.3400022514), $MachinePrecision] + 263.505074721), $MachinePrecision] + 313.399215894), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 4.16438922228 + N[(3655.1204654076414 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(y - 130977.50649958357), $MachinePrecision] / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -110.1139242984811), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(y + x \cdot \left(137.519416416 + x \cdot \left(78.6994924154 + x \cdot 4.16438922228\right)\right)\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 \infty:\\
\;\;\;\;\left(x + -2\right) \cdot \frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right)}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\mathsf{fma}\left(x, 4.16438922228, \frac{3655.1204654076414}{x}\right) + \frac{y - 130977.50649958357}{x \cdot x}\right) + -110.1139242984811\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < +inf.0Initial program 93.9%
associate-*r/97.6%
sub-neg97.6%
metadata-eval97.6%
*-commutative97.6%
fma-def97.6%
*-commutative97.6%
fma-def97.5%
*-commutative97.5%
fma-def97.5%
fma-def97.5%
*-commutative97.5%
Simplified97.6%
if +inf.0 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) 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.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 simplification98.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
(t_1
(*
x
(+
y
(*
x
(+ 137.519416416 (* x (+ 78.6994924154 (* x 4.16438922228)))))))))
(if (<= (/ (* (- x 2.0) (+ t_1 z)) t_0) INFINITY)
(* (+ x -2.0) (+ (/ t_1 t_0) (/ z t_0)))
(+
(+
(fma x 4.16438922228 (/ 3655.1204654076414 x))
(/ (- y 130977.50649958357) (* x x)))
-110.1139242984811))))
double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double t_1 = x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))));
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 = (fma(x, 4.16438922228, (3655.1204654076414 / x)) + ((y - 130977.50649958357) / (x * x))) + -110.1139242984811;
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) t_1 = Float64(x * Float64(y + Float64(x * Float64(137.519416416 + Float64(x * Float64(78.6994924154 + Float64(x * 4.16438922228))))))) 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(Float64(fma(x, 4.16438922228, Float64(3655.1204654076414 / x)) + Float64(Float64(y - 130977.50649958357) / Float64(x * x))) + -110.1139242984811); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(y + N[(x * N[(137.519416416 + N[(x * N[(78.6994924154 + N[(x * 4.16438922228), $MachinePrecision]), $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], 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[(N[(N[(x * 4.16438922228 + N[(3655.1204654076414 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(y - 130977.50649958357), $MachinePrecision] / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -110.1139242984811), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606\\
t_1 := x \cdot \left(y + x \cdot \left(137.519416416 + x \cdot \left(78.6994924154 + x \cdot 4.16438922228\right)\right)\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}:\\
\;\;\;\;\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)) < +inf.0Initial program 93.9%
associate-*r/97.6%
sub-neg97.6%
metadata-eval97.6%
*-commutative97.6%
fma-def97.6%
*-commutative97.6%
fma-def97.5%
*-commutative97.5%
fma-def97.5%
fma-def97.5%
*-commutative97.5%
Simplified97.6%
Taylor expanded in z around 0 97.6%
if +inf.0 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) 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.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 simplification98.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
(t_1
(*
x
(+
y
(*
x
(+ 137.519416416 (* x (+ 78.6994924154 (* x 4.16438922228)))))))))
(if (<= (/ (* (- x 2.0) (+ t_1 z)) t_0) INFINITY)
(* (+ x -2.0) (+ (/ t_1 t_0) (/ z t_0)))
(/ (+ x -2.0) 0.24013125253755718))))
double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double t_1 = x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))));
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 + -2.0) / 0.24013125253755718;
}
return tmp;
}
public static double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double t_1 = x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))));
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 + -2.0) / 0.24013125253755718;
}
return tmp;
}
def code(x, y, z): t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606 t_1 = x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228)))))) 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 + -2.0) / 0.24013125253755718 return tmp
function code(x, y, z) t_0 = Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) t_1 = Float64(x * Float64(y + Float64(x * Float64(137.519416416 + Float64(x * Float64(78.6994924154 + Float64(x * 4.16438922228))))))) 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(Float64(x + -2.0) / 0.24013125253755718); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606; t_1 = x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228)))))); 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 + -2.0) / 0.24013125253755718; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(y + N[(x * N[(137.519416416 + N[(x * N[(78.6994924154 + N[(x * 4.16438922228), $MachinePrecision]), $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], 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[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606\\
t_1 := x \cdot \left(y + x \cdot \left(137.519416416 + x \cdot \left(78.6994924154 + x \cdot 4.16438922228\right)\right)\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}:\\
\;\;\;\;\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 93.9%
associate-*r/97.6%
sub-neg97.6%
metadata-eval97.6%
*-commutative97.6%
fma-def97.6%
*-commutative97.6%
fma-def97.5%
*-commutative97.5%
fma-def97.5%
fma-def97.5%
*-commutative97.5%
Simplified97.6%
Taylor expanded in z around 0 97.6%
if +inf.0 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) 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 96.8%
Final simplification97.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(/
(*
(- x 2.0)
(+
(*
x
(+
y
(*
x
(+ 137.519416416 (* x (+ 78.6994924154 (* x 4.16438922228)))))))
z))
(+
(*
x
(+
(* x (+ (* x (+ x 43.3400022514)) 263.505074721))
313.399215894))
47.066876606))))
(if (<= t_0 5e+267)
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 * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
double tmp;
if (t_0 <= 5e+267) {
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 * (y + (x * (137.519416416d0 + (x * (78.6994924154d0 + (x * 4.16438922228d0))))))) + z)) / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0)
if (t_0 <= 5d+267) 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 * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
double tmp;
if (t_0 <= 5e+267) {
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 * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) tmp = 0 if t_0 <= 5e+267: 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(y + Float64(x * Float64(137.519416416 + Float64(x * Float64(78.6994924154 + Float64(x * 4.16438922228))))))) + 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 <= 5e+267) 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 * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606); tmp = 0.0; if (t_0 <= 5e+267) 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[(y + N[(x * N[(137.519416416 + N[(x * N[(78.6994924154 + N[(x * 4.16438922228), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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, 5e+267], 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(y + x \cdot \left(137.519416416 + x \cdot \left(78.6994924154 + x \cdot 4.16438922228\right)\right)\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 5 \cdot 10^{+267}:\\
\;\;\;\;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.9999999999999999e267Initial program 96.2%
if 4.9999999999999999e267 < (/.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.0%
associate-*r/5.6%
sub-neg5.6%
metadata-eval5.6%
*-commutative5.6%
fma-def5.6%
*-commutative5.6%
fma-def5.6%
*-commutative5.6%
fma-def5.6%
fma-def5.6%
*-commutative5.6%
Simplified5.6%
Taylor expanded in z around 0 5.6%
Taylor expanded in x around inf 95.5%
Taylor expanded in x around inf 65.9%
cube-mult65.9%
unpow265.9%
distribute-rgt-out95.5%
unpow295.5%
+-commutative95.5%
Simplified95.5%
Final simplification95.9%
(FPCore (x y z)
:precision binary64
(if (or (<= x -2.3e+59) (not (<= x 6.8e+53)))
(/ (+ x -2.0) 0.24013125253755718)
(/
(*
(- x 2.0)
(+
(*
x
(+
y
(* x (+ 137.519416416 (* x (+ 78.6994924154 (* x 4.16438922228)))))))
z))
(+ 47.066876606 (* x (+ 313.399215894 (* (+ x 43.3400022514) (* x x))))))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -2.3e+59) || !(x <= 6.8e+53)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = ((x - 2.0) * ((x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 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) :: tmp
if ((x <= (-2.3d+59)) .or. (.not. (x <= 6.8d+53))) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else
tmp = ((x - 2.0d0) * ((x * (y + (x * (137.519416416d0 + (x * (78.6994924154d0 + (x * 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 tmp;
if ((x <= -2.3e+59) || !(x <= 6.8e+53)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = ((x - 2.0) * ((x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))) + z)) / (47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (x * x)))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -2.3e+59) or not (x <= 6.8e+53): tmp = (x + -2.0) / 0.24013125253755718 else: tmp = ((x - 2.0) * ((x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))) + z)) / (47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (x * x))))) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -2.3e+59) || !(x <= 6.8e+53)) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); else tmp = Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(y + Float64(x * Float64(137.519416416 + Float64(x * Float64(78.6994924154 + Float64(x * 4.16438922228))))))) + z)) / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(Float64(x + 43.3400022514) * Float64(x * x)))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -2.3e+59) || ~((x <= 6.8e+53))) tmp = (x + -2.0) / 0.24013125253755718; else tmp = ((x - 2.0) * ((x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))) + z)) / (47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (x * x))))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -2.3e+59], N[Not[LessEqual[x, 6.8e+53]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(y + N[(x * N[(137.519416416 + N[(x * N[(78.6994924154 + N[(x * 4.16438922228), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(47.066876606 + N[(x * N[(313.399215894 + N[(N[(x + 43.3400022514), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.3 \cdot 10^{+59} \lor \neg \left(x \leq 6.8 \cdot 10^{+53}\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(y + x \cdot \left(137.519416416 + x \cdot \left(78.6994924154 + x \cdot 4.16438922228\right)\right)\right) + z\right)}{47.066876606 + x \cdot \left(313.399215894 + \left(x + 43.3400022514\right) \cdot \left(x \cdot x\right)\right)}\\
\end{array}
\end{array}
if x < -2.30000000000000008e59 or 6.79999999999999995e53 < x Initial program 2.9%
associate-/l*7.3%
sub-neg7.3%
metadata-eval7.3%
fma-def7.3%
fma-def7.3%
fma-def7.3%
fma-def7.3%
fma-def7.3%
fma-def7.3%
fma-def7.3%
Simplified7.3%
Taylor expanded in x around inf 96.1%
if -2.30000000000000008e59 < x < 6.79999999999999995e53Initial program 97.5%
Taylor expanded in x around inf 95.0%
cube-mult95.0%
unpow295.0%
distribute-rgt-out95.0%
+-commutative95.0%
unpow295.0%
Simplified95.0%
Final simplification95.4%
(FPCore (x y z)
:precision binary64
(if (or (<= x -24000000000000.0) (not (<= x 980000000.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)))))
(+
(* x (+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -24000000000000.0) || !(x <= 980000000.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))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-24000000000000.0d0)) .or. (.not. (x <= 980000000.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))))) / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -24000000000000.0) || !(x <= 980000000.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))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -24000000000000.0) or not (x <= 980000000.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))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -24000000000000.0) || !(x <= 980000000.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(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -24000000000000.0) || ~((x <= 980000000.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))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -24000000000000.0], N[Not[LessEqual[x, 980000000.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[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -24000000000000 \lor \neg \left(x \leq 980000000\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)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\\
\end{array}
\end{array}
if x < -2.4e13 or 9.8e8 < x Initial program 16.3%
associate-*r/20.7%
sub-neg20.7%
metadata-eval20.7%
*-commutative20.7%
fma-def20.7%
*-commutative20.7%
fma-def20.7%
*-commutative20.7%
fma-def20.7%
fma-def20.7%
*-commutative20.7%
Simplified20.7%
Taylor expanded in z around 0 20.7%
Taylor expanded in x around inf 91.0%
Taylor expanded in x around inf 66.7%
cube-mult66.7%
unpow266.7%
distribute-rgt-out91.0%
unpow291.0%
+-commutative91.0%
Simplified91.0%
if -2.4e13 < x < 9.8e8Initial program 99.5%
Taylor expanded in x around 0 99.5%
*-commutative99.5%
Simplified99.5%
Final simplification95.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606)))
(if (<= x -5.2e-5)
(* (+ x -2.0) (+ 4.16438922228 (/ z t_0)))
(if (<= x 2.75e-8)
(*
(+ x -2.0)
(+
(* z 0.0212463641547976)
(* x (- (* y 0.0212463641547976) (* z 0.14147091005106402)))))
(if (<= x 4100000.0)
(/ (* y (* x (- x 2.0))) 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 * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double tmp;
if (x <= -5.2e-5) {
tmp = (x + -2.0) * (4.16438922228 + (z / t_0));
} else if (x <= 2.75e-8) {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402))));
} else if (x <= 4100000.0) {
tmp = (y * (x * (x - 2.0))) / 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 * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0
if (x <= (-5.2d-5)) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 + (z / t_0))
else if (x <= 2.75d-8) then
tmp = (x + (-2.0d0)) * ((z * 0.0212463641547976d0) + (x * ((y * 0.0212463641547976d0) - (z * 0.14147091005106402d0))))
else if (x <= 4100000.0d0) then
tmp = (y * (x * (x - 2.0d0))) / 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 * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double tmp;
if (x <= -5.2e-5) {
tmp = (x + -2.0) * (4.16438922228 + (z / t_0));
} else if (x <= 2.75e-8) {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402))));
} else if (x <= 4100000.0) {
tmp = (y * (x * (x - 2.0))) / 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 * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606 tmp = 0 if x <= -5.2e-5: tmp = (x + -2.0) * (4.16438922228 + (z / t_0)) elif x <= 2.75e-8: tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402)))) elif x <= 4100000.0: tmp = (y * (x * (x - 2.0))) / 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(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) tmp = 0.0 if (x <= -5.2e-5) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(z / t_0))); elseif (x <= 2.75e-8) tmp = Float64(Float64(x + -2.0) * Float64(Float64(z * 0.0212463641547976) + Float64(x * Float64(Float64(y * 0.0212463641547976) - Float64(z * 0.14147091005106402))))); elseif (x <= 4100000.0) tmp = Float64(Float64(y * Float64(x * Float64(x - 2.0))) / 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 * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606; tmp = 0.0; if (x <= -5.2e-5) tmp = (x + -2.0) * (4.16438922228 + (z / t_0)); elseif (x <= 2.75e-8) tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402)))); elseif (x <= 4100000.0) tmp = (y * (x * (x - 2.0))) / 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[(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, -5.2e-5], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(z / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.75e-8], 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], If[LessEqual[x, 4100000.0], N[(N[(y * N[(x * N[(x - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$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]]]]]
\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 -5.2 \cdot 10^{-5}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{z}{t_0}\right)\\
\mathbf{elif}\;x \leq 2.75 \cdot 10^{-8}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976 + x \cdot \left(y \cdot 0.0212463641547976 - z \cdot 0.14147091005106402\right)\right)\\
\mathbf{elif}\;x \leq 4100000:\\
\;\;\;\;\frac{y \cdot \left(x \cdot \left(x - 2\right)\right)}{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 x < -5.19999999999999968e-5Initial program 19.2%
associate-*r/23.7%
sub-neg23.7%
metadata-eval23.7%
*-commutative23.7%
fma-def23.7%
*-commutative23.7%
fma-def23.7%
*-commutative23.7%
fma-def23.7%
fma-def23.7%
*-commutative23.7%
Simplified23.7%
Taylor expanded in z around 0 23.7%
Taylor expanded in x around inf 88.7%
if -5.19999999999999968e-5 < x < 2.7500000000000001e-8Initial program 99.5%
associate-*r/99.5%
sub-neg99.5%
metadata-eval99.5%
*-commutative99.5%
fma-def99.5%
*-commutative99.5%
fma-def99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in x around 0 93.6%
if 2.7500000000000001e-8 < x < 4.1e6Initial program 98.4%
associate-*r/98.8%
sub-neg98.8%
metadata-eval98.8%
*-commutative98.8%
fma-def98.8%
*-commutative98.8%
fma-def98.8%
*-commutative98.8%
fma-def98.8%
fma-def98.8%
*-commutative98.8%
Simplified99.1%
Taylor expanded in y around inf 99.7%
if 4.1e6 < x Initial program 14.8%
associate-*r/19.0%
sub-neg19.0%
metadata-eval19.0%
*-commutative19.0%
fma-def19.0%
*-commutative19.0%
fma-def19.0%
*-commutative19.0%
fma-def19.0%
fma-def19.0%
*-commutative19.0%
Simplified19.0%
Taylor expanded in z around 0 19.0%
Taylor expanded in x around inf 91.9%
Taylor expanded in x around inf 91.9%
cube-mult91.9%
unpow291.9%
distribute-rgt-out91.9%
unpow291.9%
+-commutative91.9%
Simplified91.9%
Final simplification92.1%
(FPCore (x y z)
:precision binary64
(if (or (<= x -0.175) (not (<= x 420000.0)))
(*
(+ x -2.0)
(+
4.16438922228
(/
z
(+
47.066876606
(* x (+ 313.399215894 (* (+ x 43.3400022514) (* 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 <= -0.175) || !(x <= 420000.0)) {
tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (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 <= (-0.175d0)) .or. (.not. (x <= 420000.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 * 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 <= -0.175) || !(x <= 420000.0)) {
tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (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 <= -0.175) or not (x <= 420000.0): tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (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 <= -0.175) || !(x <= 420000.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(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 <= -0.175) || ~((x <= 420000.0))) tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (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, -0.175], N[Not[LessEqual[x, 420000.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[(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 -0.175 \lor \neg \left(x \leq 420000\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}:\\
\;\;\;\;\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 < -0.17499999999999999 or 4.2e5 < x Initial program 16.9%
associate-*r/21.2%
sub-neg21.2%
metadata-eval21.2%
*-commutative21.2%
fma-def21.2%
*-commutative21.2%
fma-def21.2%
*-commutative21.2%
fma-def21.2%
fma-def21.2%
*-commutative21.2%
Simplified21.2%
Taylor expanded in z around 0 21.2%
Taylor expanded in x around inf 90.4%
Taylor expanded in x around inf 66.2%
cube-mult66.2%
unpow266.2%
distribute-rgt-out90.4%
unpow290.4%
+-commutative90.4%
Simplified90.4%
if -0.17499999999999999 < x < 4.2e5Initial program 99.5%
associate-*r/99.5%
sub-neg99.5%
metadata-eval99.5%
*-commutative99.5%
fma-def99.5%
*-commutative99.5%
fma-def99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in x around 0 90.6%
Final simplification90.5%
(FPCore (x y z)
:precision binary64
(if (<= x -5.3e-5)
(*
(+ x -2.0)
(+
4.16438922228
(/
z
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))))
(if (<= x 420000.0)
(*
(+ x -2.0)
(+
(* z 0.0212463641547976)
(* x (- (* y 0.0212463641547976) (* z 0.14147091005106402)))))
(*
(+ 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 tmp;
if (x <= -5.3e-5) {
tmp = (x + -2.0) * (4.16438922228 + (z / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)));
} else if (x <= 420000.0) {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402))));
} 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) :: tmp
if (x <= (-5.3d-5)) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 + (z / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0)))
else if (x <= 420000.0d0) then
tmp = (x + (-2.0d0)) * ((z * 0.0212463641547976d0) + (x * ((y * 0.0212463641547976d0) - (z * 0.14147091005106402d0))))
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 tmp;
if (x <= -5.3e-5) {
tmp = (x + -2.0) * (4.16438922228 + (z / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)));
} else if (x <= 420000.0) {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402))));
} 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): tmp = 0 if x <= -5.3e-5: tmp = (x + -2.0) * (4.16438922228 + (z / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606))) elif x <= 420000.0: tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402)))) 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) tmp = 0.0 if (x <= -5.3e-5) 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)))); elseif (x <= 420000.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(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) tmp = 0.0; if (x <= -5.3e-5) tmp = (x + -2.0) * (4.16438922228 + (z / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606))); elseif (x <= 420000.0) tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402)))); 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_] := If[LessEqual[x, -5.3e-5], 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], If[LessEqual[x, 420000.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[(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}
\mathbf{if}\;x \leq -5.3 \cdot 10^{-5}:\\
\;\;\;\;\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{elif}\;x \leq 420000:\\
\;\;\;\;\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(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 x < -5.3000000000000001e-5Initial program 19.2%
associate-*r/23.7%
sub-neg23.7%
metadata-eval23.7%
*-commutative23.7%
fma-def23.7%
*-commutative23.7%
fma-def23.7%
*-commutative23.7%
fma-def23.7%
fma-def23.7%
*-commutative23.7%
Simplified23.7%
Taylor expanded in z around 0 23.7%
Taylor expanded in x around inf 88.7%
if -5.3000000000000001e-5 < x < 4.2e5Initial program 99.5%
associate-*r/99.5%
sub-neg99.5%
metadata-eval99.5%
*-commutative99.5%
fma-def99.5%
*-commutative99.5%
fma-def99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in x around 0 90.6%
if 4.2e5 < x Initial program 14.8%
associate-*r/19.0%
sub-neg19.0%
metadata-eval19.0%
*-commutative19.0%
fma-def19.0%
*-commutative19.0%
fma-def19.0%
*-commutative19.0%
fma-def19.0%
fma-def19.0%
*-commutative19.0%
Simplified19.0%
Taylor expanded in z around 0 19.0%
Taylor expanded in x around inf 91.9%
Taylor expanded in x around inf 91.9%
cube-mult91.9%
unpow291.9%
distribute-rgt-out91.9%
unpow291.9%
+-commutative91.9%
Simplified91.9%
Final simplification90.5%
(FPCore (x y z)
:precision binary64
(if (or (<= x -0.175) (not (<= x 420000.0)))
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 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 <= -0.175) || !(x <= 420000.0)) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / 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 <= (-0.175d0)) .or. (.not. (x <= 420000.0d0))) then
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / 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 <= -0.175) || !(x <= 420000.0)) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / 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 <= -0.175) or not (x <= 420000.0): tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / 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 <= -0.175) || !(x <= 420000.0)) tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / 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 <= -0.175) || ~((x <= 420000.0))) tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / 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, -0.175], N[Not[LessEqual[x, 420000.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[(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 -0.175 \lor \neg \left(x \leq 420000\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\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 < -0.17499999999999999 or 4.2e5 < x Initial program 16.9%
associate-/l*21.3%
sub-neg21.3%
metadata-eval21.3%
fma-def21.3%
fma-def21.3%
fma-def21.3%
fma-def21.3%
fma-def21.3%
fma-def21.3%
fma-def21.3%
Simplified21.3%
Taylor expanded in x around inf 86.7%
associate-*r/86.7%
metadata-eval86.7%
Simplified86.7%
if -0.17499999999999999 < x < 4.2e5Initial program 99.5%
associate-*r/99.5%
sub-neg99.5%
metadata-eval99.5%
*-commutative99.5%
fma-def99.5%
*-commutative99.5%
fma-def99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in x around 0 90.6%
Final simplification88.6%
(FPCore (x y z)
:precision binary64
(if (or (<= x -1.36e-5) (not (<= x 7e-8)))
(/ (+ 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 <= -1.36e-5) || !(x <= 7e-8)) {
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 <= (-1.36d-5)) .or. (.not. (x <= 7d-8))) 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 <= -1.36e-5) || !(x <= 7e-8)) {
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 <= -1.36e-5) or not (x <= 7e-8): 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 <= -1.36e-5) || !(x <= 7e-8)) 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 <= -1.36e-5) || ~((x <= 7e-8))) 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, -1.36e-5], N[Not[LessEqual[x, 7e-8]], $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 -1.36 \cdot 10^{-5} \lor \neg \left(x \leq 7 \cdot 10^{-8}\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 < -1.36000000000000002e-5 or 7.00000000000000048e-8 < x Initial program 20.5%
associate-/l*24.7%
sub-neg24.7%
metadata-eval24.7%
fma-def24.7%
fma-def24.7%
fma-def24.7%
fma-def24.7%
fma-def24.7%
fma-def24.7%
fma-def24.7%
Simplified24.7%
Taylor expanded in x around inf 83.1%
associate-*r/83.1%
metadata-eval83.1%
Simplified83.1%
if -1.36000000000000002e-5 < x < 7.00000000000000048e-8Initial program 99.5%
associate-*r/99.5%
sub-neg99.5%
metadata-eval99.5%
*-commutative99.5%
fma-def99.5%
*-commutative99.5%
fma-def99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in y around 0 73.7%
Taylor expanded in x around 0 69.6%
Final simplification76.8%
(FPCore (x y z) :precision binary64 (if (or (<= x -1.36e-5) (not (<= x 420000.0))) (/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x))) (* z -0.0424927283095952)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1.36e-5) || !(x <= 420000.0)) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} 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 <= (-1.36d-5)) .or. (.not. (x <= 420000.0d0))) then
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
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 <= -1.36e-5) || !(x <= 420000.0)) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1.36e-5) or not (x <= 420000.0): tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) else: tmp = z * -0.0424927283095952 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -1.36e-5) || !(x <= 420000.0)) tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); else tmp = Float64(z * -0.0424927283095952); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -1.36e-5) || ~((x <= 420000.0))) tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); else tmp = z * -0.0424927283095952; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -1.36e-5], N[Not[LessEqual[x, 420000.0]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * -0.0424927283095952), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.36 \cdot 10^{-5} \lor \neg \left(x \leq 420000\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\mathbf{else}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\end{array}
\end{array}
if x < -1.36000000000000002e-5 or 4.2e5 < x Initial program 17.6%
associate-/l*21.9%
sub-neg21.9%
metadata-eval21.9%
fma-def21.9%
fma-def21.9%
fma-def21.9%
fma-def21.9%
fma-def21.9%
fma-def21.9%
fma-def21.9%
Simplified21.9%
Taylor expanded in x around inf 86.1%
associate-*r/86.1%
metadata-eval86.1%
Simplified86.1%
if -1.36000000000000002e-5 < x < 4.2e5Initial program 99.5%
associate-*r/99.5%
sub-neg99.5%
metadata-eval99.5%
*-commutative99.5%
fma-def99.5%
*-commutative99.5%
fma-def99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in x around 0 66.5%
*-commutative66.5%
Simplified66.5%
Final simplification76.6%
(FPCore (x y z)
:precision binary64
(if (<= x -0.225)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 420000.0)
(* z -0.0424927283095952)
(- (+ (/ 3655.1204654076414 x) (* x 4.16438922228)) 110.1139242984811))))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.225) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 420000.0) {
tmp = z * -0.0424927283095952;
} else {
tmp = ((3655.1204654076414 / x) + (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.225d0)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 420000.0d0) then
tmp = z * (-0.0424927283095952d0)
else
tmp = ((3655.1204654076414d0 / x) + (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.225) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 420000.0) {
tmp = z * -0.0424927283095952;
} else {
tmp = ((3655.1204654076414 / x) + (x * 4.16438922228)) - 110.1139242984811;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -0.225: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 420000.0: tmp = z * -0.0424927283095952 else: tmp = ((3655.1204654076414 / x) + (x * 4.16438922228)) - 110.1139242984811 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -0.225) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 420000.0) tmp = Float64(z * -0.0424927283095952); else tmp = Float64(Float64(Float64(3655.1204654076414 / x) + Float64(x * 4.16438922228)) - 110.1139242984811); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -0.225) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 420000.0) tmp = z * -0.0424927283095952; else tmp = ((3655.1204654076414 / x) + (x * 4.16438922228)) - 110.1139242984811; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -0.225], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 420000.0], N[(z * -0.0424927283095952), $MachinePrecision], N[(N[(N[(3655.1204654076414 / x), $MachinePrecision] + N[(x * 4.16438922228), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.225:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 420000:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{3655.1204654076414}{x} + x \cdot 4.16438922228\right) - 110.1139242984811\\
\end{array}
\end{array}
if x < -0.225000000000000006Initial program 19.2%
associate-/l*23.8%
sub-neg23.8%
metadata-eval23.8%
fma-def23.8%
fma-def23.8%
fma-def23.8%
fma-def23.8%
fma-def23.8%
fma-def23.8%
fma-def23.8%
Simplified23.8%
Taylor expanded in x around inf 84.2%
if -0.225000000000000006 < x < 4.2e5Initial program 99.5%
associate-*r/99.5%
sub-neg99.5%
metadata-eval99.5%
*-commutative99.5%
fma-def99.5%
*-commutative99.5%
fma-def99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in x around 0 66.0%
*-commutative66.0%
Simplified66.0%
if 4.2e5 < x Initial program 14.8%
associate-*r/19.0%
sub-neg19.0%
metadata-eval19.0%
*-commutative19.0%
fma-def19.0%
*-commutative19.0%
fma-def19.0%
*-commutative19.0%
fma-def19.0%
fma-def19.0%
*-commutative19.0%
Simplified19.0%
Taylor expanded in x around inf 88.4%
Taylor expanded in x around 0 88.4%
Final simplification76.4%
(FPCore (x y z)
:precision binary64
(if (<= x -0.21)
(* x 4.16438922228)
(if (<= x 420000.0)
(* z -0.0424927283095952)
(* 4.16438922228 (+ x -2.0)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.21) {
tmp = x * 4.16438922228;
} else if (x <= 420000.0) {
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.21d0)) then
tmp = x * 4.16438922228d0
else if (x <= 420000.0d0) 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.21) {
tmp = x * 4.16438922228;
} else if (x <= 420000.0) {
tmp = z * -0.0424927283095952;
} else {
tmp = 4.16438922228 * (x + -2.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -0.21: tmp = x * 4.16438922228 elif x <= 420000.0: tmp = z * -0.0424927283095952 else: tmp = 4.16438922228 * (x + -2.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -0.21) tmp = Float64(x * 4.16438922228); elseif (x <= 420000.0) 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.21) tmp = x * 4.16438922228; elseif (x <= 420000.0) tmp = z * -0.0424927283095952; else tmp = 4.16438922228 * (x + -2.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -0.21], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 420000.0], 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.21:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 420000:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;4.16438922228 \cdot \left(x + -2\right)\\
\end{array}
\end{array}
if x < -0.209999999999999992Initial program 19.2%
associate-*r/23.7%
sub-neg23.7%
metadata-eval23.7%
*-commutative23.7%
fma-def23.7%
*-commutative23.7%
fma-def23.7%
*-commutative23.7%
fma-def23.7%
fma-def23.7%
*-commutative23.7%
Simplified23.7%
Taylor expanded in z around 0 23.7%
Taylor expanded in x around inf 88.7%
Taylor expanded in x around inf 83.8%
if -0.209999999999999992 < x < 4.2e5Initial program 99.5%
associate-*r/99.5%
sub-neg99.5%
metadata-eval99.5%
*-commutative99.5%
fma-def99.5%
*-commutative99.5%
fma-def99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in x around 0 66.0%
*-commutative66.0%
Simplified66.0%
if 4.2e5 < x Initial program 14.8%
associate-*r/19.0%
sub-neg19.0%
metadata-eval19.0%
*-commutative19.0%
fma-def19.0%
*-commutative19.0%
fma-def19.0%
*-commutative19.0%
fma-def19.0%
fma-def19.0%
*-commutative19.0%
Simplified19.0%
Taylor expanded in x around inf 87.7%
Final simplification76.1%
(FPCore (x y z)
:precision binary64
(if (<= x -0.108)
(* x 4.16438922228)
(if (<= x 420000.0)
(* z -0.0424927283095952)
(- (* x 4.16438922228) 110.1139242984811))))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.108) {
tmp = x * 4.16438922228;
} else if (x <= 420000.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.108d0)) then
tmp = x * 4.16438922228d0
else if (x <= 420000.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.108) {
tmp = x * 4.16438922228;
} else if (x <= 420000.0) {
tmp = z * -0.0424927283095952;
} else {
tmp = (x * 4.16438922228) - 110.1139242984811;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -0.108: tmp = x * 4.16438922228 elif x <= 420000.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.108) tmp = Float64(x * 4.16438922228); elseif (x <= 420000.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.108) tmp = x * 4.16438922228; elseif (x <= 420000.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.108], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 420000.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.108:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 420000:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\
\end{array}
\end{array}
if x < -0.107999999999999999Initial program 19.2%
associate-*r/23.7%
sub-neg23.7%
metadata-eval23.7%
*-commutative23.7%
fma-def23.7%
*-commutative23.7%
fma-def23.7%
*-commutative23.7%
fma-def23.7%
fma-def23.7%
*-commutative23.7%
Simplified23.7%
Taylor expanded in z around 0 23.7%
Taylor expanded in x around inf 88.7%
Taylor expanded in x around inf 83.8%
if -0.107999999999999999 < x < 4.2e5Initial program 99.5%
associate-*r/99.5%
sub-neg99.5%
metadata-eval99.5%
*-commutative99.5%
fma-def99.5%
*-commutative99.5%
fma-def99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in x around 0 66.0%
*-commutative66.0%
Simplified66.0%
if 4.2e5 < x Initial program 14.8%
associate-*r/19.0%
sub-neg19.0%
metadata-eval19.0%
*-commutative19.0%
fma-def19.0%
*-commutative19.0%
fma-def19.0%
*-commutative19.0%
fma-def19.0%
fma-def19.0%
*-commutative19.0%
Simplified19.0%
Taylor expanded in x around inf 88.4%
Final simplification76.3%
(FPCore (x y z)
:precision binary64
(if (<= x -0.14)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 420000.0)
(* z -0.0424927283095952)
(- (* x 4.16438922228) 110.1139242984811))))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.14) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 420000.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.14d0)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 420000.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.14) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 420000.0) {
tmp = z * -0.0424927283095952;
} else {
tmp = (x * 4.16438922228) - 110.1139242984811;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -0.14: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 420000.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.14) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 420000.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.14) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 420000.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.14], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 420000.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.14:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 420000:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\
\end{array}
\end{array}
if x < -0.14000000000000001Initial program 19.2%
associate-/l*23.8%
sub-neg23.8%
metadata-eval23.8%
fma-def23.8%
fma-def23.8%
fma-def23.8%
fma-def23.8%
fma-def23.8%
fma-def23.8%
fma-def23.8%
Simplified23.8%
Taylor expanded in x around inf 84.2%
if -0.14000000000000001 < x < 4.2e5Initial program 99.5%
associate-*r/99.5%
sub-neg99.5%
metadata-eval99.5%
*-commutative99.5%
fma-def99.5%
*-commutative99.5%
fma-def99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in x around 0 66.0%
*-commutative66.0%
Simplified66.0%
if 4.2e5 < x Initial program 14.8%
associate-*r/19.0%
sub-neg19.0%
metadata-eval19.0%
*-commutative19.0%
fma-def19.0%
*-commutative19.0%
fma-def19.0%
*-commutative19.0%
fma-def19.0%
fma-def19.0%
*-commutative19.0%
Simplified19.0%
Taylor expanded in x around inf 88.4%
Final simplification76.4%
(FPCore (x y z) :precision binary64 (if (<= x -0.18) (* x 4.16438922228) (if (<= x 420000.0) (* z -0.0424927283095952) (* x 4.16438922228))))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.18) {
tmp = x * 4.16438922228;
} else if (x <= 420000.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.18d0)) then
tmp = x * 4.16438922228d0
else if (x <= 420000.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.18) {
tmp = x * 4.16438922228;
} else if (x <= 420000.0) {
tmp = z * -0.0424927283095952;
} else {
tmp = x * 4.16438922228;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -0.18: tmp = x * 4.16438922228 elif x <= 420000.0: tmp = z * -0.0424927283095952 else: tmp = x * 4.16438922228 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -0.18) tmp = Float64(x * 4.16438922228); elseif (x <= 420000.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.18) tmp = x * 4.16438922228; elseif (x <= 420000.0) tmp = z * -0.0424927283095952; else tmp = x * 4.16438922228; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -0.18], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 420000.0], N[(z * -0.0424927283095952), $MachinePrecision], N[(x * 4.16438922228), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.18:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 420000:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228\\
\end{array}
\end{array}
if x < -0.17999999999999999 or 4.2e5 < x Initial program 16.9%
associate-*r/21.2%
sub-neg21.2%
metadata-eval21.2%
*-commutative21.2%
fma-def21.2%
*-commutative21.2%
fma-def21.2%
*-commutative21.2%
fma-def21.2%
fma-def21.2%
*-commutative21.2%
Simplified21.2%
Taylor expanded in z around 0 21.2%
Taylor expanded in x around inf 90.4%
Taylor expanded in x around inf 85.8%
if -0.17999999999999999 < x < 4.2e5Initial program 99.5%
associate-*r/99.5%
sub-neg99.5%
metadata-eval99.5%
*-commutative99.5%
fma-def99.5%
*-commutative99.5%
fma-def99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in x around 0 66.0%
*-commutative66.0%
Simplified66.0%
Final simplification76.1%
(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.2%
associate-*r/59.4%
sub-neg59.4%
metadata-eval59.4%
*-commutative59.4%
fma-def59.4%
*-commutative59.4%
fma-def59.4%
*-commutative59.4%
fma-def59.4%
fma-def59.4%
*-commutative59.4%
Simplified59.4%
Taylor expanded in z around 0 59.4%
Taylor expanded in x around inf 67.1%
Taylor expanded in x around inf 45.6%
Final simplification45.6%
(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 2023196
(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)))