
(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 13 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 4.16438922228) 78.6994924154)) 137.519416416))
(t_1
(/
(* (- x 2.0) (+ (* x (+ y (* x t_0))) z))
(+
(*
x
(+
(* x (+ (* x (+ x 43.3400022514)) 263.505074721))
313.399215894))
47.066876606))))
(if (<= t_1 (- INFINITY))
(+
(/ y (* x (+ x 45.3400022514)))
(+
(/ z (* (pow x 2.0) (+ x 45.3400022514)))
(/ t_0 (+ x 45.3400022514))))
(if (<= t_1 5e+302)
t_1
(-
(+
(/ (- 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 * 4.16438922228) + 78.6994924154)) + 137.519416416;
double t_1 = ((x - 2.0) * ((x * (y + (x * t_0))) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (y / (x * (x + 45.3400022514))) + ((z / (pow(x, 2.0) * (x + 45.3400022514))) + (t_0 / (x + 45.3400022514)));
} else if (t_1 <= 5e+302) {
tmp = t_1;
} 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 * 4.16438922228) + 78.6994924154)) + 137.519416416;
double t_1 = ((x - 2.0) * ((x * (y + (x * t_0))) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = (y / (x * (x + 45.3400022514))) + ((z / (Math.pow(x, 2.0) * (x + 45.3400022514))) + (t_0 / (x + 45.3400022514)));
} else if (t_1 <= 5e+302) {
tmp = t_1;
} 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 * 4.16438922228) + 78.6994924154)) + 137.519416416 t_1 = ((x - 2.0) * ((x * (y + (x * t_0))) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) tmp = 0 if t_1 <= -math.inf: tmp = (y / (x * (x + 45.3400022514))) + ((z / (math.pow(x, 2.0) * (x + 45.3400022514))) + (t_0 / (x + 45.3400022514))) elif t_1 <= 5e+302: tmp = t_1 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 * 4.16438922228) + 78.6994924154)) + 137.519416416) t_1 = Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(y + Float64(x * t_0))) + 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_1 <= Float64(-Inf)) tmp = Float64(Float64(y / Float64(x * Float64(x + 45.3400022514))) + Float64(Float64(z / Float64((x ^ 2.0) * Float64(x + 45.3400022514))) + Float64(t_0 / Float64(x + 45.3400022514)))); elseif (t_1 <= 5e+302) tmp = t_1; 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 * 4.16438922228) + 78.6994924154)) + 137.519416416; t_1 = ((x - 2.0) * ((x * (y + (x * t_0))) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606); tmp = 0.0; if (t_1 <= -Inf) tmp = (y / (x * (x + 45.3400022514))) + ((z / ((x ^ 2.0) * (x + 45.3400022514))) + (t_0 / (x + 45.3400022514))); elseif (t_1 <= 5e+302) tmp = t_1; 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 * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(y + N[(x * t$95$0), $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$1, (-Infinity)], N[(N[(y / N[(x * N[(x + 45.3400022514), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(z / N[(N[Power[x, 2.0], $MachinePrecision] * N[(x + 45.3400022514), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 / N[(x + 45.3400022514), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+302], t$95$1, 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 4.16438922228 + 78.6994924154\right) + 137.519416416\\
t_1 := \frac{\left(x - 2\right) \cdot \left(x \cdot \left(y + x \cdot t_0\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_1 \leq -\infty:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 45.3400022514\right)} + \left(\frac{z}{{x}^{2} \cdot \left(x + 45.3400022514\right)} + \frac{t_0}{x + 45.3400022514}\right)\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+302}:\\
\;\;\;\;t_1\\
\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.9%
Simplified85.5%
Taylor expanded in x around inf 85.5%
+-commutative85.5%
cube-mult85.7%
unpow285.7%
distribute-rgt-out85.7%
Simplified85.7%
Taylor expanded in y around 0 99.3%
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)) < 5e302Initial program 99.6%
if 5e302 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) Initial program 0.1%
Taylor expanded in x around -inf 99.0%
Final simplification99.4%
(FPCore (x y z)
:precision binary64
(if (<=
(/
(*
(- x 2.0)
(+
(*
x
(+
y
(*
x
(+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))))
z))
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
5e+302)
(/
(fma
x
(fma x (fma x (fma x 4.16438922228 78.6994924154) 137.519416416) y)
z)
(/
(fma
x
(fma x (fma x (+ x 43.3400022514) 263.505074721) 313.399215894)
47.066876606)
(+ x -2.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 tmp;
if ((((x - 2.0) * ((x * (y + (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)))) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= 5e+302) {
tmp = fma(x, fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), z) / (fma(x, fma(x, fma(x, (x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606) / (x + -2.0));
} 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(y + Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)))) + z)) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= 5e+302) tmp = Float64(fma(x, fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), z) / Float64(fma(x, fma(x, fma(x, Float64(x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606) / Float64(x + -2.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
code[x_, y_, z_] := If[LessEqual[N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(y + N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $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+302], N[(N[(x * N[(x * N[(x * N[(x * 4.16438922228 + 78.6994924154), $MachinePrecision] + 137.519416416), $MachinePrecision] + y), $MachinePrecision] + z), $MachinePrecision] / N[(N[(x * N[(x * N[(x * N[(x + 43.3400022514), $MachinePrecision] + 263.505074721), $MachinePrecision] + 313.399215894), $MachinePrecision] + 47.066876606), $MachinePrecision] / N[(x + -2.0), $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(y + x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\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^{+302}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right)}{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}{x + -2}}\\
\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)) < 5e302Initial program 95.3%
Simplified99.0%
if 5e302 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) Initial program 0.1%
Taylor expanded in x around -inf 99.0%
Final simplification99.0%
(FPCore (x y z)
:precision binary64
(if (or (<= x -1.05e+25) (not (<= x 7.5e+54)))
(-
(+
(/ (- y 130977.50649958357) (pow x 2.0))
(+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x))))
110.1139242984811)
(/
(*
(- x 2.0)
(+
(*
x
(+
y
(* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))))
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.05e+25) || !(x <= 7.5e+54)) {
tmp = (((y - 130977.50649958357) / pow(x, 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 110.1139242984811;
} else {
tmp = ((x - 2.0) * ((x * (y + (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)))) + 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.05d+25)) .or. (.not. (x <= 7.5d+54))) then
tmp = (((y - 130977.50649958357d0) / (x ** 2.0d0)) + ((x * 4.16438922228d0) + (3655.1204654076414d0 * (1.0d0 / x)))) - 110.1139242984811d0
else
tmp = ((x - 2.0d0) * ((x * (y + (x * ((x * ((x * 4.16438922228d0) + 78.6994924154d0)) + 137.519416416d0)))) + 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.05e+25) || !(x <= 7.5e+54)) {
tmp = (((y - 130977.50649958357) / Math.pow(x, 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 110.1139242984811;
} else {
tmp = ((x - 2.0) * ((x * (y + (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)))) + 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.05e+25) or not (x <= 7.5e+54): tmp = (((y - 130977.50649958357) / math.pow(x, 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 110.1139242984811 else: tmp = ((x - 2.0) * ((x * (y + (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)))) + 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.05e+25) || !(x <= 7.5e+54)) 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); else tmp = Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(y + Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)))) + 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.05e+25) || ~((x <= 7.5e+54))) tmp = (((y - 130977.50649958357) / (x ^ 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 110.1139242984811; else tmp = ((x - 2.0) * ((x * (y + (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)))) + 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.05e+25], N[Not[LessEqual[x, 7.5e+54]], $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], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(y + N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.05 \cdot 10^{+25} \lor \neg \left(x \leq 7.5 \cdot 10^{+54}\right):\\
\;\;\;\;\left(\frac{y - 130977.50649958357}{{x}^{2}} + \left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(y + x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\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}\\
\end{array}
\end{array}
if x < -1.05e25 or 7.50000000000000042e54 < x Initial program 2.1%
Taylor expanded in x around -inf 98.1%
if -1.05e25 < x < 7.50000000000000042e54Initial program 99.6%
Final simplification99.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
y
(* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))))
(t_1
(/
(* (- x 2.0) (+ (* x t_0) z))
(+
(*
x
(+
(* x (+ (* x (+ x 43.3400022514)) 263.505074721))
313.399215894))
47.066876606))))
(if (<= t_1 (- INFINITY))
(/ t_0 (* x (+ x 45.3400022514)))
(if (<= t_1 5e+302) t_1 (* x 4.16438922228)))))
double code(double x, double y, double z) {
double t_0 = y + (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416));
double t_1 = ((x - 2.0) * ((x * t_0) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t_0 / (x * (x + 45.3400022514));
} else if (t_1 <= 5e+302) {
tmp = t_1;
} else {
tmp = x * 4.16438922228;
}
return tmp;
}
public static double code(double x, double y, double z) {
double t_0 = y + (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416));
double t_1 = ((x - 2.0) * ((x * t_0) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = t_0 / (x * (x + 45.3400022514));
} else if (t_1 <= 5e+302) {
tmp = t_1;
} else {
tmp = x * 4.16438922228;
}
return tmp;
}
def code(x, y, z): t_0 = y + (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) t_1 = ((x - 2.0) * ((x * t_0) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) tmp = 0 if t_1 <= -math.inf: tmp = t_0 / (x * (x + 45.3400022514)) elif t_1 <= 5e+302: tmp = t_1 else: tmp = x * 4.16438922228 return tmp
function code(x, y, z) t_0 = Float64(y + Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416))) t_1 = Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * t_0) + 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_1 <= Float64(-Inf)) tmp = Float64(t_0 / Float64(x * Float64(x + 45.3400022514))); elseif (t_1 <= 5e+302) tmp = t_1; else tmp = Float64(x * 4.16438922228); end return tmp end
function tmp_2 = code(x, y, z) t_0 = y + (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)); t_1 = ((x - 2.0) * ((x * t_0) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606); tmp = 0.0; if (t_1 <= -Inf) tmp = t_0 / (x * (x + 45.3400022514)); elseif (t_1 <= 5e+302) tmp = t_1; else tmp = x * 4.16438922228; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(y + N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * t$95$0), $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$1, (-Infinity)], N[(t$95$0 / N[(x * N[(x + 45.3400022514), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+302], t$95$1, N[(x * 4.16438922228), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y + x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right)\\
t_1 := \frac{\left(x - 2\right) \cdot \left(x \cdot t_0 + 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_1 \leq -\infty:\\
\;\;\;\;\frac{t_0}{x \cdot \left(x + 45.3400022514\right)}\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+302}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < -inf.0Initial program 3.9%
Simplified85.5%
Taylor expanded in x around inf 85.5%
+-commutative85.5%
cube-mult85.7%
unpow285.7%
distribute-rgt-out85.7%
Simplified85.7%
Taylor expanded in z around 0 85.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)) < 5e302Initial program 99.6%
if 5e302 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) Initial program 0.1%
Taylor expanded in x around inf 97.1%
*-commutative97.1%
Simplified97.1%
Final simplification98.2%
(FPCore (x y z)
:precision binary64
(if (<= x -41000000.0)
(+ (* x 4.16438922228) (- (/ 3655.1204654076414 x) 110.1139242984811))
(if (<= x 6e+47)
(/
(* (- x 2.0) (+ z (* x (+ y (* x 137.519416416)))))
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
(* x 4.16438922228))))
double code(double x, double y, double z) {
double tmp;
if (x <= -41000000.0) {
tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - 110.1139242984811);
} else if (x <= 6e+47) {
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 * 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 <= (-41000000.0d0)) then
tmp = (x * 4.16438922228d0) + ((3655.1204654076414d0 / x) - 110.1139242984811d0)
else if (x <= 6d+47) 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 * 4.16438922228d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -41000000.0) {
tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - 110.1139242984811);
} else if (x <= 6e+47) {
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 * 4.16438922228;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -41000000.0: tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - 110.1139242984811) elif x <= 6e+47: 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 * 4.16438922228 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -41000000.0) tmp = Float64(Float64(x * 4.16438922228) + Float64(Float64(3655.1204654076414 / x) - 110.1139242984811)); elseif (x <= 6e+47) 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(x * 4.16438922228); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -41000000.0) tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - 110.1139242984811); elseif (x <= 6e+47) 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 * 4.16438922228; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -41000000.0], N[(N[(x * 4.16438922228), $MachinePrecision] + N[(N[(3655.1204654076414 / x), $MachinePrecision] - 110.1139242984811), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6e+47], 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[(x * 4.16438922228), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -41000000:\\
\;\;\;\;x \cdot 4.16438922228 + \left(\frac{3655.1204654076414}{x} - 110.1139242984811\right)\\
\mathbf{elif}\;x \leq 6 \cdot 10^{+47}:\\
\;\;\;\;\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}:\\
\;\;\;\;x \cdot 4.16438922228\\
\end{array}
\end{array}
if x < -4.1e7Initial program 13.8%
Taylor expanded in x around inf 92.7%
associate--l+92.7%
*-commutative92.7%
un-div-inv92.7%
Applied egg-rr92.7%
if -4.1e7 < x < 6.0000000000000003e47Initial program 99.6%
Taylor expanded in x around 0 96.6%
*-commutative96.6%
Simplified96.6%
if 6.0000000000000003e47 < x Initial program 2.3%
Taylor expanded in x around inf 91.7%
*-commutative91.7%
Simplified91.7%
Final simplification94.6%
(FPCore (x y z)
:precision binary64
(if (<= x -430.0)
(+ (* x 4.16438922228) (- (/ 3655.1204654076414 x) 110.1139242984811))
(if (<= x 39.0)
(/
(* (- x 2.0) (+ z (* x (+ y (* x 137.519416416)))))
(+ 47.066876606 (* x (+ 313.399215894 (* x 263.505074721)))))
(if (<= x 1.5e+83)
(/
(+
y
(* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416)))
(* x (+ x 45.3400022514)))
(* x 4.16438922228)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -430.0) {
tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - 110.1139242984811);
} else if (x <= 39.0) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
} else if (x <= 1.5e+83) {
tmp = (y + (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416))) / (x * (x + 45.3400022514));
} 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 <= (-430.0d0)) then
tmp = (x * 4.16438922228d0) + ((3655.1204654076414d0 / x) - 110.1139242984811d0)
else if (x <= 39.0d0) then
tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / (47.066876606d0 + (x * (313.399215894d0 + (x * 263.505074721d0))))
else if (x <= 1.5d+83) then
tmp = (y + (x * ((x * ((x * 4.16438922228d0) + 78.6994924154d0)) + 137.519416416d0))) / (x * (x + 45.3400022514d0))
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 <= -430.0) {
tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - 110.1139242984811);
} else if (x <= 39.0) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
} else if (x <= 1.5e+83) {
tmp = (y + (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416))) / (x * (x + 45.3400022514));
} else {
tmp = x * 4.16438922228;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -430.0: tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - 110.1139242984811) elif x <= 39.0: tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))) elif x <= 1.5e+83: tmp = (y + (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416))) / (x * (x + 45.3400022514)) else: tmp = x * 4.16438922228 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -430.0) tmp = Float64(Float64(x * 4.16438922228) + Float64(Float64(3655.1204654076414 / x) - 110.1139242984811)); elseif (x <= 39.0) tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * 137.519416416))))) / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * 263.505074721))))); elseif (x <= 1.5e+83) tmp = Float64(Float64(y + Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416))) / Float64(x * Float64(x + 45.3400022514))); else tmp = Float64(x * 4.16438922228); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -430.0) tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - 110.1139242984811); elseif (x <= 39.0) tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))); elseif (x <= 1.5e+83) tmp = (y + (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416))) / (x * (x + 45.3400022514)); else tmp = x * 4.16438922228; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -430.0], N[(N[(x * 4.16438922228), $MachinePrecision] + N[(N[(3655.1204654076414 / x), $MachinePrecision] - 110.1139242984811), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 39.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 * N[(313.399215894 + N[(x * 263.505074721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.5e+83], N[(N[(y + N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x * N[(x + 45.3400022514), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * 4.16438922228), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -430:\\
\;\;\;\;x \cdot 4.16438922228 + \left(\frac{3655.1204654076414}{x} - 110.1139242984811\right)\\
\mathbf{elif}\;x \leq 39:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot 263.505074721\right)}\\
\mathbf{elif}\;x \leq 1.5 \cdot 10^{+83}:\\
\;\;\;\;\frac{y + x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right)}{x \cdot \left(x + 45.3400022514\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228\\
\end{array}
\end{array}
if x < -430Initial program 13.8%
Taylor expanded in x around inf 92.7%
associate--l+92.7%
*-commutative92.7%
un-div-inv92.7%
Applied egg-rr92.7%
if -430 < x < 39Initial program 99.6%
Taylor expanded in x around 0 98.9%
*-commutative98.9%
Simplified98.9%
Taylor expanded in x around 0 98.5%
*-commutative99.2%
Simplified98.5%
if 39 < x < 1.5e83Initial program 69.5%
Simplified87.0%
Taylor expanded in x around inf 85.8%
+-commutative85.8%
cube-mult85.9%
unpow285.9%
distribute-rgt-out85.9%
Simplified85.9%
Taylor expanded in z around 0 69.0%
if 1.5e83 < x Initial program 0.0%
Taylor expanded in x around inf 99.0%
*-commutative99.0%
Simplified99.0%
Final simplification95.2%
(FPCore (x y z)
:precision binary64
(if (<= x -36.0)
(+ (* x 4.16438922228) (- (/ 3655.1204654076414 x) 110.1139242984811))
(if (<= x 14.5)
(/
(* (- x 2.0) (+ z (* x (+ y (* x 137.519416416)))))
(+ 47.066876606 (* x 313.399215894)))
(if (<= x 8e+82)
(/
(+
y
(* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416)))
(* x (+ x 45.3400022514)))
(* x 4.16438922228)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -36.0) {
tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - 110.1139242984811);
} else if (x <= 14.5) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894));
} else if (x <= 8e+82) {
tmp = (y + (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416))) / (x * (x + 45.3400022514));
} 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 <= (-36.0d0)) then
tmp = (x * 4.16438922228d0) + ((3655.1204654076414d0 / x) - 110.1139242984811d0)
else if (x <= 14.5d0) then
tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / (47.066876606d0 + (x * 313.399215894d0))
else if (x <= 8d+82) then
tmp = (y + (x * ((x * ((x * 4.16438922228d0) + 78.6994924154d0)) + 137.519416416d0))) / (x * (x + 45.3400022514d0))
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 <= -36.0) {
tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - 110.1139242984811);
} else if (x <= 14.5) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894));
} else if (x <= 8e+82) {
tmp = (y + (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416))) / (x * (x + 45.3400022514));
} else {
tmp = x * 4.16438922228;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -36.0: tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - 110.1139242984811) elif x <= 14.5: tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894)) elif x <= 8e+82: tmp = (y + (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416))) / (x * (x + 45.3400022514)) else: tmp = x * 4.16438922228 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -36.0) tmp = Float64(Float64(x * 4.16438922228) + Float64(Float64(3655.1204654076414 / x) - 110.1139242984811)); elseif (x <= 14.5) tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * 137.519416416))))) / Float64(47.066876606 + Float64(x * 313.399215894))); elseif (x <= 8e+82) tmp = Float64(Float64(y + Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416))) / Float64(x * Float64(x + 45.3400022514))); else tmp = Float64(x * 4.16438922228); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -36.0) tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - 110.1139242984811); elseif (x <= 14.5) tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894)); elseif (x <= 8e+82) tmp = (y + (x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416))) / (x * (x + 45.3400022514)); else tmp = x * 4.16438922228; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -36.0], N[(N[(x * 4.16438922228), $MachinePrecision] + N[(N[(3655.1204654076414 / x), $MachinePrecision] - 110.1139242984811), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 14.5], 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], If[LessEqual[x, 8e+82], N[(N[(y + N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x * N[(x + 45.3400022514), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * 4.16438922228), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -36:\\
\;\;\;\;x \cdot 4.16438922228 + \left(\frac{3655.1204654076414}{x} - 110.1139242984811\right)\\
\mathbf{elif}\;x \leq 14.5:\\
\;\;\;\;\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{elif}\;x \leq 8 \cdot 10^{+82}:\\
\;\;\;\;\frac{y + x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right)}{x \cdot \left(x + 45.3400022514\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228\\
\end{array}
\end{array}
if x < -36Initial program 13.8%
Taylor expanded in x around inf 92.7%
associate--l+92.7%
*-commutative92.7%
un-div-inv92.7%
Applied egg-rr92.7%
if -36 < x < 14.5Initial program 99.6%
Taylor expanded in x around 0 99.2%
*-commutative99.2%
Simplified99.2%
Taylor expanded in x around 0 98.2%
*-commutative98.2%
Simplified98.2%
if 14.5 < x < 7.9999999999999997e82Initial program 69.5%
Simplified87.0%
Taylor expanded in x around inf 85.8%
+-commutative85.8%
cube-mult85.9%
unpow285.9%
distribute-rgt-out85.9%
Simplified85.9%
Taylor expanded in z around 0 69.0%
if 7.9999999999999997e82 < x Initial program 0.0%
Taylor expanded in x around inf 99.0%
*-commutative99.0%
Simplified99.0%
Final simplification95.1%
(FPCore (x y z)
:precision binary64
(if (<= x -36.0)
(+ (* x 4.16438922228) (- (/ 3655.1204654076414 x) 110.1139242984811))
(if (<= x 6600000.0)
(/
(* (- x 2.0) (+ z (* x (+ y (* x 137.519416416)))))
(+ 47.066876606 (* x 313.399215894)))
(- (* x 4.16438922228) 110.1139242984811))))
double code(double x, double y, double z) {
double tmp;
if (x <= -36.0) {
tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - 110.1139242984811);
} else if (x <= 6600000.0) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894));
} 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 <= (-36.0d0)) then
tmp = (x * 4.16438922228d0) + ((3655.1204654076414d0 / x) - 110.1139242984811d0)
else if (x <= 6600000.0d0) then
tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / (47.066876606d0 + (x * 313.399215894d0))
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 <= -36.0) {
tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - 110.1139242984811);
} else if (x <= 6600000.0) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894));
} else {
tmp = (x * 4.16438922228) - 110.1139242984811;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -36.0: tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - 110.1139242984811) elif x <= 6600000.0: tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894)) else: tmp = (x * 4.16438922228) - 110.1139242984811 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -36.0) tmp = Float64(Float64(x * 4.16438922228) + Float64(Float64(3655.1204654076414 / x) - 110.1139242984811)); elseif (x <= 6600000.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 * 4.16438922228) - 110.1139242984811); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -36.0) tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - 110.1139242984811); elseif (x <= 6600000.0) tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894)); else tmp = (x * 4.16438922228) - 110.1139242984811; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -36.0], N[(N[(x * 4.16438922228), $MachinePrecision] + N[(N[(3655.1204654076414 / x), $MachinePrecision] - 110.1139242984811), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6600000.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 * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -36:\\
\;\;\;\;x \cdot 4.16438922228 + \left(\frac{3655.1204654076414}{x} - 110.1139242984811\right)\\
\mathbf{elif}\;x \leq 6600000:\\
\;\;\;\;\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}:\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\
\end{array}
\end{array}
if x < -36Initial program 13.8%
Taylor expanded in x around inf 92.7%
associate--l+92.7%
*-commutative92.7%
un-div-inv92.7%
Applied egg-rr92.7%
if -36 < x < 6.6e6Initial program 99.6%
Taylor expanded in x around 0 99.2%
*-commutative99.2%
Simplified99.2%
Taylor expanded in x around 0 97.6%
*-commutative97.6%
Simplified97.6%
if 6.6e6 < x Initial program 16.9%
Taylor expanded in x around inf 83.7%
Final simplification93.1%
(FPCore (x y z)
:precision binary64
(if (<= x -310.0)
(+ (* x 4.16438922228) (- (/ 3655.1204654076414 x) 110.1139242984811))
(if (<= x 24.0)
(+
(* z -0.0424927283095952)
(* x (+ (* y -0.0424927283095952) (* z 0.3041881842569256))))
(- (* x 4.16438922228) 110.1139242984811))))
double code(double x, double y, double z) {
double tmp;
if (x <= -310.0) {
tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - 110.1139242984811);
} else if (x <= 24.0) {
tmp = (z * -0.0424927283095952) + (x * ((y * -0.0424927283095952) + (z * 0.3041881842569256)));
} 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 <= (-310.0d0)) then
tmp = (x * 4.16438922228d0) + ((3655.1204654076414d0 / x) - 110.1139242984811d0)
else if (x <= 24.0d0) then
tmp = (z * (-0.0424927283095952d0)) + (x * ((y * (-0.0424927283095952d0)) + (z * 0.3041881842569256d0)))
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 <= -310.0) {
tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - 110.1139242984811);
} else if (x <= 24.0) {
tmp = (z * -0.0424927283095952) + (x * ((y * -0.0424927283095952) + (z * 0.3041881842569256)));
} else {
tmp = (x * 4.16438922228) - 110.1139242984811;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -310.0: tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - 110.1139242984811) elif x <= 24.0: tmp = (z * -0.0424927283095952) + (x * ((y * -0.0424927283095952) + (z * 0.3041881842569256))) else: tmp = (x * 4.16438922228) - 110.1139242984811 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -310.0) tmp = Float64(Float64(x * 4.16438922228) + Float64(Float64(3655.1204654076414 / x) - 110.1139242984811)); elseif (x <= 24.0) tmp = Float64(Float64(z * -0.0424927283095952) + Float64(x * Float64(Float64(y * -0.0424927283095952) + Float64(z * 0.3041881842569256)))); 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 <= -310.0) tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - 110.1139242984811); elseif (x <= 24.0) tmp = (z * -0.0424927283095952) + (x * ((y * -0.0424927283095952) + (z * 0.3041881842569256))); else tmp = (x * 4.16438922228) - 110.1139242984811; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -310.0], N[(N[(x * 4.16438922228), $MachinePrecision] + N[(N[(3655.1204654076414 / x), $MachinePrecision] - 110.1139242984811), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 24.0], N[(N[(z * -0.0424927283095952), $MachinePrecision] + N[(x * N[(N[(y * -0.0424927283095952), $MachinePrecision] + N[(z * 0.3041881842569256), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -310:\\
\;\;\;\;x \cdot 4.16438922228 + \left(\frac{3655.1204654076414}{x} - 110.1139242984811\right)\\
\mathbf{elif}\;x \leq 24:\\
\;\;\;\;z \cdot -0.0424927283095952 + x \cdot \left(y \cdot -0.0424927283095952 + z \cdot 0.3041881842569256\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\
\end{array}
\end{array}
if x < -310Initial program 13.8%
Taylor expanded in x around inf 92.7%
associate--l+92.7%
*-commutative92.7%
un-div-inv92.7%
Applied egg-rr92.7%
if -310 < x < 24Initial program 99.6%
Taylor expanded in x around inf 98.4%
+-commutative98.4%
cube-mult98.4%
unpow298.4%
distribute-rgt-out98.4%
Simplified98.4%
Taylor expanded in x around 0 97.8%
Taylor expanded in y around 0 97.4%
mul-1-neg97.4%
distribute-rgt-neg-in97.4%
*-commutative97.4%
distribute-rgt-out--97.4%
metadata-eval97.4%
associate-*l*97.4%
metadata-eval97.4%
Simplified97.4%
Taylor expanded in x around 0 89.2%
+-commutative89.2%
distribute-rgt-in89.2%
*-commutative89.2%
associate-*l*89.2%
metadata-eval89.2%
*-commutative89.2%
associate--l+89.2%
*-commutative89.2%
distribute-rgt-out--89.2%
metadata-eval89.2%
Simplified89.2%
if 24 < x Initial program 18.2%
Taylor expanded in x around inf 82.4%
Final simplification88.5%
(FPCore (x y z)
:precision binary64
(if (<= x -1e-12)
(+ (* x 4.16438922228) (- (/ 3655.1204654076414 x) 110.1139242984811))
(if (<= x 1.9e-25)
(* z -0.0424927283095952)
(- (* x 4.16438922228) 110.1139242984811))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1e-12) {
tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - 110.1139242984811);
} else if (x <= 1.9e-25) {
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 <= (-1d-12)) then
tmp = (x * 4.16438922228d0) + ((3655.1204654076414d0 / x) - 110.1139242984811d0)
else if (x <= 1.9d-25) 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 <= -1e-12) {
tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - 110.1139242984811);
} else if (x <= 1.9e-25) {
tmp = z * -0.0424927283095952;
} else {
tmp = (x * 4.16438922228) - 110.1139242984811;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1e-12: tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - 110.1139242984811) elif x <= 1.9e-25: tmp = z * -0.0424927283095952 else: tmp = (x * 4.16438922228) - 110.1139242984811 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1e-12) tmp = Float64(Float64(x * 4.16438922228) + Float64(Float64(3655.1204654076414 / x) - 110.1139242984811)); elseif (x <= 1.9e-25) 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 <= -1e-12) tmp = (x * 4.16438922228) + ((3655.1204654076414 / x) - 110.1139242984811); elseif (x <= 1.9e-25) tmp = z * -0.0424927283095952; else tmp = (x * 4.16438922228) - 110.1139242984811; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1e-12], N[(N[(x * 4.16438922228), $MachinePrecision] + N[(N[(3655.1204654076414 / x), $MachinePrecision] - 110.1139242984811), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.9e-25], 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 \cdot 10^{-12}:\\
\;\;\;\;x \cdot 4.16438922228 + \left(\frac{3655.1204654076414}{x} - 110.1139242984811\right)\\
\mathbf{elif}\;x \leq 1.9 \cdot 10^{-25}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\
\end{array}
\end{array}
if x < -9.9999999999999998e-13Initial program 15.1%
Taylor expanded in x around inf 91.3%
associate--l+91.4%
*-commutative91.4%
un-div-inv91.4%
Applied egg-rr91.4%
if -9.9999999999999998e-13 < x < 1.8999999999999999e-25Initial program 99.6%
Taylor expanded in x around 0 66.0%
if 1.8999999999999999e-25 < x Initial program 26.6%
Taylor expanded in x around inf 74.5%
Final simplification74.9%
(FPCore (x y z) :precision binary64 (if (or (<= x -1e-12) (not (<= x 1.9e-25))) (- (* x 4.16438922228) 110.1139242984811) (* z -0.0424927283095952)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1e-12) || !(x <= 1.9e-25)) {
tmp = (x * 4.16438922228) - 110.1139242984811;
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-1d-12)) .or. (.not. (x <= 1.9d-25))) then
tmp = (x * 4.16438922228d0) - 110.1139242984811d0
else
tmp = z * (-0.0424927283095952d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -1e-12) || !(x <= 1.9e-25)) {
tmp = (x * 4.16438922228) - 110.1139242984811;
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1e-12) or not (x <= 1.9e-25): tmp = (x * 4.16438922228) - 110.1139242984811 else: tmp = z * -0.0424927283095952 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -1e-12) || !(x <= 1.9e-25)) tmp = Float64(Float64(x * 4.16438922228) - 110.1139242984811); else tmp = Float64(z * -0.0424927283095952); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -1e-12) || ~((x <= 1.9e-25))) tmp = (x * 4.16438922228) - 110.1139242984811; else tmp = z * -0.0424927283095952; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -1e-12], N[Not[LessEqual[x, 1.9e-25]], $MachinePrecision]], N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision], N[(z * -0.0424927283095952), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{-12} \lor \neg \left(x \leq 1.9 \cdot 10^{-25}\right):\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\
\mathbf{else}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\end{array}
\end{array}
if x < -9.9999999999999998e-13 or 1.8999999999999999e-25 < x Initial program 20.9%
Taylor expanded in x around inf 82.8%
if -9.9999999999999998e-13 < x < 1.8999999999999999e-25Initial program 99.6%
Taylor expanded in x around 0 66.0%
Final simplification74.8%
(FPCore (x y z) :precision binary64 (if (or (<= x -1e-12) (not (<= x 6600000.0))) (* x 4.16438922228) (* z -0.0424927283095952)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1e-12) || !(x <= 6600000.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 <= (-1d-12)) .or. (.not. (x <= 6600000.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 <= -1e-12) || !(x <= 6600000.0)) {
tmp = x * 4.16438922228;
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1e-12) or not (x <= 6600000.0): tmp = x * 4.16438922228 else: tmp = z * -0.0424927283095952 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -1e-12) || !(x <= 6600000.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 <= -1e-12) || ~((x <= 6600000.0))) tmp = x * 4.16438922228; else tmp = z * -0.0424927283095952; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -1e-12], N[Not[LessEqual[x, 6600000.0]], $MachinePrecision]], N[(x * 4.16438922228), $MachinePrecision], N[(z * -0.0424927283095952), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{-12} \lor \neg \left(x \leq 6600000\right):\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{else}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\end{array}
\end{array}
if x < -9.9999999999999998e-13 or 6.6e6 < x Initial program 15.9%
Taylor expanded in x around inf 87.0%
*-commutative87.0%
Simplified87.0%
if -9.9999999999999998e-13 < x < 6.6e6Initial program 99.6%
Taylor expanded in x around 0 62.2%
Final simplification74.5%
(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.1%
Taylor expanded in x around 0 32.9%
Final simplification32.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- (+ (/ y (* x x)) (* 4.16438922228 x)) 110.1139242984811)))
(if (< x -3.326128725870005e+62)
t_0
(if (< x 9.429991714554673e+55)
(*
(/ (- x 2.0) 1.0)
(/
(+
(*
(+
(* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x)
y)
x)
z)
(+
(*
(+
(+ (* 263.505074721 x) (+ (* 43.3400022514 (* x x)) (* x (* x x))))
313.399215894)
x)
47.066876606)))
t_0))))
double code(double x, double y, double z) {
double t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811;
double tmp;
if (x < -3.326128725870005e+62) {
tmp = t_0;
} else if (x < 9.429991714554673e+55) {
tmp = ((x - 2.0) / 1.0) * (((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / (((((263.505074721 * x) + ((43.3400022514 * (x * x)) + (x * (x * x)))) + 313.399215894) * x) + 47.066876606));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = ((y / (x * x)) + (4.16438922228d0 * x)) - 110.1139242984811d0
if (x < (-3.326128725870005d+62)) then
tmp = t_0
else if (x < 9.429991714554673d+55) then
tmp = ((x - 2.0d0) / 1.0d0) * (((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z) / (((((263.505074721d0 * x) + ((43.3400022514d0 * (x * x)) + (x * (x * x)))) + 313.399215894d0) * x) + 47.066876606d0))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811;
double tmp;
if (x < -3.326128725870005e+62) {
tmp = t_0;
} else if (x < 9.429991714554673e+55) {
tmp = ((x - 2.0) / 1.0) * (((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / (((((263.505074721 * x) + ((43.3400022514 * (x * x)) + (x * (x * x)))) + 313.399215894) * x) + 47.066876606));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811 tmp = 0 if x < -3.326128725870005e+62: tmp = t_0 elif x < 9.429991714554673e+55: tmp = ((x - 2.0) / 1.0) * (((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / (((((263.505074721 * x) + ((43.3400022514 * (x * x)) + (x * (x * x)))) + 313.399215894) * x) + 47.066876606)) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(y / Float64(x * x)) + Float64(4.16438922228 * x)) - 110.1139242984811) tmp = 0.0 if (x < -3.326128725870005e+62) tmp = t_0; elseif (x < 9.429991714554673e+55) tmp = Float64(Float64(Float64(x - 2.0) / 1.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / Float64(Float64(Float64(Float64(Float64(263.505074721 * x) + Float64(Float64(43.3400022514 * Float64(x * x)) + Float64(x * Float64(x * x)))) + 313.399215894) * x) + 47.066876606))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811; tmp = 0.0; if (x < -3.326128725870005e+62) tmp = t_0; elseif (x < 9.429991714554673e+55) tmp = ((x - 2.0) / 1.0) * (((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / (((((263.505074721 * x) + ((43.3400022514 * (x * x)) + (x * (x * x)))) + 313.399215894) * x) + 47.066876606)); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(4.16438922228 * x), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision]}, If[Less[x, -3.326128725870005e+62], t$95$0, If[Less[x, 9.429991714554673e+55], N[(N[(N[(x - 2.0), $MachinePrecision] / 1.0), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision] * x), $MachinePrecision] + 137.519416416), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision] / N[(N[(N[(N[(N[(263.505074721 * x), $MachinePrecision] + N[(N[(43.3400022514 * N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision] * x), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\frac{y}{x \cdot x} + 4.16438922228 \cdot x\right) - 110.1139242984811\\
\mathbf{if}\;x < -3.326128725870005 \cdot 10^{+62}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x < 9.429991714554673 \cdot 10^{+55}:\\
\;\;\;\;\frac{x - 2}{1} \cdot \frac{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}{\left(\left(263.505074721 \cdot x + \left(43.3400022514 \cdot \left(x \cdot x\right) + x \cdot \left(x \cdot x\right)\right)\right) + 313.399215894\right) \cdot x + 47.066876606}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
herbie shell --seed 2023310
(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)))