
(FPCore (x y z)
:precision binary64
(/
(*
(- x 2.0)
(+
(*
(+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y)
x)
z))
(+
(* (+ (* (+ (* (+ x 43.3400022514) x) 263.505074721) x) 313.399215894) x)
47.066876606)))
double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((x - 2.0d0) * ((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z)) / (((((((x + 43.3400022514d0) * x) + 263.505074721d0) * x) + 313.399215894d0) * x) + 47.066876606d0)
end function
public static double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
def code(x, y, z): return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)
function code(x, y, z) return Float64(Float64(Float64(x - 2.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) end
function tmp = code(x, y, z) tmp = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606); end
code[x_, y_, z_] := N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision] * x), $MachinePrecision] + 137.519416416), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(x + 43.3400022514), $MachinePrecision] * x), $MachinePrecision] + 263.505074721), $MachinePrecision] * x), $MachinePrecision] + 313.399215894), $MachinePrecision] * x), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z)
:precision binary64
(/
(*
(- x 2.0)
(+
(*
(+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y)
x)
z))
(+
(* (+ (* (+ (* (+ x 43.3400022514) x) 263.505074721) x) 313.399215894) x)
47.066876606)))
double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((x - 2.0d0) * ((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z)) / (((((((x + 43.3400022514d0) * x) + 263.505074721d0) * x) + 313.399215894d0) * x) + 47.066876606d0)
end function
public static double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
def code(x, y, z): return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)
function code(x, y, z) return Float64(Float64(Float64(x - 2.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) end
function tmp = code(x, y, z) tmp = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606); end
code[x_, y_, z_] := N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision] * x), $MachinePrecision] + 137.519416416), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(x + 43.3400022514), $MachinePrecision] * x), $MachinePrecision] + 263.505074721), $MachinePrecision] * x), $MachinePrecision] + 313.399215894), $MachinePrecision] * x), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\end{array}
(FPCore (x y z)
:precision binary64
(if (<=
(/
(*
(- x 2.0)
(+
(*
x
(+
y
(*
x
(+ 137.519416416 (* x (+ 78.6994924154 (* x 4.16438922228)))))))
z))
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
5e+287)
(*
(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)))
(-
(+
(+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x)))
(/ y (pow x 2.0)))
110.1139242984811)))
double code(double x, double y, double z) {
double tmp;
if ((((x - 2.0) * ((x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= 5e+287) {
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 = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) + (y / pow(x, 2.0))) - 110.1139242984811;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(y + Float64(x * Float64(137.519416416 + Float64(x * Float64(78.6994924154 + Float64(x * 4.16438922228))))))) + z)) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= 5e+287) 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(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x))) + Float64(y / (x ^ 2.0))) - 110.1139242984811); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(y + N[(x * N[(137.519416416 + N[(x * N[(78.6994924154 + N[(x * 4.16438922228), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision], 5e+287], 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[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(y + x \cdot \left(137.519416416 + x \cdot \left(78.6994924154 + x \cdot 4.16438922228\right)\right)\right) + z\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606} \leq 5 \cdot 10^{+287}:\\
\;\;\;\;\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(\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) + \frac{y}{{x}^{2}}\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)) < 5e287Initial program 96.3%
Simplified99.4%
if 5e287 < (/.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.3%
Simplified3.9%
Taylor expanded in x around -inf 98.4%
Taylor expanded in y around inf 98.4%
associate-*r/98.4%
neg-mul-198.4%
Simplified98.4%
Final simplification99.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
(t_1
(+
y
(*
x
(+ 137.519416416 (* x (+ 78.6994924154 (* x 4.16438922228))))))))
(if (<= (/ (* (- x 2.0) (+ (* x t_1) z)) t_0) 5e+287)
(+
(* z (- (/ x t_0) (* 2.0 (/ 1.0 t_0))))
(/ (* x (* (- x 2.0) t_1)) t_0))
(-
(+
(+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x)))
(/ y (pow x 2.0)))
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 = y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228)))));
double tmp;
if ((((x - 2.0) * ((x * t_1) + z)) / t_0) <= 5e+287) {
tmp = (z * ((x / t_0) - (2.0 * (1.0 / t_0)))) + ((x * ((x - 2.0) * t_1)) / t_0);
} else {
tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) + (y / pow(x, 2.0))) - 110.1139242984811;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0
t_1 = y + (x * (137.519416416d0 + (x * (78.6994924154d0 + (x * 4.16438922228d0)))))
if ((((x - 2.0d0) * ((x * t_1) + z)) / t_0) <= 5d+287) then
tmp = (z * ((x / t_0) - (2.0d0 * (1.0d0 / t_0)))) + ((x * ((x - 2.0d0) * t_1)) / t_0)
else
tmp = (((x * 4.16438922228d0) + (3655.1204654076414d0 * (1.0d0 / x))) + (y / (x ** 2.0d0))) - 110.1139242984811d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double t_1 = y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228)))));
double tmp;
if ((((x - 2.0) * ((x * t_1) + z)) / t_0) <= 5e+287) {
tmp = (z * ((x / t_0) - (2.0 * (1.0 / t_0)))) + ((x * ((x - 2.0) * t_1)) / t_0);
} else {
tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) + (y / Math.pow(x, 2.0))) - 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 = y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))) tmp = 0 if (((x - 2.0) * ((x * t_1) + z)) / t_0) <= 5e+287: tmp = (z * ((x / t_0) - (2.0 * (1.0 / t_0)))) + ((x * ((x - 2.0) * t_1)) / t_0) else: tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) + (y / math.pow(x, 2.0))) - 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(y + Float64(x * Float64(137.519416416 + Float64(x * Float64(78.6994924154 + Float64(x * 4.16438922228)))))) tmp = 0.0 if (Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * t_1) + z)) / t_0) <= 5e+287) 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(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x))) + Float64(y / (x ^ 2.0))) - 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 = y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))); tmp = 0.0; if ((((x - 2.0) * ((x * t_1) + z)) / t_0) <= 5e+287) tmp = (z * ((x / t_0) - (2.0 * (1.0 / t_0)))) + ((x * ((x - 2.0) * t_1)) / t_0); else tmp = (((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x))) + (y / (x ^ 2.0))) - 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[(y + N[(x * N[(137.519416416 + N[(x * N[(78.6994924154 + N[(x * 4.16438922228), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * t$95$1), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], 5e+287], 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[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[Power[x, 2.0], $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 := y + x \cdot \left(137.519416416 + x \cdot \left(78.6994924154 + x \cdot 4.16438922228\right)\right)\\
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(x \cdot t_1 + z\right)}{t_0} \leq 5 \cdot 10^{+287}:\\
\;\;\;\;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(\left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right) + \frac{y}{{x}^{2}}\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)) < 5e287Initial program 96.3%
Simplified99.4%
Taylor expanded in z around 0 96.9%
if 5e287 < (/.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.3%
Simplified3.9%
Taylor expanded in x around -inf 98.4%
Taylor expanded in y around inf 98.4%
associate-*r/98.4%
neg-mul-198.4%
Simplified98.4%
Final simplification97.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
(t_1
(+
y
(*
x
(+ 137.519416416 (* x (+ 78.6994924154 (* x 4.16438922228))))))))
(if (<= (/ (* (- x 2.0) (+ (* x t_1) z)) t_0) 5e+287)
(+
(* 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 = y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228)))));
double tmp;
if ((((x - 2.0) * ((x * t_1) + z)) / t_0) <= 5e+287) {
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;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0
t_1 = y + (x * (137.519416416d0 + (x * (78.6994924154d0 + (x * 4.16438922228d0)))))
if ((((x - 2.0d0) * ((x * t_1) + z)) / t_0) <= 5d+287) then
tmp = (z * ((x / t_0) - (2.0d0 * (1.0d0 / t_0)))) + ((x * ((x - 2.0d0) * t_1)) / t_0)
else
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double t_1 = y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228)))));
double tmp;
if ((((x - 2.0) * ((x * t_1) + z)) / t_0) <= 5e+287) {
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 = y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))) tmp = 0 if (((x - 2.0) * ((x * t_1) + z)) / t_0) <= 5e+287: 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(y + Float64(x * Float64(137.519416416 + Float64(x * Float64(78.6994924154 + Float64(x * 4.16438922228)))))) tmp = 0.0 if (Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * t_1) + z)) / t_0) <= 5e+287) 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 = y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))); tmp = 0.0; if ((((x - 2.0) * ((x * t_1) + z)) / t_0) <= 5e+287) 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[(y + N[(x * N[(137.519416416 + N[(x * N[(78.6994924154 + N[(x * 4.16438922228), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * t$95$1), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], 5e+287], 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 := y + x \cdot \left(137.519416416 + x \cdot \left(78.6994924154 + x \cdot 4.16438922228\right)\right)\\
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(x \cdot t_1 + z\right)}{t_0} \leq 5 \cdot 10^{+287}:\\
\;\;\;\;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)) < 5e287Initial program 96.3%
Simplified99.4%
Taylor expanded in z around 0 96.9%
if 5e287 < (/.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.3%
associate-/l*3.9%
sub-neg3.9%
metadata-eval3.9%
fma-def3.9%
fma-def3.9%
fma-def3.9%
fma-def3.9%
fma-def3.9%
fma-def3.9%
fma-def3.9%
Simplified3.9%
Taylor expanded in x around inf 96.0%
Final simplification96.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
(t_1
(+
y
(*
x
(+ 137.519416416 (* x (+ 78.6994924154 (* x 4.16438922228))))))))
(if (<= (/ (* (- x 2.0) (+ (* x t_1) z)) t_0) 5e+287)
(+ (/ (* x (* (- x 2.0) t_1)) t_0) (/ (* (- x 2.0) z) t_0))
(/ (+ x -2.0) 0.24013125253755718))))
double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double t_1 = y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228)))));
double tmp;
if ((((x - 2.0) * ((x * t_1) + z)) / t_0) <= 5e+287) {
tmp = ((x * ((x - 2.0) * t_1)) / t_0) + (((x - 2.0) * z) / t_0);
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0
t_1 = y + (x * (137.519416416d0 + (x * (78.6994924154d0 + (x * 4.16438922228d0)))))
if ((((x - 2.0d0) * ((x * t_1) + z)) / t_0) <= 5d+287) then
tmp = ((x * ((x - 2.0d0) * t_1)) / t_0) + (((x - 2.0d0) * z) / 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 * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double t_1 = y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228)))));
double tmp;
if ((((x - 2.0) * ((x * t_1) + z)) / t_0) <= 5e+287) {
tmp = ((x * ((x - 2.0) * t_1)) / t_0) + (((x - 2.0) * z) / t_0);
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
def code(x, y, z): t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606 t_1 = y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))) tmp = 0 if (((x - 2.0) * ((x * t_1) + z)) / t_0) <= 5e+287: tmp = ((x * ((x - 2.0) * t_1)) / t_0) + (((x - 2.0) * z) / t_0) else: tmp = (x + -2.0) / 0.24013125253755718 return tmp
function code(x, y, z) t_0 = Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) t_1 = Float64(y + Float64(x * Float64(137.519416416 + Float64(x * Float64(78.6994924154 + Float64(x * 4.16438922228)))))) tmp = 0.0 if (Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * t_1) + z)) / t_0) <= 5e+287) tmp = Float64(Float64(Float64(x * Float64(Float64(x - 2.0) * t_1)) / t_0) + Float64(Float64(Float64(x - 2.0) * z) / t_0)); else tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606; t_1 = y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))); tmp = 0.0; if ((((x - 2.0) * ((x * t_1) + z)) / t_0) <= 5e+287) tmp = ((x * ((x - 2.0) * t_1)) / t_0) + (((x - 2.0) * z) / t_0); else tmp = (x + -2.0) / 0.24013125253755718; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]}, Block[{t$95$1 = N[(y + N[(x * N[(137.519416416 + N[(x * N[(78.6994924154 + N[(x * 4.16438922228), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * t$95$1), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], 5e+287], N[(N[(N[(x * N[(N[(x - 2.0), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision] + N[(N[(N[(x - 2.0), $MachinePrecision] * z), $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 := y + x \cdot \left(137.519416416 + x \cdot \left(78.6994924154 + x \cdot 4.16438922228\right)\right)\\
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(x \cdot t_1 + z\right)}{t_0} \leq 5 \cdot 10^{+287}:\\
\;\;\;\;\frac{x \cdot \left(\left(x - 2\right) \cdot t_1\right)}{t_0} + \frac{\left(x - 2\right) \cdot z}{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)) < 5e287Initial program 96.3%
Simplified99.4%
Taylor expanded in z around inf 96.4%
if 5e287 < (/.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.3%
associate-/l*3.9%
sub-neg3.9%
metadata-eval3.9%
fma-def3.9%
fma-def3.9%
fma-def3.9%
fma-def3.9%
fma-def3.9%
fma-def3.9%
fma-def3.9%
Simplified3.9%
Taylor expanded in x around inf 96.0%
Final simplification96.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(/
(*
(- x 2.0)
(+
(*
x
(+
y
(*
x
(+ 137.519416416 (* x (+ 78.6994924154 (* x 4.16438922228)))))))
z))
(+
(*
x
(+
(* x (+ (* x (+ x 43.3400022514)) 263.505074721))
313.399215894))
47.066876606))))
(if (<= t_0 5e+287) t_0 (/ (+ x -2.0) 0.24013125253755718))))
double code(double x, double y, double z) {
double t_0 = ((x - 2.0) * ((x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
double tmp;
if (t_0 <= 5e+287) {
tmp = t_0;
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = ((x - 2.0d0) * ((x * (y + (x * (137.519416416d0 + (x * (78.6994924154d0 + (x * 4.16438922228d0))))))) + z)) / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0)
if (t_0 <= 5d+287) then
tmp = t_0
else
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((x - 2.0) * ((x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
double tmp;
if (t_0 <= 5e+287) {
tmp = t_0;
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
def code(x, y, z): t_0 = ((x - 2.0) * ((x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) tmp = 0 if t_0 <= 5e+287: tmp = t_0 else: tmp = (x + -2.0) / 0.24013125253755718 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(y + Float64(x * Float64(137.519416416 + Float64(x * Float64(78.6994924154 + Float64(x * 4.16438922228))))))) + z)) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) tmp = 0.0 if (t_0 <= 5e+287) tmp = t_0; else tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((x - 2.0) * ((x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606); tmp = 0.0; if (t_0 <= 5e+287) tmp = t_0; else tmp = (x + -2.0) / 0.24013125253755718; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(y + N[(x * N[(137.519416416 + N[(x * N[(78.6994924154 + N[(x * 4.16438922228), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 5e+287], t$95$0, N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\left(x - 2\right) \cdot \left(x \cdot \left(y + x \cdot \left(137.519416416 + x \cdot \left(78.6994924154 + x \cdot 4.16438922228\right)\right)\right) + z\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\\
\mathbf{if}\;t_0 \leq 5 \cdot 10^{+287}:\\
\;\;\;\;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)) < 5e287Initial program 96.3%
if 5e287 < (/.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.3%
associate-/l*3.9%
sub-neg3.9%
metadata-eval3.9%
fma-def3.9%
fma-def3.9%
fma-def3.9%
fma-def3.9%
fma-def3.9%
fma-def3.9%
fma-def3.9%
Simplified3.9%
Taylor expanded in x around inf 96.0%
Final simplification96.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ (+ x -2.0) 0.24013125253755718))
(t_1
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606)))
(if (<= x -8e+32)
t_0
(if (<= x 2.8e-7)
(/ (* (- x 2.0) (+ z (* x (+ y (* x 137.519416416))))) t_1)
(if (<= x 1.6e+45)
(/
(+ x -2.0)
(/
t_1
(*
x
(+
y
(*
x
(+
137.519416416
(* x (+ 78.6994924154 (* x 4.16438922228)))))))))
t_0)))))
double code(double x, double y, double z) {
double t_0 = (x + -2.0) / 0.24013125253755718;
double t_1 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double tmp;
if (x <= -8e+32) {
tmp = t_0;
} else if (x <= 2.8e-7) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / t_1;
} else if (x <= 1.6e+45) {
tmp = (x + -2.0) / (t_1 / (x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x + (-2.0d0)) / 0.24013125253755718d0
t_1 = (x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0
if (x <= (-8d+32)) then
tmp = t_0
else if (x <= 2.8d-7) then
tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / t_1
else if (x <= 1.6d+45) then
tmp = (x + (-2.0d0)) / (t_1 / (x * (y + (x * (137.519416416d0 + (x * (78.6994924154d0 + (x * 4.16438922228d0))))))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (x + -2.0) / 0.24013125253755718;
double t_1 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double tmp;
if (x <= -8e+32) {
tmp = t_0;
} else if (x <= 2.8e-7) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / t_1;
} else if (x <= 1.6e+45) {
tmp = (x + -2.0) / (t_1 / (x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = (x + -2.0) / 0.24013125253755718 t_1 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606 tmp = 0 if x <= -8e+32: tmp = t_0 elif x <= 2.8e-7: tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / t_1 elif x <= 1.6e+45: tmp = (x + -2.0) / (t_1 / (x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228)))))))) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(x + -2.0) / 0.24013125253755718) t_1 = Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) tmp = 0.0 if (x <= -8e+32) tmp = t_0; elseif (x <= 2.8e-7) tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * 137.519416416))))) / t_1); elseif (x <= 1.6e+45) tmp = Float64(Float64(x + -2.0) / Float64(t_1 / Float64(x * Float64(y + Float64(x * Float64(137.519416416 + Float64(x * Float64(78.6994924154 + Float64(x * 4.16438922228))))))))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x + -2.0) / 0.24013125253755718; t_1 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606; tmp = 0.0; if (x <= -8e+32) tmp = t_0; elseif (x <= 2.8e-7) tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / t_1; elseif (x <= 1.6e+45) tmp = (x + -2.0) / (t_1 / (x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228)))))))); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]}, If[LessEqual[x, -8e+32], t$95$0, If[LessEqual[x, 2.8e-7], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * 137.519416416), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[x, 1.6e+45], N[(N[(x + -2.0), $MachinePrecision] / N[(t$95$1 / N[(x * N[(y + N[(x * N[(137.519416416 + N[(x * N[(78.6994924154 + N[(x * 4.16438922228), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x + -2}{0.24013125253755718}\\
t_1 := x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606\\
\mathbf{if}\;x \leq -8 \cdot 10^{+32}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{-7}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{t_1}\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{+45}:\\
\;\;\;\;\frac{x + -2}{\frac{t_1}{x \cdot \left(y + x \cdot \left(137.519416416 + x \cdot \left(78.6994924154 + x \cdot 4.16438922228\right)\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x < -8.00000000000000043e32 or 1.6000000000000001e45 < x Initial program 4.8%
associate-/l*10.7%
sub-neg10.7%
metadata-eval10.7%
fma-def10.7%
fma-def10.7%
fma-def10.7%
fma-def10.7%
fma-def10.7%
fma-def10.7%
fma-def10.7%
Simplified10.7%
Taylor expanded in x around inf 96.1%
if -8.00000000000000043e32 < x < 2.80000000000000019e-7Initial program 98.8%
Taylor expanded in x around 0 97.7%
*-commutative97.7%
Simplified97.7%
if 2.80000000000000019e-7 < x < 1.6000000000000001e45Initial program 92.1%
associate-/l*99.3%
sub-neg99.3%
metadata-eval99.3%
fma-def99.3%
fma-def99.3%
fma-def99.3%
fma-def99.3%
fma-def99.3%
fma-def99.3%
fma-def99.3%
Simplified99.3%
Taylor expanded in z around 0 85.3%
Final simplification96.3%
(FPCore (x y z)
:precision binary64
(if (<= x -1.1e+33)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 4.8e+15)
(/
(* (- x 2.0) (+ z (* x (+ y (* x 137.519416416)))))
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.1e+33) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 4.8e+15) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
} else {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1.1d+33)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 4.8d+15) then
tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0)
else
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1.1e+33) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 4.8e+15) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
} else {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.1e+33: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 4.8e+15: tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) else: tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.1e+33) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 4.8e+15) 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)); else tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.1e+33) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 4.8e+15) tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606); else tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.1e+33], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 4.8e+15], 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], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.1 \cdot 10^{+33}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{+15}:\\
\;\;\;\;\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}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\end{array}
\end{array}
if x < -1.09999999999999997e33Initial program 3.4%
associate-/l*9.5%
sub-neg9.5%
metadata-eval9.5%
fma-def9.5%
fma-def9.5%
fma-def9.5%
fma-def9.5%
fma-def9.5%
fma-def9.5%
fma-def9.5%
Simplified9.5%
Taylor expanded in x around inf 96.4%
if -1.09999999999999997e33 < x < 4.8e15Initial program 98.8%
Taylor expanded in x around 0 96.1%
*-commutative96.1%
Simplified96.1%
if 4.8e15 < x Initial program 18.0%
associate-/l*24.8%
sub-neg24.8%
metadata-eval24.8%
fma-def24.8%
fma-def24.8%
fma-def24.8%
fma-def24.8%
fma-def24.8%
fma-def24.8%
fma-def24.8%
Simplified24.8%
Taylor expanded in x around inf 89.3%
associate-*r/89.3%
metadata-eval89.3%
Simplified89.3%
Final simplification94.7%
(FPCore (x y z)
:precision binary64
(if (<= x -36.0)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 100000000000.0)
(/
(* (- x 2.0) (+ z (* x (+ y (* x 137.519416416)))))
(+ 47.066876606 (* x 313.399215894)))
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -36.0) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 100000000000.0) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894));
} else {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-36.0d0)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 100000000000.0d0) then
tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / (47.066876606d0 + (x * 313.399215894d0))
else
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -36.0) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 100000000000.0) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894));
} else {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -36.0: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 100000000000.0: tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894)) else: tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -36.0) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 100000000000.0) tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * 137.519416416))))) / Float64(47.066876606 + Float64(x * 313.399215894))); else tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -36.0) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 100000000000.0) tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894)); else tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -36.0], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 100000000000.0], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * 137.519416416), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(47.066876606 + N[(x * 313.399215894), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -36:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 100000000000:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{47.066876606 + x \cdot 313.399215894}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\end{array}
\end{array}
if x < -36Initial program 12.9%
associate-/l*19.6%
sub-neg19.6%
metadata-eval19.6%
fma-def19.6%
fma-def19.6%
fma-def19.6%
fma-def19.6%
fma-def19.6%
fma-def19.6%
fma-def19.6%
Simplified19.6%
Taylor expanded in x around inf 87.3%
if -36 < x < 1e11Initial program 99.6%
Taylor expanded in x around 0 98.2%
*-commutative98.2%
Simplified98.2%
Taylor expanded in x around 0 96.8%
*-commutative96.8%
Simplified96.8%
if 1e11 < x Initial program 19.4%
associate-/l*26.1%
sub-neg26.1%
metadata-eval26.1%
fma-def26.1%
fma-def26.1%
fma-def26.1%
fma-def26.1%
fma-def26.1%
fma-def26.1%
fma-def26.1%
Simplified26.1%
Taylor expanded in x around inf 88.0%
associate-*r/88.0%
metadata-eval88.0%
Simplified88.0%
Final simplification92.2%
(FPCore (x y z)
:precision binary64
(if (<= x -1.62e+19)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 6.5e-13)
(+
(* z -0.0424927283095952)
(*
x
(- (* 0.0212463641547976 (+ z (* y -2.0))) (* z -0.28294182010212804))))
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.62e+19) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 6.5e-13) {
tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804)));
} else {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1.62d+19)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 6.5d-13) then
tmp = (z * (-0.0424927283095952d0)) + (x * ((0.0212463641547976d0 * (z + (y * (-2.0d0)))) - (z * (-0.28294182010212804d0))))
else
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1.62e+19) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 6.5e-13) {
tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804)));
} else {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.62e+19: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 6.5e-13: tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804))) else: tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.62e+19) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 6.5e-13) 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) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.62e+19) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 6.5e-13) tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804))); else tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.62e+19], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 6.5e-13], 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] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.62 \cdot 10^{+19}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{-13}:\\
\;\;\;\;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 + \frac{5.86923874282773}{x}}\\
\end{array}
\end{array}
if x < -1.62e19Initial program 7.8%
associate-/l*14.8%
sub-neg14.8%
metadata-eval14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
Simplified14.8%
Taylor expanded in x around inf 92.4%
if -1.62e19 < x < 6.49999999999999957e-13Initial program 99.6%
Simplified99.4%
Taylor expanded in x around 0 92.4%
if 6.49999999999999957e-13 < x Initial program 27.0%
associate-/l*33.1%
sub-neg33.1%
metadata-eval33.1%
fma-def33.1%
fma-def33.1%
fma-def33.1%
fma-def33.1%
fma-def33.1%
fma-def33.1%
fma-def33.1%
Simplified33.1%
Taylor expanded in x around inf 80.4%
associate-*r/80.4%
metadata-eval80.4%
Simplified80.4%
Final simplification89.5%
(FPCore (x y z)
:precision binary64
(if (<= x -1.62e+19)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 3.2e-34)
(/
(+ x -2.0)
(/ (+ 47.066876606 (* x (+ 313.399215894 (* x 263.505074721)))) z))
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.62e+19) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 3.2e-34) {
tmp = (x + -2.0) / ((47.066876606 + (x * (313.399215894 + (x * 263.505074721)))) / z);
} else {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1.62d+19)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 3.2d-34) then
tmp = (x + (-2.0d0)) / ((47.066876606d0 + (x * (313.399215894d0 + (x * 263.505074721d0)))) / z)
else
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1.62e+19) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 3.2e-34) {
tmp = (x + -2.0) / ((47.066876606 + (x * (313.399215894 + (x * 263.505074721)))) / z);
} else {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.62e+19: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 3.2e-34: tmp = (x + -2.0) / ((47.066876606 + (x * (313.399215894 + (x * 263.505074721)))) / z) else: tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.62e+19) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 3.2e-34) tmp = Float64(Float64(x + -2.0) / Float64(Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * 263.505074721)))) / z)); else tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.62e+19) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 3.2e-34) tmp = (x + -2.0) / ((47.066876606 + (x * (313.399215894 + (x * 263.505074721)))) / z); else tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.62e+19], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 3.2e-34], N[(N[(x + -2.0), $MachinePrecision] / N[(N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * 263.505074721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.62 \cdot 10^{+19}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{-34}:\\
\;\;\;\;\frac{x + -2}{\frac{47.066876606 + x \cdot \left(313.399215894 + x \cdot 263.505074721\right)}{z}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\end{array}
\end{array}
if x < -1.62e19Initial program 7.8%
associate-/l*14.8%
sub-neg14.8%
metadata-eval14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
Simplified14.8%
Taylor expanded in x around inf 92.4%
if -1.62e19 < x < 3.20000000000000003e-34Initial program 99.6%
associate-/l*99.4%
sub-neg99.4%
metadata-eval99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
Simplified99.5%
Taylor expanded in z around inf 67.9%
Taylor expanded in x around 0 66.0%
*-commutative66.0%
Simplified66.0%
if 3.20000000000000003e-34 < x Initial program 29.2%
associate-/l*35.1%
sub-neg35.1%
metadata-eval35.1%
fma-def35.1%
fma-def35.1%
fma-def35.1%
fma-def35.2%
fma-def35.2%
fma-def35.2%
fma-def35.2%
Simplified35.2%
Taylor expanded in x around inf 78.1%
associate-*r/78.1%
metadata-eval78.1%
Simplified78.1%
Final simplification76.0%
(FPCore (x y z)
:precision binary64
(if (<= x -1.62e+19)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 3.2e-34)
(+
(* z -0.0424927283095952)
(* x (- (* z 0.0212463641547976) (* z -0.28294182010212804))))
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.62e+19) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 3.2e-34) {
tmp = (z * -0.0424927283095952) + (x * ((z * 0.0212463641547976) - (z * -0.28294182010212804)));
} else {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1.62d+19)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 3.2d-34) then
tmp = (z * (-0.0424927283095952d0)) + (x * ((z * 0.0212463641547976d0) - (z * (-0.28294182010212804d0))))
else
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1.62e+19) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 3.2e-34) {
tmp = (z * -0.0424927283095952) + (x * ((z * 0.0212463641547976) - (z * -0.28294182010212804)));
} else {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.62e+19: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 3.2e-34: tmp = (z * -0.0424927283095952) + (x * ((z * 0.0212463641547976) - (z * -0.28294182010212804))) else: tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.62e+19) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 3.2e-34) tmp = Float64(Float64(z * -0.0424927283095952) + Float64(x * Float64(Float64(z * 0.0212463641547976) - Float64(z * -0.28294182010212804)))); else tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.62e+19) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 3.2e-34) tmp = (z * -0.0424927283095952) + (x * ((z * 0.0212463641547976) - (z * -0.28294182010212804))); else tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.62e+19], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 3.2e-34], N[(N[(z * -0.0424927283095952), $MachinePrecision] + N[(x * N[(N[(z * 0.0212463641547976), $MachinePrecision] - N[(z * -0.28294182010212804), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.62 \cdot 10^{+19}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{-34}:\\
\;\;\;\;z \cdot -0.0424927283095952 + x \cdot \left(z \cdot 0.0212463641547976 - z \cdot -0.28294182010212804\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\end{array}
\end{array}
if x < -1.62e19Initial program 7.8%
associate-/l*14.8%
sub-neg14.8%
metadata-eval14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
Simplified14.8%
Taylor expanded in x around inf 92.4%
if -1.62e19 < x < 3.20000000000000003e-34Initial program 99.6%
associate-/l*99.4%
sub-neg99.4%
metadata-eval99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
Simplified99.5%
Taylor expanded in z around inf 67.9%
Taylor expanded in x around 0 66.0%
if 3.20000000000000003e-34 < x Initial program 29.2%
associate-/l*35.1%
sub-neg35.1%
metadata-eval35.1%
fma-def35.1%
fma-def35.1%
fma-def35.1%
fma-def35.2%
fma-def35.2%
fma-def35.2%
fma-def35.2%
Simplified35.2%
Taylor expanded in x around inf 78.1%
associate-*r/78.1%
metadata-eval78.1%
Simplified78.1%
Final simplification76.0%
(FPCore (x y z)
:precision binary64
(if (<= x -420000.0)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 3.2e-34)
(/ (+ x -2.0) (/ (+ 47.066876606 (* x 313.399215894)) z))
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -420000.0) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 3.2e-34) {
tmp = (x + -2.0) / ((47.066876606 + (x * 313.399215894)) / z);
} else {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-420000.0d0)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 3.2d-34) then
tmp = (x + (-2.0d0)) / ((47.066876606d0 + (x * 313.399215894d0)) / z)
else
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -420000.0) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 3.2e-34) {
tmp = (x + -2.0) / ((47.066876606 + (x * 313.399215894)) / z);
} else {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -420000.0: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 3.2e-34: tmp = (x + -2.0) / ((47.066876606 + (x * 313.399215894)) / z) else: tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -420000.0) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 3.2e-34) tmp = Float64(Float64(x + -2.0) / Float64(Float64(47.066876606 + Float64(x * 313.399215894)) / z)); else tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -420000.0) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 3.2e-34) tmp = (x + -2.0) / ((47.066876606 + (x * 313.399215894)) / z); else tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -420000.0], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 3.2e-34], N[(N[(x + -2.0), $MachinePrecision] / N[(N[(47.066876606 + N[(x * 313.399215894), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -420000:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{-34}:\\
\;\;\;\;\frac{x + -2}{\frac{47.066876606 + x \cdot 313.399215894}{z}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\end{array}
\end{array}
if x < -4.2e5Initial program 10.4%
associate-/l*17.3%
sub-neg17.3%
metadata-eval17.3%
fma-def17.3%
fma-def17.3%
fma-def17.3%
fma-def17.3%
fma-def17.3%
fma-def17.3%
fma-def17.3%
Simplified17.3%
Taylor expanded in x around inf 89.8%
if -4.2e5 < x < 3.20000000000000003e-34Initial program 99.6%
associate-/l*99.5%
sub-neg99.5%
metadata-eval99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
Simplified99.5%
Taylor expanded in z around inf 67.7%
Taylor expanded in x around 0 66.9%
*-commutative66.9%
Simplified66.9%
if 3.20000000000000003e-34 < x Initial program 29.2%
associate-/l*35.1%
sub-neg35.1%
metadata-eval35.1%
fma-def35.1%
fma-def35.1%
fma-def35.1%
fma-def35.2%
fma-def35.2%
fma-def35.2%
fma-def35.2%
Simplified35.2%
Taylor expanded in x around inf 78.1%
associate-*r/78.1%
metadata-eval78.1%
Simplified78.1%
Final simplification75.9%
(FPCore (x y z)
:precision binary64
(if (<= x -1.62e+19)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 3.2e-34)
(/ (+ x -2.0) (/ 47.066876606 z))
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.62e+19) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 3.2e-34) {
tmp = (x + -2.0) / (47.066876606 / z);
} else {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1.62d+19)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 3.2d-34) then
tmp = (x + (-2.0d0)) / (47.066876606d0 / z)
else
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1.62e+19) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 3.2e-34) {
tmp = (x + -2.0) / (47.066876606 / z);
} else {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.62e+19: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 3.2e-34: tmp = (x + -2.0) / (47.066876606 / z) else: tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.62e+19) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 3.2e-34) tmp = Float64(Float64(x + -2.0) / Float64(47.066876606 / z)); else tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.62e+19) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 3.2e-34) tmp = (x + -2.0) / (47.066876606 / z); else tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.62e+19], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 3.2e-34], N[(N[(x + -2.0), $MachinePrecision] / N[(47.066876606 / z), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.62 \cdot 10^{+19}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{-34}:\\
\;\;\;\;\frac{x + -2}{\frac{47.066876606}{z}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\end{array}
\end{array}
if x < -1.62e19Initial program 7.8%
associate-/l*14.8%
sub-neg14.8%
metadata-eval14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
Simplified14.8%
Taylor expanded in x around inf 92.4%
if -1.62e19 < x < 3.20000000000000003e-34Initial program 99.6%
associate-/l*99.4%
sub-neg99.4%
metadata-eval99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
Simplified99.5%
Taylor expanded in x around 0 65.7%
if 3.20000000000000003e-34 < x Initial program 29.2%
associate-/l*35.1%
sub-neg35.1%
metadata-eval35.1%
fma-def35.1%
fma-def35.1%
fma-def35.1%
fma-def35.2%
fma-def35.2%
fma-def35.2%
fma-def35.2%
Simplified35.2%
Taylor expanded in x around inf 78.1%
associate-*r/78.1%
metadata-eval78.1%
Simplified78.1%
Final simplification75.8%
(FPCore (x y z)
:precision binary64
(if (<= x -1.62e+19)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 3.2e-34)
(/ (+ x -2.0) (/ 1.0 (/ z 47.066876606)))
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.62e+19) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 3.2e-34) {
tmp = (x + -2.0) / (1.0 / (z / 47.066876606));
} else {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1.62d+19)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 3.2d-34) then
tmp = (x + (-2.0d0)) / (1.0d0 / (z / 47.066876606d0))
else
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1.62e+19) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 3.2e-34) {
tmp = (x + -2.0) / (1.0 / (z / 47.066876606));
} else {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.62e+19: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 3.2e-34: tmp = (x + -2.0) / (1.0 / (z / 47.066876606)) else: tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.62e+19) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 3.2e-34) tmp = Float64(Float64(x + -2.0) / Float64(1.0 / Float64(z / 47.066876606))); else tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.62e+19) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 3.2e-34) tmp = (x + -2.0) / (1.0 / (z / 47.066876606)); else tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.62e+19], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 3.2e-34], N[(N[(x + -2.0), $MachinePrecision] / N[(1.0 / N[(z / 47.066876606), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.62 \cdot 10^{+19}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{-34}:\\
\;\;\;\;\frac{x + -2}{\frac{1}{\frac{z}{47.066876606}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\end{array}
\end{array}
if x < -1.62e19Initial program 7.8%
associate-/l*14.8%
sub-neg14.8%
metadata-eval14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
Simplified14.8%
Taylor expanded in x around inf 92.4%
if -1.62e19 < x < 3.20000000000000003e-34Initial program 99.6%
associate-/l*99.4%
sub-neg99.4%
metadata-eval99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
Simplified99.5%
Taylor expanded in x around 0 65.7%
clear-num65.7%
inv-pow65.7%
Applied egg-rr65.7%
unpow-165.7%
Simplified65.7%
if 3.20000000000000003e-34 < x Initial program 29.2%
associate-/l*35.1%
sub-neg35.1%
metadata-eval35.1%
fma-def35.1%
fma-def35.1%
fma-def35.1%
fma-def35.2%
fma-def35.2%
fma-def35.2%
fma-def35.2%
Simplified35.2%
Taylor expanded in x around inf 78.1%
associate-*r/78.1%
metadata-eval78.1%
Simplified78.1%
Final simplification75.8%
(FPCore (x y z) :precision binary64 (if (or (<= x -1.62e+19) (not (<= x 3.6e-19))) (/ (+ x -2.0) 0.24013125253755718) (/ (+ x -2.0) (/ 47.066876606 z))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1.62e+19) || !(x <= 3.6e-19)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = (x + -2.0) / (47.066876606 / z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-1.62d+19)) .or. (.not. (x <= 3.6d-19))) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else
tmp = (x + (-2.0d0)) / (47.066876606d0 / z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -1.62e+19) || !(x <= 3.6e-19)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = (x + -2.0) / (47.066876606 / z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1.62e+19) or not (x <= 3.6e-19): tmp = (x + -2.0) / 0.24013125253755718 else: tmp = (x + -2.0) / (47.066876606 / z) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -1.62e+19) || !(x <= 3.6e-19)) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); else tmp = Float64(Float64(x + -2.0) / Float64(47.066876606 / z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -1.62e+19) || ~((x <= 3.6e-19))) tmp = (x + -2.0) / 0.24013125253755718; else tmp = (x + -2.0) / (47.066876606 / z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -1.62e+19], N[Not[LessEqual[x, 3.6e-19]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / N[(47.066876606 / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.62 \cdot 10^{+19} \lor \neg \left(x \leq 3.6 \cdot 10^{-19}\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{\frac{47.066876606}{z}}\\
\end{array}
\end{array}
if x < -1.62e19 or 3.6000000000000001e-19 < x Initial program 17.7%
associate-/l*24.3%
sub-neg24.3%
metadata-eval24.3%
fma-def24.3%
fma-def24.3%
fma-def24.3%
fma-def24.3%
fma-def24.3%
fma-def24.3%
fma-def24.3%
Simplified24.3%
Taylor expanded in x around inf 85.8%
if -1.62e19 < x < 3.6000000000000001e-19Initial program 99.6%
associate-/l*99.4%
sub-neg99.4%
metadata-eval99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.5%
fma-def99.5%
fma-def99.5%
fma-def99.5%
Simplified99.5%
Taylor expanded in x around 0 65.2%
Final simplification75.8%
(FPCore (x y z) :precision binary64 (if (or (<= x -1.62e+19) (not (<= x 3.6e-19))) (/ (+ x -2.0) 0.24013125253755718) (* z -0.0424927283095952)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1.62e+19) || !(x <= 3.6e-19)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-1.62d+19)) .or. (.not. (x <= 3.6d-19))) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else
tmp = z * (-0.0424927283095952d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -1.62e+19) || !(x <= 3.6e-19)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1.62e+19) or not (x <= 3.6e-19): tmp = (x + -2.0) / 0.24013125253755718 else: tmp = z * -0.0424927283095952 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -1.62e+19) || !(x <= 3.6e-19)) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); else tmp = Float64(z * -0.0424927283095952); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -1.62e+19) || ~((x <= 3.6e-19))) tmp = (x + -2.0) / 0.24013125253755718; else tmp = z * -0.0424927283095952; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -1.62e+19], N[Not[LessEqual[x, 3.6e-19]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], N[(z * -0.0424927283095952), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.62 \cdot 10^{+19} \lor \neg \left(x \leq 3.6 \cdot 10^{-19}\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{else}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\end{array}
\end{array}
if x < -1.62e19 or 3.6000000000000001e-19 < x Initial program 17.7%
associate-/l*24.3%
sub-neg24.3%
metadata-eval24.3%
fma-def24.3%
fma-def24.3%
fma-def24.3%
fma-def24.3%
fma-def24.3%
fma-def24.3%
fma-def24.3%
Simplified24.3%
Taylor expanded in x around inf 85.8%
if -1.62e19 < x < 3.6000000000000001e-19Initial program 99.6%
Simplified99.4%
Taylor expanded in x around 0 65.2%
Final simplification75.8%
(FPCore (x y z)
:precision binary64
(if (<= x -1.62e+19)
(* x 4.16438922228)
(if (<= x 3.6e-19)
(* z -0.0424927283095952)
(- (* x 4.16438922228) 110.1139242984811))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.62e+19) {
tmp = x * 4.16438922228;
} else if (x <= 3.6e-19) {
tmp = z * -0.0424927283095952;
} else {
tmp = (x * 4.16438922228) - 110.1139242984811;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1.62d+19)) then
tmp = x * 4.16438922228d0
else if (x <= 3.6d-19) then
tmp = z * (-0.0424927283095952d0)
else
tmp = (x * 4.16438922228d0) - 110.1139242984811d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1.62e+19) {
tmp = x * 4.16438922228;
} else if (x <= 3.6e-19) {
tmp = z * -0.0424927283095952;
} else {
tmp = (x * 4.16438922228) - 110.1139242984811;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.62e+19: tmp = x * 4.16438922228 elif x <= 3.6e-19: tmp = z * -0.0424927283095952 else: tmp = (x * 4.16438922228) - 110.1139242984811 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.62e+19) tmp = Float64(x * 4.16438922228); elseif (x <= 3.6e-19) tmp = Float64(z * -0.0424927283095952); else tmp = Float64(Float64(x * 4.16438922228) - 110.1139242984811); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.62e+19) tmp = x * 4.16438922228; elseif (x <= 3.6e-19) tmp = z * -0.0424927283095952; else tmp = (x * 4.16438922228) - 110.1139242984811; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.62e+19], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 3.6e-19], N[(z * -0.0424927283095952), $MachinePrecision], N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.62 \cdot 10^{+19}:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 3.6 \cdot 10^{-19}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\
\end{array}
\end{array}
if x < -1.62e19Initial program 7.8%
Simplified14.8%
Taylor expanded in x around inf 91.8%
*-commutative91.8%
Simplified91.8%
if -1.62e19 < x < 3.6000000000000001e-19Initial program 99.6%
Simplified99.4%
Taylor expanded in x around 0 65.2%
if 3.6000000000000001e-19 < x Initial program 28.1%
Simplified34.2%
Taylor expanded in x around inf 78.7%
Final simplification75.6%
(FPCore (x y z) :precision binary64 (if (or (<= x -1.62e+19) (not (<= x 100000000000.0))) (* x 4.16438922228) (* z -0.0424927283095952)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1.62e+19) || !(x <= 100000000000.0)) {
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 <= (-1.62d+19)) .or. (.not. (x <= 100000000000.0d0))) 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 <= -1.62e+19) || !(x <= 100000000000.0)) {
tmp = x * 4.16438922228;
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1.62e+19) or not (x <= 100000000000.0): tmp = x * 4.16438922228 else: tmp = z * -0.0424927283095952 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -1.62e+19) || !(x <= 100000000000.0)) 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 <= -1.62e+19) || ~((x <= 100000000000.0))) tmp = x * 4.16438922228; else tmp = z * -0.0424927283095952; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -1.62e+19], N[Not[LessEqual[x, 100000000000.0]], $MachinePrecision]], N[(x * 4.16438922228), $MachinePrecision], N[(z * -0.0424927283095952), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.62 \cdot 10^{+19} \lor \neg \left(x \leq 100000000000\right):\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{else}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\end{array}
\end{array}
if x < -1.62e19 or 1e11 < x Initial program 13.1%
Simplified20.0%
Taylor expanded in x around inf 89.8%
*-commutative89.8%
Simplified89.8%
if -1.62e19 < x < 1e11Initial program 99.5%
Simplified99.5%
Taylor expanded in x around 0 61.9%
Final simplification75.4%
(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 57.7%
Simplified61.0%
Taylor expanded in x around 0 33.4%
Final simplification33.4%
(FPCore (x y z) :precision binary64 -110.1139242984811)
double code(double x, double y, double z) {
return -110.1139242984811;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = -110.1139242984811d0
end function
public static double code(double x, double y, double z) {
return -110.1139242984811;
}
def code(x, y, z): return -110.1139242984811
function code(x, y, z) return -110.1139242984811 end
function tmp = code(x, y, z) tmp = -110.1139242984811; end
code[x_, y_, z_] := -110.1139242984811
\begin{array}{l}
\\
-110.1139242984811
\end{array}
Initial program 57.7%
Simplified61.0%
Taylor expanded in x around inf 45.0%
Taylor expanded in x around 0 3.0%
Taylor expanded in x around inf 3.4%
Final simplification3.4%
(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 2024020
(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)))