
(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 22 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
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
(t_1
(+
(* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
(t_2 (/ (* (- x 2.0) (+ (* x t_1) z)) t_0)))
(if (<= t_2 (- INFINITY))
(+ (* x 4.16438922228) (/ z (pow x 3.0)))
(if (<= t_2 INFINITY)
(+
(* z (- (/ x t_0) (* 2.0 (/ 1.0 t_0))))
(/ (* x (* (- x 2.0) t_1)) t_0))
(-
(+
(/ (- y 130977.50649958357) (pow x 2.0))
(+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x))))
110.1139242984811)))))
double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double t_1 = (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y;
double t_2 = ((x - 2.0) * ((x * t_1) + z)) / t_0;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = (x * 4.16438922228) + (z / pow(x, 3.0));
} else if (t_2 <= ((double) INFINITY)) {
tmp = (z * ((x / t_0) - (2.0 * (1.0 / t_0)))) + ((x * ((x - 2.0) * t_1)) / t_0);
} else {
tmp = (((y - 130977.50649958357) / pow(x, 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 110.1139242984811;
}
return tmp;
}
public static double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double t_1 = (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y;
double t_2 = ((x - 2.0) * ((x * t_1) + z)) / t_0;
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = (x * 4.16438922228) + (z / Math.pow(x, 3.0));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = (z * ((x / t_0) - (2.0 * (1.0 / t_0)))) + ((x * ((x - 2.0) * t_1)) / t_0);
} else {
tmp = (((y - 130977.50649958357) / Math.pow(x, 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 110.1139242984811;
}
return tmp;
}
def code(x, y, z): t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606 t_1 = (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y t_2 = ((x - 2.0) * ((x * t_1) + z)) / t_0 tmp = 0 if t_2 <= -math.inf: tmp = (x * 4.16438922228) + (z / math.pow(x, 3.0)) elif t_2 <= math.inf: tmp = (z * ((x / t_0) - (2.0 * (1.0 / t_0)))) + ((x * ((x - 2.0) * t_1)) / t_0) else: tmp = (((y - 130977.50649958357) / math.pow(x, 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / 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(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y) t_2 = Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * t_1) + z)) / t_0) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(x * 4.16438922228) + Float64(z / (x ^ 3.0))); elseif (t_2 <= Inf) tmp = Float64(Float64(z * Float64(Float64(x / t_0) - Float64(2.0 * Float64(1.0 / t_0)))) + Float64(Float64(x * Float64(Float64(x - 2.0) * t_1)) / t_0)); else tmp = Float64(Float64(Float64(Float64(y - 130977.50649958357) / (x ^ 2.0)) + Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x)))) - 110.1139242984811); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606; t_1 = (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y; t_2 = ((x - 2.0) * ((x * t_1) + z)) / t_0; tmp = 0.0; if (t_2 <= -Inf) tmp = (x * 4.16438922228) + (z / (x ^ 3.0)); elseif (t_2 <= Inf) tmp = (z * ((x / t_0) - (2.0 * (1.0 / t_0)))) + ((x * ((x - 2.0) * t_1)) / t_0); else tmp = (((y - 130977.50649958357) / (x ^ 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 110.1139242984811; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * t$95$1), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(x * 4.16438922228), $MachinePrecision] + N[(z / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(N[(z * N[(N[(x / t$95$0), $MachinePrecision] - N[(2.0 * N[(1.0 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x * N[(N[(x - 2.0), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(y - 130977.50649958357), $MachinePrecision] / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606\\
t_1 := x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\\
t_2 := \frac{\left(x - 2\right) \cdot \left(x \cdot t_1 + z\right)}{t_0}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;x \cdot 4.16438922228 + \frac{z}{{x}^{3}}\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;z \cdot \left(\frac{x}{t_0} - 2 \cdot \frac{1}{t_0}\right) + \frac{x \cdot \left(\left(x - 2\right) \cdot t_1\right)}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{y - 130977.50649958357}{{x}^{2}} + \left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right)\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 3.8%
Simplified87.1%
Taylor expanded in z around 0 15.3%
Taylor expanded in x around inf 99.0%
*-commutative99.0%
Simplified99.0%
Taylor expanded in x around inf 99.2%
if -inf.0 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < +inf.0Initial program 98.9%
Simplified99.3%
Taylor expanded in z around 0 99.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%
Simplified0.0%
Taylor expanded in x around -inf 99.2%
Final simplification99.3%
(FPCore (x y z)
:precision binary64
(if (<=
(/
(*
(- x 2.0)
(+
(*
x
(+
(* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
z))
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
INFINITY)
(/
(+ x -2.0)
(/
(fma
(fma (fma (+ x 43.3400022514) x 263.505074721) x 313.399215894)
x
47.066876606)
(fma
(fma (fma (fma x 4.16438922228 78.6994924154) x 137.519416416) x y)
x
z)))
(-
(+
(/ (- y 130977.50649958357) (pow x 2.0))
(+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x))))
110.1139242984811)))
double code(double x, double y, double z) {
double tmp;
if ((((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= ((double) INFINITY)) {
tmp = (x + -2.0) / (fma(fma(fma((x + 43.3400022514), x, 263.505074721), x, 313.399215894), x, 47.066876606) / fma(fma(fma(fma(x, 4.16438922228, 78.6994924154), x, 137.519416416), x, y), x, z));
} else {
tmp = (((y - 130977.50649958357) / pow(x, 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 110.1139242984811;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= Inf) tmp = Float64(Float64(x + -2.0) / Float64(fma(fma(fma(Float64(x + 43.3400022514), x, 263.505074721), x, 313.399215894), x, 47.066876606) / fma(fma(fma(fma(x, 4.16438922228, 78.6994924154), x, 137.519416416), x, y), x, z))); else tmp = Float64(Float64(Float64(Float64(y - 130977.50649958357) / (x ^ 2.0)) + Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x)))) - 110.1139242984811); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(x + -2.0), $MachinePrecision] / N[(N[(N[(N[(N[(x + 43.3400022514), $MachinePrecision] * x + 263.505074721), $MachinePrecision] * x + 313.399215894), $MachinePrecision] * x + 47.066876606), $MachinePrecision] / N[(N[(N[(N[(x * 4.16438922228 + 78.6994924154), $MachinePrecision] * x + 137.519416416), $MachinePrecision] * x + y), $MachinePrecision] * x + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(y - 130977.50649958357), $MachinePrecision] / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606} \leq \infty:\\
\;\;\;\;\frac{x + -2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), x, 47.066876606\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), x, 137.519416416\right), x, y\right), x, z\right)}}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{y - 130977.50649958357}{{x}^{2}} + \left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right)\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 94.2%
associate-/l*98.9%
sub-neg98.9%
metadata-eval98.9%
fma-def98.9%
fma-def98.9%
fma-def98.9%
fma-def98.9%
fma-def98.9%
fma-def98.8%
fma-def98.9%
Simplified98.9%
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%
Simplified0.0%
Taylor expanded in x around -inf 99.2%
Final simplification99.0%
(FPCore (x y z)
:precision binary64
(if (<=
(/
(*
(- x 2.0)
(+
(*
x
(+
(* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
z))
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
INFINITY)
(*
(fma
x
(fma x (fma x (fma x 4.16438922228 78.6994924154) 137.519416416) y)
z)
(/
(+ x -2.0)
(fma
x
(fma x (fma x (+ x 43.3400022514) 263.505074721) 313.399215894)
47.066876606)))
(-
(+
(/ (- y 130977.50649958357) (pow x 2.0))
(+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x))))
110.1139242984811)))
double code(double x, double y, double z) {
double tmp;
if ((((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= ((double) INFINITY)) {
tmp = fma(x, fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), z) * ((x + -2.0) / fma(x, fma(x, fma(x, (x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606));
} else {
tmp = (((y - 130977.50649958357) / pow(x, 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 110.1139242984811;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= Inf) tmp = Float64(fma(x, fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), z) * Float64(Float64(x + -2.0) / fma(x, fma(x, fma(x, Float64(x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606))); else tmp = Float64(Float64(Float64(Float64(y - 130977.50649958357) / (x ^ 2.0)) + Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x)))) - 110.1139242984811); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(x * N[(x * N[(x * N[(x * 4.16438922228 + 78.6994924154), $MachinePrecision] + 137.519416416), $MachinePrecision] + y), $MachinePrecision] + z), $MachinePrecision] * N[(N[(x + -2.0), $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[(N[(y - 130977.50649958357), $MachinePrecision] / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606} \leq \infty:\\
\;\;\;\;\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) \cdot \frac{x + -2}{\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(\frac{y - 130977.50649958357}{{x}^{2}} + \left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right)\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 94.2%
Simplified98.7%
if +inf.0 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) Initial program 0.0%
Simplified0.0%
Taylor expanded in x around -inf 99.2%
Final simplification98.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
(t_1
(+
(* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
(t_2 (/ (* (- x 2.0) (+ (* x t_1) z)) t_0))
(t_3 (* z (- (/ x t_0) (* 2.0 (/ 1.0 t_0))))))
(if (<= t_2 (- INFINITY))
(+ (* x 4.16438922228) t_3)
(if (<= t_2 INFINITY)
(+ t_3 (/ (* x (* (- x 2.0) t_1)) t_0))
(/ (+ x -2.0) 0.24013125253755718)))))
double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double t_1 = (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y;
double t_2 = ((x - 2.0) * ((x * t_1) + z)) / t_0;
double t_3 = z * ((x / t_0) - (2.0 * (1.0 / t_0)));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = (x * 4.16438922228) + t_3;
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_3 + ((x * ((x - 2.0) * t_1)) / t_0);
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
public static double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double t_1 = (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y;
double t_2 = ((x - 2.0) * ((x * t_1) + z)) / t_0;
double t_3 = z * ((x / t_0) - (2.0 * (1.0 / t_0)));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = (x * 4.16438922228) + t_3;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_3 + ((x * ((x - 2.0) * t_1)) / t_0);
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
def code(x, y, z): t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606 t_1 = (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y t_2 = ((x - 2.0) * ((x * t_1) + z)) / t_0 t_3 = z * ((x / t_0) - (2.0 * (1.0 / t_0))) tmp = 0 if t_2 <= -math.inf: tmp = (x * 4.16438922228) + t_3 elif t_2 <= math.inf: tmp = t_3 + ((x * ((x - 2.0) * t_1)) / t_0) else: tmp = (x + -2.0) / 0.24013125253755718 return tmp
function code(x, y, z) t_0 = Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) t_1 = Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y) t_2 = Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * t_1) + z)) / t_0) t_3 = Float64(z * Float64(Float64(x / t_0) - Float64(2.0 * Float64(1.0 / t_0)))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(x * 4.16438922228) + t_3); elseif (t_2 <= Inf) tmp = Float64(t_3 + Float64(Float64(x * Float64(Float64(x - 2.0) * t_1)) / t_0)); else tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606; t_1 = (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y; t_2 = ((x - 2.0) * ((x * t_1) + z)) / t_0; t_3 = z * ((x / t_0) - (2.0 * (1.0 / t_0))); tmp = 0.0; if (t_2 <= -Inf) tmp = (x * 4.16438922228) + t_3; elseif (t_2 <= Inf) tmp = t_3 + ((x * ((x - 2.0) * t_1)) / t_0); else tmp = (x + -2.0) / 0.24013125253755718; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * t$95$1), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(N[(x / t$95$0), $MachinePrecision] - N[(2.0 * N[(1.0 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(x * 4.16438922228), $MachinePrecision] + t$95$3), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(t$95$3 + N[(N[(x * N[(N[(x - 2.0), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606\\
t_1 := x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\\
t_2 := \frac{\left(x - 2\right) \cdot \left(x \cdot t_1 + z\right)}{t_0}\\
t_3 := z \cdot \left(\frac{x}{t_0} - 2 \cdot \frac{1}{t_0}\right)\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;x \cdot 4.16438922228 + t_3\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;t_3 + \frac{x \cdot \left(\left(x - 2\right) \cdot t_1\right)}{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)) < -inf.0Initial program 3.8%
Simplified87.1%
Taylor expanded in z around 0 15.3%
Taylor expanded in x around inf 99.0%
*-commutative99.0%
Simplified99.0%
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)) < +inf.0Initial program 98.9%
Simplified99.3%
Taylor expanded in z around 0 99.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.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
(t_1
(+
(* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
(t_2 (/ (* (- x 2.0) (+ (* x t_1) z)) t_0)))
(if (<= t_2 (- INFINITY))
(+ (* x 4.16438922228) (/ z (pow x 3.0)))
(if (<= t_2 INFINITY)
(+
(* z (- (/ x t_0) (* 2.0 (/ 1.0 t_0))))
(/ (* x (* (- x 2.0) t_1)) t_0))
(/ (+ x -2.0) 0.24013125253755718)))))
double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double t_1 = (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y;
double t_2 = ((x - 2.0) * ((x * t_1) + z)) / t_0;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = (x * 4.16438922228) + (z / pow(x, 3.0));
} else if (t_2 <= ((double) INFINITY)) {
tmp = (z * ((x / t_0) - (2.0 * (1.0 / t_0)))) + ((x * ((x - 2.0) * t_1)) / t_0);
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
public static double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double t_1 = (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y;
double t_2 = ((x - 2.0) * ((x * t_1) + z)) / t_0;
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = (x * 4.16438922228) + (z / Math.pow(x, 3.0));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = (z * ((x / t_0) - (2.0 * (1.0 / t_0)))) + ((x * ((x - 2.0) * t_1)) / t_0);
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
def code(x, y, z): t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606 t_1 = (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y t_2 = ((x - 2.0) * ((x * t_1) + z)) / t_0 tmp = 0 if t_2 <= -math.inf: tmp = (x * 4.16438922228) + (z / math.pow(x, 3.0)) elif t_2 <= math.inf: tmp = (z * ((x / t_0) - (2.0 * (1.0 / t_0)))) + ((x * ((x - 2.0) * t_1)) / t_0) else: tmp = (x + -2.0) / 0.24013125253755718 return tmp
function code(x, y, z) t_0 = Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) t_1 = Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y) t_2 = Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * t_1) + z)) / t_0) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(x * 4.16438922228) + Float64(z / (x ^ 3.0))); elseif (t_2 <= Inf) tmp = Float64(Float64(z * Float64(Float64(x / t_0) - Float64(2.0 * Float64(1.0 / t_0)))) + Float64(Float64(x * Float64(Float64(x - 2.0) * t_1)) / t_0)); else tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606; t_1 = (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y; t_2 = ((x - 2.0) * ((x * t_1) + z)) / t_0; tmp = 0.0; if (t_2 <= -Inf) tmp = (x * 4.16438922228) + (z / (x ^ 3.0)); elseif (t_2 <= Inf) tmp = (z * ((x / t_0) - (2.0 * (1.0 / t_0)))) + ((x * ((x - 2.0) * t_1)) / t_0); else tmp = (x + -2.0) / 0.24013125253755718; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * t$95$1), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(x * 4.16438922228), $MachinePrecision] + N[(z / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(N[(z * N[(N[(x / t$95$0), $MachinePrecision] - N[(2.0 * N[(1.0 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x * N[(N[(x - 2.0), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606\\
t_1 := x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\\
t_2 := \frac{\left(x - 2\right) \cdot \left(x \cdot t_1 + z\right)}{t_0}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;x \cdot 4.16438922228 + \frac{z}{{x}^{3}}\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;z \cdot \left(\frac{x}{t_0} - 2 \cdot \frac{1}{t_0}\right) + \frac{x \cdot \left(\left(x - 2\right) \cdot t_1\right)}{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)) < -inf.0Initial program 3.8%
Simplified87.1%
Taylor expanded in z around 0 15.3%
Taylor expanded in x around inf 99.0%
*-commutative99.0%
Simplified99.0%
Taylor expanded in x around inf 99.2%
if -inf.0 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < +inf.0Initial program 98.9%
Simplified99.3%
Taylor expanded in z around 0 99.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.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606)))
(if (or (<= x -8.5e+44) (not (<= x 3.4e+19)))
(+ (* x 4.16438922228) (* z (- (/ x t_0) (* 2.0 (/ 1.0 t_0)))))
(-
(/ (* (- x 2.0) z) t_0)
(/
(*
x
(*
(+
(* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y)
(- 2.0 x)))
t_0)))))
double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double tmp;
if ((x <= -8.5e+44) || !(x <= 3.4e+19)) {
tmp = (x * 4.16438922228) + (z * ((x / t_0) - (2.0 * (1.0 / t_0))));
} else {
tmp = (((x - 2.0) * z) / t_0) - ((x * (((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y) * (2.0 - x))) / t_0);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0
if ((x <= (-8.5d+44)) .or. (.not. (x <= 3.4d+19))) then
tmp = (x * 4.16438922228d0) + (z * ((x / t_0) - (2.0d0 * (1.0d0 / t_0))))
else
tmp = (((x - 2.0d0) * z) / t_0) - ((x * (((x * ((x * ((x * 4.16438922228d0) + 78.6994924154d0)) + 137.519416416d0)) + y) * (2.0d0 - x))) / t_0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double tmp;
if ((x <= -8.5e+44) || !(x <= 3.4e+19)) {
tmp = (x * 4.16438922228) + (z * ((x / t_0) - (2.0 * (1.0 / t_0))));
} else {
tmp = (((x - 2.0) * z) / t_0) - ((x * (((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y) * (2.0 - x))) / t_0);
}
return tmp;
}
def code(x, y, z): t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606 tmp = 0 if (x <= -8.5e+44) or not (x <= 3.4e+19): tmp = (x * 4.16438922228) + (z * ((x / t_0) - (2.0 * (1.0 / t_0)))) else: tmp = (((x - 2.0) * z) / t_0) - ((x * (((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y) * (2.0 - x))) / t_0) return tmp
function code(x, y, z) t_0 = Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) tmp = 0.0 if ((x <= -8.5e+44) || !(x <= 3.4e+19)) tmp = Float64(Float64(x * 4.16438922228) + Float64(z * Float64(Float64(x / t_0) - Float64(2.0 * Float64(1.0 / t_0))))); else tmp = Float64(Float64(Float64(Float64(x - 2.0) * z) / t_0) - Float64(Float64(x * Float64(Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y) * Float64(2.0 - x))) / t_0)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606; tmp = 0.0; if ((x <= -8.5e+44) || ~((x <= 3.4e+19))) tmp = (x * 4.16438922228) + (z * ((x / t_0) - (2.0 * (1.0 / t_0)))); else tmp = (((x - 2.0) * z) / t_0) - ((x * (((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y) * (2.0 - x))) / t_0); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]}, If[Or[LessEqual[x, -8.5e+44], N[Not[LessEqual[x, 3.4e+19]], $MachinePrecision]], N[(N[(x * 4.16438922228), $MachinePrecision] + N[(z * N[(N[(x / t$95$0), $MachinePrecision] - N[(2.0 * N[(1.0 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(x - 2.0), $MachinePrecision] * z), $MachinePrecision] / t$95$0), $MachinePrecision] - N[(N[(x * N[(N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] * N[(2.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $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 -8.5 \cdot 10^{+44} \lor \neg \left(x \leq 3.4 \cdot 10^{+19}\right):\\
\;\;\;\;x \cdot 4.16438922228 + z \cdot \left(\frac{x}{t_0} - 2 \cdot \frac{1}{t_0}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot z}{t_0} - \frac{x \cdot \left(\left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) \cdot \left(2 - x\right)\right)}{t_0}\\
\end{array}
\end{array}
if x < -8.5e44 or 3.4e19 < x Initial program 8.1%
Simplified14.7%
Taylor expanded in z around 0 9.7%
Taylor expanded in x around inf 98.3%
*-commutative98.3%
Simplified98.3%
if -8.5e44 < x < 3.4e19Initial program 99.6%
Simplified99.4%
Taylor expanded in z around inf 99.6%
Final simplification99.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606)))
(if (or (<= x -5.5e+45) (not (<= x 6e+19)))
(+ (* x 4.16438922228) (* z (- (/ x t_0) (* 2.0 (/ 1.0 t_0)))))
(/
(*
(- x 2.0)
(+
(*
x
(+
(* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
z))
t_0))))
double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double tmp;
if ((x <= -5.5e+45) || !(x <= 6e+19)) {
tmp = (x * 4.16438922228) + (z * ((x / t_0) - (2.0 * (1.0 / t_0))));
} else {
tmp = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0
if ((x <= (-5.5d+45)) .or. (.not. (x <= 6d+19))) then
tmp = (x * 4.16438922228d0) + (z * ((x / t_0) - (2.0d0 * (1.0d0 / t_0))))
else
tmp = ((x - 2.0d0) * ((x * ((x * ((x * ((x * 4.16438922228d0) + 78.6994924154d0)) + 137.519416416d0)) + y)) + z)) / t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double tmp;
if ((x <= -5.5e+45) || !(x <= 6e+19)) {
tmp = (x * 4.16438922228) + (z * ((x / t_0) - (2.0 * (1.0 / t_0))));
} else {
tmp = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0;
}
return tmp;
}
def code(x, y, z): t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606 tmp = 0 if (x <= -5.5e+45) or not (x <= 6e+19): tmp = (x * 4.16438922228) + (z * ((x / t_0) - (2.0 * (1.0 / t_0)))) else: tmp = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) tmp = 0.0 if ((x <= -5.5e+45) || !(x <= 6e+19)) tmp = Float64(Float64(x * 4.16438922228) + Float64(z * Float64(Float64(x / t_0) - Float64(2.0 * Float64(1.0 / t_0))))); else tmp = Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606; tmp = 0.0; if ((x <= -5.5e+45) || ~((x <= 6e+19))) tmp = (x * 4.16438922228) + (z * ((x / t_0) - (2.0 * (1.0 / t_0)))); else tmp = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]}, If[Or[LessEqual[x, -5.5e+45], N[Not[LessEqual[x, 6e+19]], $MachinePrecision]], N[(N[(x * 4.16438922228), $MachinePrecision] + N[(z * N[(N[(x / t$95$0), $MachinePrecision] - N[(2.0 * N[(1.0 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / t$95$0), $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.5 \cdot 10^{+45} \lor \neg \left(x \leq 6 \cdot 10^{+19}\right):\\
\;\;\;\;x \cdot 4.16438922228 + z \cdot \left(\frac{x}{t_0} - 2 \cdot \frac{1}{t_0}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{t_0}\\
\end{array}
\end{array}
if x < -5.5000000000000001e45 or 6e19 < x Initial program 8.1%
Simplified14.7%
Taylor expanded in z around 0 9.7%
Taylor expanded in x around inf 98.3%
*-commutative98.3%
Simplified98.3%
if -5.5000000000000001e45 < x < 6e19Initial program 99.6%
Final simplification99.0%
(FPCore (x y z)
:precision binary64
(if (or (<= x -1.95e+46) (not (<= x 4.2e+46)))
(/ (+ x -2.0) 0.24013125253755718)
(/
(*
(- x 2.0)
(+
(*
x
(+
(* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
z))
(+
(* x (+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1.95e+46) || !(x <= 4.2e+46)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-1.95d+46)) .or. (.not. (x <= 4.2d+46))) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else
tmp = ((x - 2.0d0) * ((x * ((x * ((x * ((x * 4.16438922228d0) + 78.6994924154d0)) + 137.519416416d0)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -1.95e+46) || !(x <= 4.2e+46)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1.95e+46) or not (x <= 4.2e+46): tmp = (x + -2.0) / 0.24013125253755718 else: tmp = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -1.95e+46) || !(x <= 4.2e+46)) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); else tmp = Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -1.95e+46) || ~((x <= 4.2e+46))) tmp = (x + -2.0) / 0.24013125253755718; else tmp = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -1.95e+46], N[Not[LessEqual[x, 4.2e+46]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.95 \cdot 10^{+46} \lor \neg \left(x \leq 4.2 \cdot 10^{+46}\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\\
\end{array}
\end{array}
if x < -1.94999999999999997e46 or 4.2e46 < x Initial program 5.6%
associate-/l*11.7%
sub-neg11.7%
metadata-eval11.7%
fma-def11.7%
fma-def11.7%
fma-def11.7%
fma-def11.7%
fma-def11.7%
fma-def11.7%
fma-def11.7%
Simplified11.7%
Taylor expanded in x around inf 97.0%
if -1.94999999999999997e46 < x < 4.2e46Initial program 99.0%
Final simplification98.1%
(FPCore (x y z)
:precision binary64
(if (or (<= x -1.22e+39) (not (<= x 1.45e+24)))
(/ (+ x -2.0) 0.24013125253755718)
(/
(* (- x 2.0) (+ z (* x (+ y (* x 137.519416416)))))
(+
(* x (+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1.22e+39) || !(x <= 1.45e+24)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-1.22d+39)) .or. (.not. (x <= 1.45d+24))) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else
tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -1.22e+39) || !(x <= 1.45e+24)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1.22e+39) or not (x <= 1.45e+24): tmp = (x + -2.0) / 0.24013125253755718 else: tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -1.22e+39) || !(x <= 1.45e+24)) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); else tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * 137.519416416))))) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -1.22e+39) || ~((x <= 1.45e+24))) tmp = (x + -2.0) / 0.24013125253755718; else tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -1.22e+39], N[Not[LessEqual[x, 1.45e+24]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * 137.519416416), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.22 \cdot 10^{+39} \lor \neg \left(x \leq 1.45 \cdot 10^{+24}\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\\
\end{array}
\end{array}
if x < -1.22e39 or 1.4499999999999999e24 < x Initial program 8.1%
associate-/l*14.0%
sub-neg14.0%
metadata-eval14.0%
fma-def14.0%
fma-def14.0%
fma-def14.0%
fma-def14.0%
fma-def14.0%
fma-def14.0%
fma-def14.0%
Simplified14.0%
Taylor expanded in x around inf 96.2%
if -1.22e39 < x < 1.4499999999999999e24Initial program 99.0%
Taylor expanded in x around 0 97.0%
*-commutative97.0%
Simplified97.0%
Final simplification96.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ (+ x -2.0) 0.24013125253755718)))
(if (<= x -3e+46)
t_0
(if (<= x -1.55e-5)
(+
(/
(* (- x 2.0) z)
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
(- (* x 4.16438922228) 110.1139242984811))
(if (<= x 6.2e+19)
(+
(* z -0.0424927283095952)
(*
x
(-
(* 0.0212463641547976 (+ z (* y -2.0)))
(* z -0.28294182010212804))))
t_0)))))
double code(double x, double y, double z) {
double t_0 = (x + -2.0) / 0.24013125253755718;
double tmp;
if (x <= -3e+46) {
tmp = t_0;
} else if (x <= -1.55e-5) {
tmp = (((x - 2.0) * z) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) + ((x * 4.16438922228) - 110.1139242984811);
} else if (x <= 6.2e+19) {
tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804)));
} 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 = (x + (-2.0d0)) / 0.24013125253755718d0
if (x <= (-3d+46)) then
tmp = t_0
else if (x <= (-1.55d-5)) then
tmp = (((x - 2.0d0) * z) / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0)) + ((x * 4.16438922228d0) - 110.1139242984811d0)
else if (x <= 6.2d+19) then
tmp = (z * (-0.0424927283095952d0)) + (x * ((0.0212463641547976d0 * (z + (y * (-2.0d0)))) - (z * (-0.28294182010212804d0))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (x + -2.0) / 0.24013125253755718;
double tmp;
if (x <= -3e+46) {
tmp = t_0;
} else if (x <= -1.55e-5) {
tmp = (((x - 2.0) * z) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) + ((x * 4.16438922228) - 110.1139242984811);
} else if (x <= 6.2e+19) {
tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = (x + -2.0) / 0.24013125253755718 tmp = 0 if x <= -3e+46: tmp = t_0 elif x <= -1.55e-5: tmp = (((x - 2.0) * z) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) + ((x * 4.16438922228) - 110.1139242984811) elif x <= 6.2e+19: tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804))) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(x + -2.0) / 0.24013125253755718) tmp = 0.0 if (x <= -3e+46) tmp = t_0; elseif (x <= -1.55e-5) tmp = Float64(Float64(Float64(Float64(x - 2.0) * z) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) + Float64(Float64(x * 4.16438922228) - 110.1139242984811)); elseif (x <= 6.2e+19) tmp = Float64(Float64(z * -0.0424927283095952) + Float64(x * Float64(Float64(0.0212463641547976 * Float64(z + Float64(y * -2.0))) - Float64(z * -0.28294182010212804)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x + -2.0) / 0.24013125253755718; tmp = 0.0; if (x <= -3e+46) tmp = t_0; elseif (x <= -1.55e-5) tmp = (((x - 2.0) * z) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) + ((x * 4.16438922228) - 110.1139242984811); elseif (x <= 6.2e+19) tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804))); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]}, If[LessEqual[x, -3e+46], t$95$0, If[LessEqual[x, -1.55e-5], N[(N[(N[(N[(x - 2.0), $MachinePrecision] * z), $MachinePrecision] / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision] + N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.2e+19], N[(N[(z * -0.0424927283095952), $MachinePrecision] + N[(x * N[(N[(0.0212463641547976 * N[(z + N[(y * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * -0.28294182010212804), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x + -2}{0.24013125253755718}\\
\mathbf{if}\;x \leq -3 \cdot 10^{+46}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -1.55 \cdot 10^{-5}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606} + \left(x \cdot 4.16438922228 - 110.1139242984811\right)\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{+19}:\\
\;\;\;\;z \cdot -0.0424927283095952 + x \cdot \left(0.0212463641547976 \cdot \left(z + y \cdot -2\right) - z \cdot -0.28294182010212804\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x < -3.00000000000000023e46 or 6.2e19 < x Initial program 7.3%
associate-/l*13.2%
sub-neg13.2%
metadata-eval13.2%
fma-def13.2%
fma-def13.2%
fma-def13.2%
fma-def13.2%
fma-def13.2%
fma-def13.2%
fma-def13.2%
Simplified13.2%
Taylor expanded in x around inf 96.2%
if -3.00000000000000023e46 < x < -1.55000000000000007e-5Initial program 98.9%
Simplified99.1%
Taylor expanded in z around inf 98.9%
Taylor expanded in x around inf 67.2%
if -1.55000000000000007e-5 < x < 6.2e19Initial program 99.0%
Simplified99.4%
Taylor expanded in x around 0 92.3%
Final simplification92.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ (+ x -2.0) 0.24013125253755718)))
(if (<= x -2.9e+46)
t_0
(if (<= x -1.55e-5)
(+
(* x 4.16438922228)
(/
(* (- x 2.0) z)
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606)))
(if (<= x 6.2e+19)
(+
(* z -0.0424927283095952)
(*
x
(-
(* 0.0212463641547976 (+ z (* y -2.0)))
(* z -0.28294182010212804))))
t_0)))))
double code(double x, double y, double z) {
double t_0 = (x + -2.0) / 0.24013125253755718;
double tmp;
if (x <= -2.9e+46) {
tmp = t_0;
} else if (x <= -1.55e-5) {
tmp = (x * 4.16438922228) + (((x - 2.0) * z) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606));
} else if (x <= 6.2e+19) {
tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804)));
} 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 = (x + (-2.0d0)) / 0.24013125253755718d0
if (x <= (-2.9d+46)) then
tmp = t_0
else if (x <= (-1.55d-5)) then
tmp = (x * 4.16438922228d0) + (((x - 2.0d0) * z) / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0))
else if (x <= 6.2d+19) then
tmp = (z * (-0.0424927283095952d0)) + (x * ((0.0212463641547976d0 * (z + (y * (-2.0d0)))) - (z * (-0.28294182010212804d0))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (x + -2.0) / 0.24013125253755718;
double tmp;
if (x <= -2.9e+46) {
tmp = t_0;
} else if (x <= -1.55e-5) {
tmp = (x * 4.16438922228) + (((x - 2.0) * z) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606));
} else if (x <= 6.2e+19) {
tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = (x + -2.0) / 0.24013125253755718 tmp = 0 if x <= -2.9e+46: tmp = t_0 elif x <= -1.55e-5: tmp = (x * 4.16438922228) + (((x - 2.0) * z) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) elif x <= 6.2e+19: tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804))) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(x + -2.0) / 0.24013125253755718) tmp = 0.0 if (x <= -2.9e+46) tmp = t_0; elseif (x <= -1.55e-5) tmp = Float64(Float64(x * 4.16438922228) + Float64(Float64(Float64(x - 2.0) * z) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606))); elseif (x <= 6.2e+19) tmp = Float64(Float64(z * -0.0424927283095952) + Float64(x * Float64(Float64(0.0212463641547976 * Float64(z + Float64(y * -2.0))) - Float64(z * -0.28294182010212804)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x + -2.0) / 0.24013125253755718; tmp = 0.0; if (x <= -2.9e+46) tmp = t_0; elseif (x <= -1.55e-5) tmp = (x * 4.16438922228) + (((x - 2.0) * z) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)); elseif (x <= 6.2e+19) tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804))); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]}, If[LessEqual[x, -2.9e+46], t$95$0, If[LessEqual[x, -1.55e-5], N[(N[(x * 4.16438922228), $MachinePrecision] + N[(N[(N[(x - 2.0), $MachinePrecision] * z), $MachinePrecision] / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.2e+19], N[(N[(z * -0.0424927283095952), $MachinePrecision] + N[(x * N[(N[(0.0212463641547976 * N[(z + N[(y * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * -0.28294182010212804), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x + -2}{0.24013125253755718}\\
\mathbf{if}\;x \leq -2.9 \cdot 10^{+46}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -1.55 \cdot 10^{-5}:\\
\;\;\;\;x \cdot 4.16438922228 + \frac{\left(x - 2\right) \cdot z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{+19}:\\
\;\;\;\;z \cdot -0.0424927283095952 + x \cdot \left(0.0212463641547976 \cdot \left(z + y \cdot -2\right) - z \cdot -0.28294182010212804\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x < -2.9000000000000002e46 or 6.2e19 < x Initial program 7.3%
associate-/l*13.2%
sub-neg13.2%
metadata-eval13.2%
fma-def13.2%
fma-def13.2%
fma-def13.2%
fma-def13.2%
fma-def13.2%
fma-def13.2%
fma-def13.2%
Simplified13.2%
Taylor expanded in x around inf 96.2%
if -2.9000000000000002e46 < x < -1.55000000000000007e-5Initial program 98.9%
Simplified99.1%
Taylor expanded in z around inf 98.9%
Taylor expanded in x around inf 64.4%
*-commutative64.6%
Simplified64.4%
if -1.55000000000000007e-5 < x < 6.2e19Initial program 99.0%
Simplified99.4%
Taylor expanded in x around 0 92.3%
Final simplification92.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ (+ x -2.0) 0.24013125253755718)))
(if (<= x -1.22e+39)
t_0
(if (<= x -1.55e-5)
(/
(* (- x 2.0) z)
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
(if (<= x 6.2e+19)
(+
(* z -0.0424927283095952)
(*
x
(-
(* 0.0212463641547976 (+ z (* y -2.0)))
(* z -0.28294182010212804))))
t_0)))))
double code(double x, double y, double z) {
double t_0 = (x + -2.0) / 0.24013125253755718;
double tmp;
if (x <= -1.22e+39) {
tmp = t_0;
} else if (x <= -1.55e-5) {
tmp = ((x - 2.0) * z) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
} else if (x <= 6.2e+19) {
tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804)));
} 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 = (x + (-2.0d0)) / 0.24013125253755718d0
if (x <= (-1.22d+39)) then
tmp = t_0
else if (x <= (-1.55d-5)) then
tmp = ((x - 2.0d0) * z) / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0)
else if (x <= 6.2d+19) then
tmp = (z * (-0.0424927283095952d0)) + (x * ((0.0212463641547976d0 * (z + (y * (-2.0d0)))) - (z * (-0.28294182010212804d0))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (x + -2.0) / 0.24013125253755718;
double tmp;
if (x <= -1.22e+39) {
tmp = t_0;
} else if (x <= -1.55e-5) {
tmp = ((x - 2.0) * z) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
} else if (x <= 6.2e+19) {
tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = (x + -2.0) / 0.24013125253755718 tmp = 0 if x <= -1.22e+39: tmp = t_0 elif x <= -1.55e-5: tmp = ((x - 2.0) * z) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) elif x <= 6.2e+19: tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804))) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(x + -2.0) / 0.24013125253755718) tmp = 0.0 if (x <= -1.22e+39) tmp = t_0; elseif (x <= -1.55e-5) tmp = Float64(Float64(Float64(x - 2.0) * z) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)); elseif (x <= 6.2e+19) tmp = Float64(Float64(z * -0.0424927283095952) + Float64(x * Float64(Float64(0.0212463641547976 * Float64(z + Float64(y * -2.0))) - Float64(z * -0.28294182010212804)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x + -2.0) / 0.24013125253755718; tmp = 0.0; if (x <= -1.22e+39) tmp = t_0; elseif (x <= -1.55e-5) tmp = ((x - 2.0) * z) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606); elseif (x <= 6.2e+19) tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804))); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]}, If[LessEqual[x, -1.22e+39], t$95$0, If[LessEqual[x, -1.55e-5], N[(N[(N[(x - 2.0), $MachinePrecision] * z), $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[x, 6.2e+19], N[(N[(z * -0.0424927283095952), $MachinePrecision] + N[(x * N[(N[(0.0212463641547976 * N[(z + N[(y * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * -0.28294182010212804), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x + -2}{0.24013125253755718}\\
\mathbf{if}\;x \leq -1.22 \cdot 10^{+39}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -1.55 \cdot 10^{-5}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{+19}:\\
\;\;\;\;z \cdot -0.0424927283095952 + x \cdot \left(0.0212463641547976 \cdot \left(z + y \cdot -2\right) - z \cdot -0.28294182010212804\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x < -1.22e39 or 6.2e19 < x Initial program 8.1%
associate-/l*14.0%
sub-neg14.0%
metadata-eval14.0%
fma-def14.0%
fma-def14.0%
fma-def14.0%
fma-def14.0%
fma-def14.0%
fma-def14.0%
fma-def14.0%
Simplified14.0%
Taylor expanded in x around inf 96.2%
if -1.22e39 < x < -1.55000000000000007e-5Initial program 98.9%
Simplified99.1%
Taylor expanded in z around inf 57.1%
if -1.55000000000000007e-5 < x < 6.2e19Initial program 99.0%
Simplified99.4%
Taylor expanded in x around 0 92.3%
Final simplification92.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ (+ x -2.0) 0.24013125253755718)))
(if (<= x -1.22e+39)
t_0
(if (<= x -2.2e-5)
(/
(+ x -2.0)
(/
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606)
z))
(if (<= x 6.2e+19)
(+
(* z -0.0424927283095952)
(*
x
(-
(* 0.0212463641547976 (+ z (* y -2.0)))
(* z -0.28294182010212804))))
t_0)))))
double code(double x, double y, double z) {
double t_0 = (x + -2.0) / 0.24013125253755718;
double tmp;
if (x <= -1.22e+39) {
tmp = t_0;
} else if (x <= -2.2e-5) {
tmp = (x + -2.0) / (((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) / z);
} else if (x <= 6.2e+19) {
tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804)));
} 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 = (x + (-2.0d0)) / 0.24013125253755718d0
if (x <= (-1.22d+39)) then
tmp = t_0
else if (x <= (-2.2d-5)) then
tmp = (x + (-2.0d0)) / (((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0) / z)
else if (x <= 6.2d+19) then
tmp = (z * (-0.0424927283095952d0)) + (x * ((0.0212463641547976d0 * (z + (y * (-2.0d0)))) - (z * (-0.28294182010212804d0))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (x + -2.0) / 0.24013125253755718;
double tmp;
if (x <= -1.22e+39) {
tmp = t_0;
} else if (x <= -2.2e-5) {
tmp = (x + -2.0) / (((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) / z);
} else if (x <= 6.2e+19) {
tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = (x + -2.0) / 0.24013125253755718 tmp = 0 if x <= -1.22e+39: tmp = t_0 elif x <= -2.2e-5: tmp = (x + -2.0) / (((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) / z) elif x <= 6.2e+19: tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804))) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(x + -2.0) / 0.24013125253755718) tmp = 0.0 if (x <= -1.22e+39) tmp = t_0; elseif (x <= -2.2e-5) tmp = Float64(Float64(x + -2.0) / Float64(Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) / z)); elseif (x <= 6.2e+19) tmp = Float64(Float64(z * -0.0424927283095952) + Float64(x * Float64(Float64(0.0212463641547976 * Float64(z + Float64(y * -2.0))) - Float64(z * -0.28294182010212804)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x + -2.0) / 0.24013125253755718; tmp = 0.0; if (x <= -1.22e+39) tmp = t_0; elseif (x <= -2.2e-5) tmp = (x + -2.0) / (((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) / z); elseif (x <= 6.2e+19) tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804))); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]}, If[LessEqual[x, -1.22e+39], t$95$0, If[LessEqual[x, -2.2e-5], N[(N[(x + -2.0), $MachinePrecision] / N[(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] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.2e+19], N[(N[(z * -0.0424927283095952), $MachinePrecision] + N[(x * N[(N[(0.0212463641547976 * N[(z + N[(y * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * -0.28294182010212804), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x + -2}{0.24013125253755718}\\
\mathbf{if}\;x \leq -1.22 \cdot 10^{+39}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -2.2 \cdot 10^{-5}:\\
\;\;\;\;\frac{x + -2}{\frac{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}{z}}\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{+19}:\\
\;\;\;\;z \cdot -0.0424927283095952 + x \cdot \left(0.0212463641547976 \cdot \left(z + y \cdot -2\right) - z \cdot -0.28294182010212804\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x < -1.22e39 or 6.2e19 < x Initial program 8.1%
associate-/l*14.0%
sub-neg14.0%
metadata-eval14.0%
fma-def14.0%
fma-def14.0%
fma-def14.0%
fma-def14.0%
fma-def14.0%
fma-def14.0%
fma-def14.0%
Simplified14.0%
Taylor expanded in x around inf 96.2%
if -1.22e39 < x < -2.1999999999999999e-5Initial program 98.9%
associate-/l*99.1%
sub-neg99.1%
metadata-eval99.1%
fma-def99.3%
fma-def99.3%
fma-def99.3%
fma-def99.3%
fma-def99.3%
fma-def99.1%
fma-def99.3%
Simplified99.3%
Taylor expanded in z around inf 57.3%
if -2.1999999999999999e-5 < x < 6.2e19Initial program 99.0%
Simplified99.4%
Taylor expanded in x around 0 92.3%
Final simplification92.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ (+ x -2.0) 0.24013125253755718))
(t_1 (/ (+ x -2.0) (/ 47.066876606 z))))
(if (<= x -3.0)
t_0
(if (<= x 7.2e-106)
t_1
(if (<= x 8.5e-85)
(* -0.0424927283095952 (* x y))
(if (<= x 6.2e+19) t_1 t_0))))))
double code(double x, double y, double z) {
double t_0 = (x + -2.0) / 0.24013125253755718;
double t_1 = (x + -2.0) / (47.066876606 / z);
double tmp;
if (x <= -3.0) {
tmp = t_0;
} else if (x <= 7.2e-106) {
tmp = t_1;
} else if (x <= 8.5e-85) {
tmp = -0.0424927283095952 * (x * y);
} else if (x <= 6.2e+19) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x + (-2.0d0)) / 0.24013125253755718d0
t_1 = (x + (-2.0d0)) / (47.066876606d0 / z)
if (x <= (-3.0d0)) then
tmp = t_0
else if (x <= 7.2d-106) then
tmp = t_1
else if (x <= 8.5d-85) then
tmp = (-0.0424927283095952d0) * (x * y)
else if (x <= 6.2d+19) then
tmp = t_1
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (x + -2.0) / 0.24013125253755718;
double t_1 = (x + -2.0) / (47.066876606 / z);
double tmp;
if (x <= -3.0) {
tmp = t_0;
} else if (x <= 7.2e-106) {
tmp = t_1;
} else if (x <= 8.5e-85) {
tmp = -0.0424927283095952 * (x * y);
} else if (x <= 6.2e+19) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = (x + -2.0) / 0.24013125253755718 t_1 = (x + -2.0) / (47.066876606 / z) tmp = 0 if x <= -3.0: tmp = t_0 elif x <= 7.2e-106: tmp = t_1 elif x <= 8.5e-85: tmp = -0.0424927283095952 * (x * y) elif x <= 6.2e+19: tmp = t_1 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(x + -2.0) / 0.24013125253755718) t_1 = Float64(Float64(x + -2.0) / Float64(47.066876606 / z)) tmp = 0.0 if (x <= -3.0) tmp = t_0; elseif (x <= 7.2e-106) tmp = t_1; elseif (x <= 8.5e-85) tmp = Float64(-0.0424927283095952 * Float64(x * y)); elseif (x <= 6.2e+19) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x + -2.0) / 0.24013125253755718; t_1 = (x + -2.0) / (47.066876606 / z); tmp = 0.0; if (x <= -3.0) tmp = t_0; elseif (x <= 7.2e-106) tmp = t_1; elseif (x <= 8.5e-85) tmp = -0.0424927283095952 * (x * y); elseif (x <= 6.2e+19) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x + -2.0), $MachinePrecision] / N[(47.066876606 / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.0], t$95$0, If[LessEqual[x, 7.2e-106], t$95$1, If[LessEqual[x, 8.5e-85], N[(-0.0424927283095952 * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.2e+19], t$95$1, t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x + -2}{0.24013125253755718}\\
t_1 := \frac{x + -2}{\frac{47.066876606}{z}}\\
\mathbf{if}\;x \leq -3:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 7.2 \cdot 10^{-106}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{-85}:\\
\;\;\;\;-0.0424927283095952 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{+19}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x < -3 or 6.2e19 < x Initial program 16.1%
associate-/l*21.5%
sub-neg21.5%
metadata-eval21.5%
fma-def21.6%
fma-def21.6%
fma-def21.6%
fma-def21.6%
fma-def21.6%
fma-def21.5%
fma-def21.6%
Simplified21.6%
Taylor expanded in x around inf 88.4%
if -3 < x < 7.20000000000000025e-106 or 8.50000000000000052e-85 < x < 6.2e19Initial program 98.9%
associate-/l*99.6%
sub-neg99.6%
metadata-eval99.6%
fma-def99.6%
fma-def99.6%
fma-def99.6%
fma-def99.6%
fma-def99.6%
fma-def99.6%
fma-def99.6%
Simplified99.6%
Taylor expanded in x around 0 75.1%
if 7.20000000000000025e-106 < x < 8.50000000000000052e-85Initial program 99.8%
associate-/l*99.8%
sub-neg99.8%
metadata-eval99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
Simplified99.8%
Taylor expanded in y around inf 80.0%
Taylor expanded in x around 0 80.0%
Taylor expanded in x around 0 79.7%
Final simplification81.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ (+ x -2.0) (/ 47.066876606 z))))
(if (<= x -5.5)
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x)))
(if (<= x 7.2e-106)
t_0
(if (<= x 3.3e-85)
(* -0.0424927283095952 (* x y))
(if (<= x 6.2e+19) t_0 (/ (+ x -2.0) 0.24013125253755718)))))))
double code(double x, double y, double z) {
double t_0 = (x + -2.0) / (47.066876606 / z);
double tmp;
if (x <= -5.5) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else if (x <= 7.2e-106) {
tmp = t_0;
} else if (x <= 3.3e-85) {
tmp = -0.0424927283095952 * (x * y);
} else if (x <= 6.2e+19) {
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)) / (47.066876606d0 / z)
if (x <= (-5.5d0)) then
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
else if (x <= 7.2d-106) then
tmp = t_0
else if (x <= 3.3d-85) then
tmp = (-0.0424927283095952d0) * (x * y)
else if (x <= 6.2d+19) 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) / (47.066876606 / z);
double tmp;
if (x <= -5.5) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else if (x <= 7.2e-106) {
tmp = t_0;
} else if (x <= 3.3e-85) {
tmp = -0.0424927283095952 * (x * y);
} else if (x <= 6.2e+19) {
tmp = t_0;
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
def code(x, y, z): t_0 = (x + -2.0) / (47.066876606 / z) tmp = 0 if x <= -5.5: tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) elif x <= 7.2e-106: tmp = t_0 elif x <= 3.3e-85: tmp = -0.0424927283095952 * (x * y) elif x <= 6.2e+19: tmp = t_0 else: tmp = (x + -2.0) / 0.24013125253755718 return tmp
function code(x, y, z) t_0 = Float64(Float64(x + -2.0) / Float64(47.066876606 / z)) tmp = 0.0 if (x <= -5.5) tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); elseif (x <= 7.2e-106) tmp = t_0; elseif (x <= 3.3e-85) tmp = Float64(-0.0424927283095952 * Float64(x * y)); elseif (x <= 6.2e+19) 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) / (47.066876606 / z); tmp = 0.0; if (x <= -5.5) tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); elseif (x <= 7.2e-106) tmp = t_0; elseif (x <= 3.3e-85) tmp = -0.0424927283095952 * (x * y); elseif (x <= 6.2e+19) 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[(x + -2.0), $MachinePrecision] / N[(47.066876606 / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.5], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.2e-106], t$95$0, If[LessEqual[x, 3.3e-85], N[(-0.0424927283095952 * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.2e+19], t$95$0, N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x + -2}{\frac{47.066876606}{z}}\\
\mathbf{if}\;x \leq -5.5:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\mathbf{elif}\;x \leq 7.2 \cdot 10^{-106}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 3.3 \cdot 10^{-85}:\\
\;\;\;\;-0.0424927283095952 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{+19}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\end{array}
\end{array}
if x < -5.5Initial program 17.8%
associate-/l*26.3%
sub-neg26.3%
metadata-eval26.3%
fma-def26.3%
fma-def26.3%
fma-def26.3%
fma-def26.3%
fma-def26.3%
fma-def26.3%
fma-def26.3%
Simplified26.3%
Taylor expanded in x around inf 84.7%
associate-*r/84.7%
metadata-eval84.7%
Simplified84.7%
if -5.5 < x < 7.20000000000000025e-106 or 3.29999999999999973e-85 < x < 6.2e19Initial program 98.9%
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 74.6%
if 7.20000000000000025e-106 < x < 3.29999999999999973e-85Initial program 99.8%
associate-/l*99.8%
sub-neg99.8%
metadata-eval99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
Simplified99.8%
Taylor expanded in y around inf 80.0%
Taylor expanded in x around 0 80.0%
Taylor expanded in x around 0 79.7%
if 6.2e19 < x Initial program 12.6%
associate-/l*14.3%
sub-neg14.3%
metadata-eval14.3%
fma-def14.3%
fma-def14.3%
fma-def14.3%
fma-def14.3%
fma-def14.3%
fma-def14.3%
fma-def14.3%
Simplified14.3%
Taylor expanded in x around inf 94.3%
Final simplification81.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ (+ x -2.0) (/ 47.066876606 z))))
(if (<= x -42.0)
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x)))
(if (<= x 7.2e-106)
t_0
(if (<= x 3.3e-85)
(/ (+ x -2.0) (/ 47.066876606 (* x y)))
(if (<= x 6.2e+19) t_0 (/ (+ x -2.0) 0.24013125253755718)))))))
double code(double x, double y, double z) {
double t_0 = (x + -2.0) / (47.066876606 / z);
double tmp;
if (x <= -42.0) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else if (x <= 7.2e-106) {
tmp = t_0;
} else if (x <= 3.3e-85) {
tmp = (x + -2.0) / (47.066876606 / (x * y));
} else if (x <= 6.2e+19) {
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)) / (47.066876606d0 / z)
if (x <= (-42.0d0)) then
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
else if (x <= 7.2d-106) then
tmp = t_0
else if (x <= 3.3d-85) then
tmp = (x + (-2.0d0)) / (47.066876606d0 / (x * y))
else if (x <= 6.2d+19) 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) / (47.066876606 / z);
double tmp;
if (x <= -42.0) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else if (x <= 7.2e-106) {
tmp = t_0;
} else if (x <= 3.3e-85) {
tmp = (x + -2.0) / (47.066876606 / (x * y));
} else if (x <= 6.2e+19) {
tmp = t_0;
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
def code(x, y, z): t_0 = (x + -2.0) / (47.066876606 / z) tmp = 0 if x <= -42.0: tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) elif x <= 7.2e-106: tmp = t_0 elif x <= 3.3e-85: tmp = (x + -2.0) / (47.066876606 / (x * y)) elif x <= 6.2e+19: tmp = t_0 else: tmp = (x + -2.0) / 0.24013125253755718 return tmp
function code(x, y, z) t_0 = Float64(Float64(x + -2.0) / Float64(47.066876606 / z)) tmp = 0.0 if (x <= -42.0) tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); elseif (x <= 7.2e-106) tmp = t_0; elseif (x <= 3.3e-85) tmp = Float64(Float64(x + -2.0) / Float64(47.066876606 / Float64(x * y))); elseif (x <= 6.2e+19) 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) / (47.066876606 / z); tmp = 0.0; if (x <= -42.0) tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); elseif (x <= 7.2e-106) tmp = t_0; elseif (x <= 3.3e-85) tmp = (x + -2.0) / (47.066876606 / (x * y)); elseif (x <= 6.2e+19) 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[(x + -2.0), $MachinePrecision] / N[(47.066876606 / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -42.0], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.2e-106], t$95$0, If[LessEqual[x, 3.3e-85], N[(N[(x + -2.0), $MachinePrecision] / N[(47.066876606 / N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.2e+19], t$95$0, N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x + -2}{\frac{47.066876606}{z}}\\
\mathbf{if}\;x \leq -42:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\mathbf{elif}\;x \leq 7.2 \cdot 10^{-106}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 3.3 \cdot 10^{-85}:\\
\;\;\;\;\frac{x + -2}{\frac{47.066876606}{x \cdot y}}\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{+19}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\end{array}
\end{array}
if x < -42Initial program 17.8%
associate-/l*26.3%
sub-neg26.3%
metadata-eval26.3%
fma-def26.3%
fma-def26.3%
fma-def26.3%
fma-def26.3%
fma-def26.3%
fma-def26.3%
fma-def26.3%
Simplified26.3%
Taylor expanded in x around inf 84.7%
associate-*r/84.7%
metadata-eval84.7%
Simplified84.7%
if -42 < x < 7.20000000000000025e-106 or 3.29999999999999973e-85 < x < 6.2e19Initial program 98.9%
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 74.6%
if 7.20000000000000025e-106 < x < 3.29999999999999973e-85Initial program 99.8%
associate-/l*99.8%
sub-neg99.8%
metadata-eval99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
fma-def99.8%
Simplified99.8%
Taylor expanded in y around inf 80.0%
Taylor expanded in x around 0 80.0%
if 6.2e19 < x Initial program 12.6%
associate-/l*14.3%
sub-neg14.3%
metadata-eval14.3%
fma-def14.3%
fma-def14.3%
fma-def14.3%
fma-def14.3%
fma-def14.3%
fma-def14.3%
fma-def14.3%
Simplified14.3%
Taylor expanded in x around inf 94.3%
Final simplification81.7%
(FPCore (x y z)
:precision binary64
(if (<= x -115.0)
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x)))
(if (<= x 6.2e+19)
(+
(* z -0.0424927283095952)
(*
x
(- (* 0.0212463641547976 (+ z (* y -2.0))) (* z -0.28294182010212804))))
(/ (+ x -2.0) 0.24013125253755718))))
double code(double x, double y, double z) {
double tmp;
if (x <= -115.0) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else if (x <= 6.2e+19) {
tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804)));
} 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) :: tmp
if (x <= (-115.0d0)) then
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
else if (x <= 6.2d+19) then
tmp = (z * (-0.0424927283095952d0)) + (x * ((0.0212463641547976d0 * (z + (y * (-2.0d0)))) - (z * (-0.28294182010212804d0))))
else
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -115.0) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else if (x <= 6.2e+19) {
tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804)));
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -115.0: tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) elif x <= 6.2e+19: tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804))) else: tmp = (x + -2.0) / 0.24013125253755718 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -115.0) tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); elseif (x <= 6.2e+19) tmp = Float64(Float64(z * -0.0424927283095952) + Float64(x * Float64(Float64(0.0212463641547976 * Float64(z + Float64(y * -2.0))) - Float64(z * -0.28294182010212804)))); else tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -115.0) tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); elseif (x <= 6.2e+19) tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804))); else tmp = (x + -2.0) / 0.24013125253755718; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -115.0], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.2e+19], N[(N[(z * -0.0424927283095952), $MachinePrecision] + N[(x * N[(N[(0.0212463641547976 * N[(z + N[(y * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * -0.28294182010212804), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -115:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{+19}:\\
\;\;\;\;z \cdot -0.0424927283095952 + x \cdot \left(0.0212463641547976 \cdot \left(z + y \cdot -2\right) - z \cdot -0.28294182010212804\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\end{array}
\end{array}
if x < -115Initial program 17.8%
associate-/l*26.3%
sub-neg26.3%
metadata-eval26.3%
fma-def26.3%
fma-def26.3%
fma-def26.3%
fma-def26.3%
fma-def26.3%
fma-def26.3%
fma-def26.3%
Simplified26.3%
Taylor expanded in x around inf 84.7%
associate-*r/84.7%
metadata-eval84.7%
Simplified84.7%
if -115 < x < 6.2e19Initial program 99.0%
Simplified99.4%
Taylor expanded in x around 0 90.9%
if 6.2e19 < x Initial program 12.6%
associate-/l*14.3%
sub-neg14.3%
metadata-eval14.3%
fma-def14.3%
fma-def14.3%
fma-def14.3%
fma-def14.3%
fma-def14.3%
fma-def14.3%
fma-def14.3%
Simplified14.3%
Taylor expanded in x around inf 94.3%
Final simplification90.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ (+ x -2.0) 0.24013125253755718)))
(if (<= x -3.0)
t_0
(if (<= x 4.5e-114)
(* z -0.0424927283095952)
(if (<= x 2.1e-84)
(* -0.0424927283095952 (* x y))
(if (<= x 9.5e+15) (* z -0.0424927283095952) t_0))))))
double code(double x, double y, double z) {
double t_0 = (x + -2.0) / 0.24013125253755718;
double tmp;
if (x <= -3.0) {
tmp = t_0;
} else if (x <= 4.5e-114) {
tmp = z * -0.0424927283095952;
} else if (x <= 2.1e-84) {
tmp = -0.0424927283095952 * (x * y);
} else if (x <= 9.5e+15) {
tmp = z * -0.0424927283095952;
} 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 = (x + (-2.0d0)) / 0.24013125253755718d0
if (x <= (-3.0d0)) then
tmp = t_0
else if (x <= 4.5d-114) then
tmp = z * (-0.0424927283095952d0)
else if (x <= 2.1d-84) then
tmp = (-0.0424927283095952d0) * (x * y)
else if (x <= 9.5d+15) then
tmp = z * (-0.0424927283095952d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (x + -2.0) / 0.24013125253755718;
double tmp;
if (x <= -3.0) {
tmp = t_0;
} else if (x <= 4.5e-114) {
tmp = z * -0.0424927283095952;
} else if (x <= 2.1e-84) {
tmp = -0.0424927283095952 * (x * y);
} else if (x <= 9.5e+15) {
tmp = z * -0.0424927283095952;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = (x + -2.0) / 0.24013125253755718 tmp = 0 if x <= -3.0: tmp = t_0 elif x <= 4.5e-114: tmp = z * -0.0424927283095952 elif x <= 2.1e-84: tmp = -0.0424927283095952 * (x * y) elif x <= 9.5e+15: tmp = z * -0.0424927283095952 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(x + -2.0) / 0.24013125253755718) tmp = 0.0 if (x <= -3.0) tmp = t_0; elseif (x <= 4.5e-114) tmp = Float64(z * -0.0424927283095952); elseif (x <= 2.1e-84) tmp = Float64(-0.0424927283095952 * Float64(x * y)); elseif (x <= 9.5e+15) tmp = Float64(z * -0.0424927283095952); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x + -2.0) / 0.24013125253755718; tmp = 0.0; if (x <= -3.0) tmp = t_0; elseif (x <= 4.5e-114) tmp = z * -0.0424927283095952; elseif (x <= 2.1e-84) tmp = -0.0424927283095952 * (x * y); elseif (x <= 9.5e+15) tmp = z * -0.0424927283095952; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]}, If[LessEqual[x, -3.0], t$95$0, If[LessEqual[x, 4.5e-114], N[(z * -0.0424927283095952), $MachinePrecision], If[LessEqual[x, 2.1e-84], N[(-0.0424927283095952 * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.5e+15], N[(z * -0.0424927283095952), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x + -2}{0.24013125253755718}\\
\mathbf{if}\;x \leq -3:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{-114}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{-84}:\\
\;\;\;\;-0.0424927283095952 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{+15}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x < -3 or 9.5e15 < x Initial program 16.1%
associate-/l*22.2%
sub-neg22.2%
metadata-eval22.2%
fma-def22.2%
fma-def22.2%
fma-def22.2%
fma-def22.2%
fma-def22.2%
fma-def22.2%
fma-def22.2%
Simplified22.2%
Taylor expanded in x around inf 87.7%
if -3 < x < 4.49999999999999969e-114 or 2.09999999999999998e-84 < x < 9.5e15Initial program 99.6%
Simplified99.4%
Taylor expanded in x around 0 76.0%
if 4.49999999999999969e-114 < x < 2.09999999999999998e-84Initial program 99.9%
associate-/l*99.9%
sub-neg99.9%
metadata-eval99.9%
fma-def99.9%
fma-def99.9%
fma-def99.9%
fma-def99.9%
fma-def99.9%
fma-def99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in y around inf 75.3%
Taylor expanded in x around 0 75.3%
Taylor expanded in x around 0 75.0%
Final simplification81.6%
(FPCore (x y z)
:precision binary64
(if (<= x -3.0)
(* x 4.16438922228)
(if (<= x 5.6e-114)
(* z -0.0424927283095952)
(if (<= x 4.2e-85)
(* -0.0424927283095952 (* x y))
(if (<= x 9.5e+15) (* z -0.0424927283095952) (* x 4.16438922228))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -3.0) {
tmp = x * 4.16438922228;
} else if (x <= 5.6e-114) {
tmp = z * -0.0424927283095952;
} else if (x <= 4.2e-85) {
tmp = -0.0424927283095952 * (x * y);
} else if (x <= 9.5e+15) {
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 <= (-3.0d0)) then
tmp = x * 4.16438922228d0
else if (x <= 5.6d-114) then
tmp = z * (-0.0424927283095952d0)
else if (x <= 4.2d-85) then
tmp = (-0.0424927283095952d0) * (x * y)
else if (x <= 9.5d+15) 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 <= -3.0) {
tmp = x * 4.16438922228;
} else if (x <= 5.6e-114) {
tmp = z * -0.0424927283095952;
} else if (x <= 4.2e-85) {
tmp = -0.0424927283095952 * (x * y);
} else if (x <= 9.5e+15) {
tmp = z * -0.0424927283095952;
} else {
tmp = x * 4.16438922228;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -3.0: tmp = x * 4.16438922228 elif x <= 5.6e-114: tmp = z * -0.0424927283095952 elif x <= 4.2e-85: tmp = -0.0424927283095952 * (x * y) elif x <= 9.5e+15: tmp = z * -0.0424927283095952 else: tmp = x * 4.16438922228 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -3.0) tmp = Float64(x * 4.16438922228); elseif (x <= 5.6e-114) tmp = Float64(z * -0.0424927283095952); elseif (x <= 4.2e-85) tmp = Float64(-0.0424927283095952 * Float64(x * y)); elseif (x <= 9.5e+15) 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 <= -3.0) tmp = x * 4.16438922228; elseif (x <= 5.6e-114) tmp = z * -0.0424927283095952; elseif (x <= 4.2e-85) tmp = -0.0424927283095952 * (x * y); elseif (x <= 9.5e+15) tmp = z * -0.0424927283095952; else tmp = x * 4.16438922228; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -3.0], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 5.6e-114], N[(z * -0.0424927283095952), $MachinePrecision], If[LessEqual[x, 4.2e-85], N[(-0.0424927283095952 * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.5e+15], N[(z * -0.0424927283095952), $MachinePrecision], N[(x * 4.16438922228), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 5.6 \cdot 10^{-114}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{-85}:\\
\;\;\;\;-0.0424927283095952 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{+15}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228\\
\end{array}
\end{array}
if x < -3 or 9.5e15 < x Initial program 16.1%
Simplified22.1%
Taylor expanded in x around inf 87.2%
*-commutative87.2%
Simplified87.2%
if -3 < x < 5.6000000000000003e-114 or 4.2e-85 < x < 9.5e15Initial program 99.6%
Simplified99.4%
Taylor expanded in x around 0 76.0%
if 5.6000000000000003e-114 < x < 4.2e-85Initial program 99.9%
associate-/l*99.9%
sub-neg99.9%
metadata-eval99.9%
fma-def99.9%
fma-def99.9%
fma-def99.9%
fma-def99.9%
fma-def99.9%
fma-def99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in y around inf 75.3%
Taylor expanded in x around 0 75.3%
Taylor expanded in x around 0 75.0%
Final simplification81.4%
(FPCore (x y z)
:precision binary64
(if (<= x -82.0)
(- (* x 4.16438922228) 110.1139242984811)
(if (<= x 5.5e-114)
(* z -0.0424927283095952)
(if (<= x 3.5e-85)
(* -0.0424927283095952 (* x y))
(if (<= x 9.5e+15) (* z -0.0424927283095952) (* x 4.16438922228))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -82.0) {
tmp = (x * 4.16438922228) - 110.1139242984811;
} else if (x <= 5.5e-114) {
tmp = z * -0.0424927283095952;
} else if (x <= 3.5e-85) {
tmp = -0.0424927283095952 * (x * y);
} else if (x <= 9.5e+15) {
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 <= (-82.0d0)) then
tmp = (x * 4.16438922228d0) - 110.1139242984811d0
else if (x <= 5.5d-114) then
tmp = z * (-0.0424927283095952d0)
else if (x <= 3.5d-85) then
tmp = (-0.0424927283095952d0) * (x * y)
else if (x <= 9.5d+15) 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 <= -82.0) {
tmp = (x * 4.16438922228) - 110.1139242984811;
} else if (x <= 5.5e-114) {
tmp = z * -0.0424927283095952;
} else if (x <= 3.5e-85) {
tmp = -0.0424927283095952 * (x * y);
} else if (x <= 9.5e+15) {
tmp = z * -0.0424927283095952;
} else {
tmp = x * 4.16438922228;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -82.0: tmp = (x * 4.16438922228) - 110.1139242984811 elif x <= 5.5e-114: tmp = z * -0.0424927283095952 elif x <= 3.5e-85: tmp = -0.0424927283095952 * (x * y) elif x <= 9.5e+15: tmp = z * -0.0424927283095952 else: tmp = x * 4.16438922228 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -82.0) tmp = Float64(Float64(x * 4.16438922228) - 110.1139242984811); elseif (x <= 5.5e-114) tmp = Float64(z * -0.0424927283095952); elseif (x <= 3.5e-85) tmp = Float64(-0.0424927283095952 * Float64(x * y)); elseif (x <= 9.5e+15) 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 <= -82.0) tmp = (x * 4.16438922228) - 110.1139242984811; elseif (x <= 5.5e-114) tmp = z * -0.0424927283095952; elseif (x <= 3.5e-85) tmp = -0.0424927283095952 * (x * y); elseif (x <= 9.5e+15) tmp = z * -0.0424927283095952; else tmp = x * 4.16438922228; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -82.0], N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision], If[LessEqual[x, 5.5e-114], N[(z * -0.0424927283095952), $MachinePrecision], If[LessEqual[x, 3.5e-85], N[(-0.0424927283095952 * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.5e+15], N[(z * -0.0424927283095952), $MachinePrecision], N[(x * 4.16438922228), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -82:\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\
\mathbf{elif}\;x \leq 5.5 \cdot 10^{-114}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{-85}:\\
\;\;\;\;-0.0424927283095952 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{+15}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228\\
\end{array}
\end{array}
if x < -82Initial program 17.8%
Simplified26.3%
Taylor expanded in x around inf 84.3%
if -82 < x < 5.5000000000000001e-114 or 3.49999999999999978e-85 < x < 9.5e15Initial program 99.6%
Simplified99.4%
Taylor expanded in x around 0 75.5%
if 5.5000000000000001e-114 < x < 3.49999999999999978e-85Initial program 99.9%
associate-/l*99.9%
sub-neg99.9%
metadata-eval99.9%
fma-def99.9%
fma-def99.9%
fma-def99.9%
fma-def99.9%
fma-def99.9%
fma-def99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in y around inf 75.3%
Taylor expanded in x around 0 75.3%
Taylor expanded in x around 0 75.0%
if 9.5e15 < x Initial program 12.5%
Simplified15.8%
Taylor expanded in x around inf 92.2%
*-commutative92.2%
Simplified92.2%
Final simplification81.4%
(FPCore (x y z) :precision binary64 (if (or (<= x -3.0) (not (<= x 9.5e+15))) (* x 4.16438922228) (* z -0.0424927283095952)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -3.0) || !(x <= 9.5e+15)) {
tmp = x * 4.16438922228;
} 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 <= (-3.0d0)) .or. (.not. (x <= 9.5d+15))) then
tmp = x * 4.16438922228d0
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 <= -3.0) || !(x <= 9.5e+15)) {
tmp = x * 4.16438922228;
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -3.0) or not (x <= 9.5e+15): tmp = x * 4.16438922228 else: tmp = z * -0.0424927283095952 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -3.0) || !(x <= 9.5e+15)) tmp = Float64(x * 4.16438922228); else tmp = Float64(z * -0.0424927283095952); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -3.0) || ~((x <= 9.5e+15))) tmp = x * 4.16438922228; else tmp = z * -0.0424927283095952; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -3.0], N[Not[LessEqual[x, 9.5e+15]], $MachinePrecision]], N[(x * 4.16438922228), $MachinePrecision], N[(z * -0.0424927283095952), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3 \lor \neg \left(x \leq 9.5 \cdot 10^{+15}\right):\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{else}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\end{array}
\end{array}
if x < -3 or 9.5e15 < x Initial program 16.1%
Simplified22.1%
Taylor expanded in x around inf 87.2%
*-commutative87.2%
Simplified87.2%
if -3 < x < 9.5e15Initial program 99.7%
Simplified99.4%
Taylor expanded in x around 0 71.6%
Final simplification79.2%
(FPCore (x y z) :precision binary64 (* z -0.0424927283095952))
double code(double x, double y, double z) {
return z * -0.0424927283095952;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = z * (-0.0424927283095952d0)
end function
public static double code(double x, double y, double z) {
return z * -0.0424927283095952;
}
def code(x, y, z): return z * -0.0424927283095952
function code(x, y, z) return Float64(z * -0.0424927283095952) end
function tmp = code(x, y, z) tmp = z * -0.0424927283095952; end
code[x_, y_, z_] := N[(z * -0.0424927283095952), $MachinePrecision]
\begin{array}{l}
\\
z \cdot -0.0424927283095952
\end{array}
Initial program 58.8%
Simplified61.7%
Taylor expanded in x around 0 38.2%
Final simplification38.2%
(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 2024018
(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)))