
(FPCore (x y z)
:precision binary64
(/
(*
(- x 2.0)
(+
(*
(+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y)
x)
z))
(+
(* (+ (* (+ (* (+ x 43.3400022514) x) 263.505074721) x) 313.399215894) x)
47.066876606)))
double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((x - 2.0d0) * ((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z)) / (((((((x + 43.3400022514d0) * x) + 263.505074721d0) * x) + 313.399215894d0) * x) + 47.066876606d0)
end function
public static double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
def code(x, y, z): return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)
function code(x, y, z) return Float64(Float64(Float64(x - 2.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) end
function tmp = code(x, y, z) tmp = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606); end
code[x_, y_, z_] := N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision] * x), $MachinePrecision] + 137.519416416), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(x + 43.3400022514), $MachinePrecision] * x), $MachinePrecision] + 263.505074721), $MachinePrecision] * x), $MachinePrecision] + 313.399215894), $MachinePrecision] * x), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z)
:precision binary64
(/
(*
(- x 2.0)
(+
(*
(+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y)
x)
z))
(+
(* (+ (* (+ (* (+ x 43.3400022514) x) 263.505074721) x) 313.399215894) x)
47.066876606)))
double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((x - 2.0d0) * ((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z)) / (((((((x + 43.3400022514d0) * x) + 263.505074721d0) * x) + 313.399215894d0) * x) + 47.066876606d0)
end function
public static double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
def code(x, y, z): return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)
function code(x, y, z) return Float64(Float64(Float64(x - 2.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) end
function tmp = code(x, y, z) tmp = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606); end
code[x_, y_, z_] := N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision] * x), $MachinePrecision] + 137.519416416), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(x + 43.3400022514), $MachinePrecision] * x), $MachinePrecision] + 263.505074721), $MachinePrecision] * x), $MachinePrecision] + 313.399215894), $MachinePrecision] * x), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\end{array}
(FPCore (x y z)
:precision binary64
(if (<=
(/
(*
(- x 2.0)
(+
(*
x
(+
(* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
z))
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
2e+273)
(*
(+ x -2.0)
(/
(fma
x
(fma x (fma x (fma x 4.16438922228 78.6994924154) 137.519416416) y)
z)
(fma
x
(fma x (fma x (+ x 43.3400022514) 263.505074721) 313.399215894)
47.066876606)))
(-
(+
(/ (- y 130977.50649958357) (pow x 2.0))
(+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x))))
110.1139242984811)))
double code(double x, double y, double z) {
double tmp;
if ((((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= 2e+273) {
tmp = (x + -2.0) * (fma(x, fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), z) / fma(x, fma(x, fma(x, (x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606));
} else {
tmp = (((y - 130977.50649958357) / pow(x, 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 110.1139242984811;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= 2e+273) tmp = Float64(Float64(x + -2.0) * Float64(fma(x, fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), z) / fma(x, fma(x, fma(x, Float64(x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606))); else tmp = Float64(Float64(Float64(Float64(y - 130977.50649958357) / (x ^ 2.0)) + Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x)))) - 110.1139242984811); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision], 2e+273], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(x * N[(x * N[(x * N[(x * 4.16438922228 + 78.6994924154), $MachinePrecision] + 137.519416416), $MachinePrecision] + y), $MachinePrecision] + z), $MachinePrecision] / N[(x * N[(x * N[(x * N[(x + 43.3400022514), $MachinePrecision] + 263.505074721), $MachinePrecision] + 313.399215894), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(y - 130977.50649958357), $MachinePrecision] / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606} \leq 2 \cdot 10^{+273}:\\
\;\;\;\;\left(x + -2\right) \cdot \frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right)}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\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)) < 1.99999999999999989e273Initial program 96.4%
Simplified99.3%
Applied egg-rr33.2%
expm1-def66.4%
expm1-log1p99.3%
associate-*l/96.4%
associate-*r/99.5%
Simplified99.5%
if 1.99999999999999989e273 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) Initial program 0.2%
Simplified2.0%
Taylor expanded in x around -inf 98.1%
Final simplification98.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
(t_1
(*
x
(+
(* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))))
(if (<= (/ (* (- x 2.0) (+ t_1 z)) t_0) 2e+273)
(* (+ x -2.0) (+ (/ z t_0) (/ t_1 t_0)))
(-
(+
(/ (- y 130977.50649958357) (pow x 2.0))
(+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x))))
110.1139242984811))))
double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double t_1 = x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y);
double tmp;
if ((((x - 2.0) * (t_1 + z)) / t_0) <= 2e+273) {
tmp = (x + -2.0) * ((z / t_0) + (t_1 / t_0));
} else {
tmp = (((y - 130977.50649958357) / pow(x, 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 110.1139242984811;
}
return tmp;
}
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 = x * ((x * ((x * ((x * 4.16438922228d0) + 78.6994924154d0)) + 137.519416416d0)) + y)
if ((((x - 2.0d0) * (t_1 + z)) / t_0) <= 2d+273) then
tmp = (x + (-2.0d0)) * ((z / t_0) + (t_1 / t_0))
else
tmp = (((y - 130977.50649958357d0) / (x ** 2.0d0)) + ((x * 4.16438922228d0) + (3655.1204654076414d0 * (1.0d0 / x)))) - 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 = x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y);
double tmp;
if ((((x - 2.0) * (t_1 + z)) / t_0) <= 2e+273) {
tmp = (x + -2.0) * ((z / t_0) + (t_1 / t_0));
} else {
tmp = (((y - 130977.50649958357) / Math.pow(x, 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 110.1139242984811;
}
return tmp;
}
def code(x, y, z): t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606 t_1 = x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y) tmp = 0 if (((x - 2.0) * (t_1 + z)) / t_0) <= 2e+273: tmp = (x + -2.0) * ((z / t_0) + (t_1 / t_0)) else: tmp = (((y - 130977.50649958357) / math.pow(x, 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 110.1139242984811 return tmp
function code(x, y, z) t_0 = Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) t_1 = Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) tmp = 0.0 if (Float64(Float64(Float64(x - 2.0) * Float64(t_1 + z)) / t_0) <= 2e+273) tmp = Float64(Float64(x + -2.0) * Float64(Float64(z / t_0) + Float64(t_1 / t_0))); else tmp = Float64(Float64(Float64(Float64(y - 130977.50649958357) / (x ^ 2.0)) + Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x)))) - 110.1139242984811); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606; t_1 = x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y); tmp = 0.0; if ((((x - 2.0) * (t_1 + z)) / t_0) <= 2e+273) tmp = (x + -2.0) * ((z / t_0) + (t_1 / t_0)); else tmp = (((y - 130977.50649958357) / (x ^ 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 110.1139242984811; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(x - 2.0), $MachinePrecision] * N[(t$95$1 + z), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], 2e+273], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(z / t$95$0), $MachinePrecision] + N[(t$95$1 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(y - 130977.50649958357), $MachinePrecision] / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606\\
t_1 := x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right)\\
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(t_1 + z\right)}{t_0} \leq 2 \cdot 10^{+273}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(\frac{z}{t_0} + \frac{t_1}{t_0}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{y - 130977.50649958357}{{x}^{2}} + \left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < 1.99999999999999989e273Initial program 96.4%
Simplified99.3%
Applied egg-rr33.2%
expm1-def66.4%
expm1-log1p99.3%
associate-*l/96.4%
associate-*r/99.5%
Simplified99.5%
Taylor expanded in z around 0 99.5%
if 1.99999999999999989e273 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) Initial program 0.2%
Simplified2.0%
Taylor expanded in x around -inf 98.1%
Final simplification98.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
(t_1
(*
x
(+
(* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))))
(if (<= (/ (* (- x 2.0) (+ t_1 z)) t_0) INFINITY)
(* (+ x -2.0) (+ (/ z t_0) (/ t_1 t_0)))
(/ (+ x -2.0) 0.24013125253755718))))
double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double t_1 = x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y);
double tmp;
if ((((x - 2.0) * (t_1 + z)) / t_0) <= ((double) INFINITY)) {
tmp = (x + -2.0) * ((z / t_0) + (t_1 / t_0));
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
public static double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double t_1 = x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y);
double tmp;
if ((((x - 2.0) * (t_1 + z)) / t_0) <= Double.POSITIVE_INFINITY) {
tmp = (x + -2.0) * ((z / t_0) + (t_1 / t_0));
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
def code(x, y, z): t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606 t_1 = x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y) tmp = 0 if (((x - 2.0) * (t_1 + z)) / t_0) <= math.inf: tmp = (x + -2.0) * ((z / t_0) + (t_1 / t_0)) else: tmp = (x + -2.0) / 0.24013125253755718 return tmp
function code(x, y, z) t_0 = Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) t_1 = Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) tmp = 0.0 if (Float64(Float64(Float64(x - 2.0) * Float64(t_1 + z)) / t_0) <= Inf) tmp = Float64(Float64(x + -2.0) * Float64(Float64(z / t_0) + Float64(t_1 / t_0))); else tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606; t_1 = x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y); tmp = 0.0; if ((((x - 2.0) * (t_1 + z)) / t_0) <= Inf) tmp = (x + -2.0) * ((z / t_0) + (t_1 / t_0)); else tmp = (x + -2.0) / 0.24013125253755718; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(x - 2.0), $MachinePrecision] * N[(t$95$1 + z), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], Infinity], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(z / t$95$0), $MachinePrecision] + N[(t$95$1 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606\\
t_1 := x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right)\\
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(t_1 + z\right)}{t_0} \leq \infty:\\
\;\;\;\;\left(x + -2\right) \cdot \left(\frac{z}{t_0} + \frac{t_1}{t_0}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < +inf.0Initial program 94.0%
Simplified98.1%
Applied egg-rr33.6%
expm1-def66.0%
expm1-log1p98.1%
associate-*l/94.0%
associate-*r/98.3%
Simplified98.3%
Taylor expanded in z around 0 98.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)) Initial program 0.0%
associate-/l*0.0%
sub-neg0.0%
metadata-eval0.0%
fma-def0.0%
fma-def0.0%
fma-def0.0%
fma-def0.0%
fma-def0.0%
fma-def0.0%
fma-def0.0%
Simplified0.0%
Taylor expanded in x around inf 98.6%
Final simplification98.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ x 43.3400022514)))
(t_1
(+ (* x (+ (* x (+ t_0 263.505074721)) 313.399215894)) 47.066876606)))
(if (<= x -18000000.0)
(*
(+ x -2.0)
(+
4.16438922228
(/
z
(+
47.066876606
(* x (+ 313.399215894 (+ (* x 263.505074721) (* x t_0))))))))
(if (<= x 5.8e+18)
(/
(*
(- x 2.0)
(+
(*
x
(+
(* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
z))
t_1)
(* (+ x -2.0) (+ 4.16438922228 (/ z t_1)))))))
double code(double x, double y, double z) {
double t_0 = x * (x + 43.3400022514);
double t_1 = (x * ((x * (t_0 + 263.505074721)) + 313.399215894)) + 47.066876606;
double tmp;
if (x <= -18000000.0) {
tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + ((x * 263.505074721) + (x * t_0)))))));
} else if (x <= 5.8e+18) {
tmp = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_1;
} else {
tmp = (x + -2.0) * (4.16438922228 + (z / t_1));
}
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 + 43.3400022514d0)
t_1 = (x * ((x * (t_0 + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0
if (x <= (-18000000.0d0)) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 + (z / (47.066876606d0 + (x * (313.399215894d0 + ((x * 263.505074721d0) + (x * t_0)))))))
else if (x <= 5.8d+18) then
tmp = ((x - 2.0d0) * ((x * ((x * ((x * ((x * 4.16438922228d0) + 78.6994924154d0)) + 137.519416416d0)) + y)) + z)) / t_1
else
tmp = (x + (-2.0d0)) * (4.16438922228d0 + (z / t_1))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (x + 43.3400022514);
double t_1 = (x * ((x * (t_0 + 263.505074721)) + 313.399215894)) + 47.066876606;
double tmp;
if (x <= -18000000.0) {
tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + ((x * 263.505074721) + (x * t_0)))))));
} else if (x <= 5.8e+18) {
tmp = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_1;
} else {
tmp = (x + -2.0) * (4.16438922228 + (z / t_1));
}
return tmp;
}
def code(x, y, z): t_0 = x * (x + 43.3400022514) t_1 = (x * ((x * (t_0 + 263.505074721)) + 313.399215894)) + 47.066876606 tmp = 0 if x <= -18000000.0: tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + ((x * 263.505074721) + (x * t_0))))))) elif x <= 5.8e+18: tmp = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_1 else: tmp = (x + -2.0) * (4.16438922228 + (z / t_1)) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(x + 43.3400022514)) t_1 = Float64(Float64(x * Float64(Float64(x * Float64(t_0 + 263.505074721)) + 313.399215894)) + 47.066876606) tmp = 0.0 if (x <= -18000000.0) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(z / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(Float64(x * 263.505074721) + Float64(x * t_0)))))))); elseif (x <= 5.8e+18) tmp = Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_1); else tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(z / t_1))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (x + 43.3400022514); t_1 = (x * ((x * (t_0 + 263.505074721)) + 313.399215894)) + 47.066876606; tmp = 0.0; if (x <= -18000000.0) tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + ((x * 263.505074721) + (x * t_0))))))); elseif (x <= 5.8e+18) tmp = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_1; else tmp = (x + -2.0) * (4.16438922228 + (z / t_1)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * N[(N[(x * N[(t$95$0 + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]}, If[LessEqual[x, -18000000.0], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(z / N[(47.066876606 + N[(x * N[(313.399215894 + N[(N[(x * 263.505074721), $MachinePrecision] + N[(x * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.8e+18], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(z / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x + 43.3400022514\right)\\
t_1 := x \cdot \left(x \cdot \left(t_0 + 263.505074721\right) + 313.399215894\right) + 47.066876606\\
\mathbf{if}\;x \leq -18000000:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{z}{47.066876606 + x \cdot \left(313.399215894 + \left(x \cdot 263.505074721 + x \cdot t_0\right)\right)}\right)\\
\mathbf{elif}\;x \leq 5.8 \cdot 10^{+18}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{t_1}\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{z}{t_1}\right)\\
\end{array}
\end{array}
if x < -1.8e7Initial program 17.9%
Simplified26.5%
Applied egg-rr6.7%
expm1-def6.7%
expm1-log1p26.5%
associate-*l/17.9%
associate-*r/26.5%
Simplified26.5%
Taylor expanded in z around 0 26.5%
Taylor expanded in x around inf 99.0%
distribute-rgt-in99.0%
*-commutative99.0%
+-commutative99.0%
Applied egg-rr99.0%
if -1.8e7 < x < 5.8e18Initial program 99.7%
if 5.8e18 < x Initial program 12.8%
Simplified15.5%
Applied egg-rr13.2%
expm1-def13.2%
expm1-log1p15.5%
associate-*l/12.8%
associate-*r/15.4%
Simplified15.4%
Taylor expanded in z around 0 15.4%
Taylor expanded in x around inf 95.1%
Final simplification98.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ x 43.3400022514)))
(t_1
(+ (* x (+ (* x (+ t_0 263.505074721)) 313.399215894)) 47.066876606)))
(if (<= x -18000000.0)
(*
(+ x -2.0)
(+
4.16438922228
(/
z
(+
47.066876606
(* x (+ 313.399215894 (+ (* x 263.505074721) (* x t_0))))))))
(if (<= x 1.26e+17)
(/ (* (- x 2.0) (+ z (* x (+ y (* x 137.519416416))))) t_1)
(* (+ x -2.0) (+ 4.16438922228 (/ z t_1)))))))
double code(double x, double y, double z) {
double t_0 = x * (x + 43.3400022514);
double t_1 = (x * ((x * (t_0 + 263.505074721)) + 313.399215894)) + 47.066876606;
double tmp;
if (x <= -18000000.0) {
tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + ((x * 263.505074721) + (x * t_0)))))));
} else if (x <= 1.26e+17) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / t_1;
} else {
tmp = (x + -2.0) * (4.16438922228 + (z / t_1));
}
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 + 43.3400022514d0)
t_1 = (x * ((x * (t_0 + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0
if (x <= (-18000000.0d0)) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 + (z / (47.066876606d0 + (x * (313.399215894d0 + ((x * 263.505074721d0) + (x * t_0)))))))
else if (x <= 1.26d+17) then
tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / t_1
else
tmp = (x + (-2.0d0)) * (4.16438922228d0 + (z / t_1))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (x + 43.3400022514);
double t_1 = (x * ((x * (t_0 + 263.505074721)) + 313.399215894)) + 47.066876606;
double tmp;
if (x <= -18000000.0) {
tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + ((x * 263.505074721) + (x * t_0)))))));
} else if (x <= 1.26e+17) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / t_1;
} else {
tmp = (x + -2.0) * (4.16438922228 + (z / t_1));
}
return tmp;
}
def code(x, y, z): t_0 = x * (x + 43.3400022514) t_1 = (x * ((x * (t_0 + 263.505074721)) + 313.399215894)) + 47.066876606 tmp = 0 if x <= -18000000.0: tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + ((x * 263.505074721) + (x * t_0))))))) elif x <= 1.26e+17: tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / t_1 else: tmp = (x + -2.0) * (4.16438922228 + (z / t_1)) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(x + 43.3400022514)) t_1 = Float64(Float64(x * Float64(Float64(x * Float64(t_0 + 263.505074721)) + 313.399215894)) + 47.066876606) tmp = 0.0 if (x <= -18000000.0) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(z / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(Float64(x * 263.505074721) + Float64(x * t_0)))))))); elseif (x <= 1.26e+17) tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * 137.519416416))))) / t_1); else tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(z / t_1))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (x + 43.3400022514); t_1 = (x * ((x * (t_0 + 263.505074721)) + 313.399215894)) + 47.066876606; tmp = 0.0; if (x <= -18000000.0) tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + ((x * 263.505074721) + (x * t_0))))))); elseif (x <= 1.26e+17) tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / t_1; else tmp = (x + -2.0) * (4.16438922228 + (z / t_1)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * N[(N[(x * N[(t$95$0 + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]}, If[LessEqual[x, -18000000.0], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(z / N[(47.066876606 + N[(x * N[(313.399215894 + N[(N[(x * 263.505074721), $MachinePrecision] + N[(x * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.26e+17], 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], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(z / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x + 43.3400022514\right)\\
t_1 := x \cdot \left(x \cdot \left(t_0 + 263.505074721\right) + 313.399215894\right) + 47.066876606\\
\mathbf{if}\;x \leq -18000000:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{z}{47.066876606 + x \cdot \left(313.399215894 + \left(x \cdot 263.505074721 + x \cdot t_0\right)\right)}\right)\\
\mathbf{elif}\;x \leq 1.26 \cdot 10^{+17}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{t_1}\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{z}{t_1}\right)\\
\end{array}
\end{array}
if x < -1.8e7Initial program 17.9%
Simplified26.5%
Applied egg-rr6.7%
expm1-def6.7%
expm1-log1p26.5%
associate-*l/17.9%
associate-*r/26.5%
Simplified26.5%
Taylor expanded in z around 0 26.5%
Taylor expanded in x around inf 99.0%
distribute-rgt-in99.0%
*-commutative99.0%
+-commutative99.0%
Applied egg-rr99.0%
if -1.8e7 < x < 1.26e17Initial program 99.7%
Taylor expanded in x around 0 98.6%
*-commutative96.9%
Simplified98.6%
if 1.26e17 < x Initial program 12.8%
Simplified15.5%
Applied egg-rr13.2%
expm1-def13.2%
expm1-log1p15.5%
associate-*l/12.8%
associate-*r/15.4%
Simplified15.4%
Taylor expanded in z around 0 15.4%
Taylor expanded in x around inf 95.1%
Final simplification97.7%
(FPCore (x y z)
:precision binary64
(if (or (<= x -6.5e-5) (not (<= x 2.2e-6)))
(*
(+ x -2.0)
(+
4.16438922228
(/
z
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))))
(+
(* z -0.0424927283095952)
(*
x
(- (* 0.0212463641547976 (+ z (* y -2.0))) (* z -0.28294182010212804))))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -6.5e-5) || !(x <= 2.2e-6)) {
tmp = (x + -2.0) * (4.16438922228 + (z / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)));
} else {
tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804)));
}
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 <= (-6.5d-5)) .or. (.not. (x <= 2.2d-6))) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 + (z / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0)))
else
tmp = (z * (-0.0424927283095952d0)) + (x * ((0.0212463641547976d0 * (z + (y * (-2.0d0)))) - (z * (-0.28294182010212804d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -6.5e-5) || !(x <= 2.2e-6)) {
tmp = (x + -2.0) * (4.16438922228 + (z / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)));
} else {
tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -6.5e-5) or not (x <= 2.2e-6): tmp = (x + -2.0) * (4.16438922228 + (z / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606))) else: tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804))) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -6.5e-5) || !(x <= 2.2e-6)) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(z / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)))); else tmp = Float64(Float64(z * -0.0424927283095952) + Float64(x * Float64(Float64(0.0212463641547976 * Float64(z + Float64(y * -2.0))) - Float64(z * -0.28294182010212804)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -6.5e-5) || ~((x <= 2.2e-6))) tmp = (x + -2.0) * (4.16438922228 + (z / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606))); else tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -6.5e-5], N[Not[LessEqual[x, 2.2e-6]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(z / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.5 \cdot 10^{-5} \lor \neg \left(x \leq 2.2 \cdot 10^{-6}\right):\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot -0.0424927283095952 + x \cdot \left(0.0212463641547976 \cdot \left(z + y \cdot -2\right) - z \cdot -0.28294182010212804\right)\\
\end{array}
\end{array}
if x < -6.49999999999999943e-5 or 2.2000000000000001e-6 < x Initial program 18.2%
Simplified23.3%
Applied egg-rr12.1%
expm1-def12.1%
expm1-log1p23.3%
associate-*l/18.2%
associate-*r/23.3%
Simplified23.3%
Taylor expanded in z around 0 23.3%
Taylor expanded in x around inf 95.4%
if -6.49999999999999943e-5 < x < 2.2000000000000001e-6Initial program 99.7%
Simplified99.4%
Taylor expanded in x around 0 93.7%
Final simplification94.6%
(FPCore (x y z)
:precision binary64
(if (or (<= x -0.0077) (not (<= x 2.4e-5)))
(*
(+ x -2.0)
(+
4.16438922228
(/
z
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))))
(/
(* (- x 2.0) (+ z (* x (+ y (* x 137.519416416)))))
(+ 47.066876606 (* x (+ 313.399215894 (* x 263.505074721)))))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -0.0077) || !(x <= 2.4e-5)) {
tmp = (x + -2.0) * (4.16438922228 + (z / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)));
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-0.0077d0)) .or. (.not. (x <= 2.4d-5))) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 + (z / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0)))
else
tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / (47.066876606d0 + (x * (313.399215894d0 + (x * 263.505074721d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -0.0077) || !(x <= 2.4e-5)) {
tmp = (x + -2.0) * (4.16438922228 + (z / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)));
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -0.0077) or not (x <= 2.4e-5): tmp = (x + -2.0) * (4.16438922228 + (z / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606))) else: tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -0.0077) || !(x <= 2.4e-5)) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(z / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)))); else 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))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -0.0077) || ~((x <= 2.4e-5))) tmp = (x + -2.0) * (4.16438922228 + (z / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606))); else tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -0.0077], N[Not[LessEqual[x, 2.4e-5]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(z / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.0077 \lor \neg \left(x \leq 2.4 \cdot 10^{-5}\right):\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{z}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\right)\\
\mathbf{else}:\\
\;\;\;\;\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)}\\
\end{array}
\end{array}
if x < -0.0077000000000000002 or 2.4000000000000001e-5 < x Initial program 18.2%
Simplified23.3%
Applied egg-rr12.1%
expm1-def12.1%
expm1-log1p23.3%
associate-*l/18.2%
associate-*r/23.3%
Simplified23.3%
Taylor expanded in z around 0 23.3%
Taylor expanded in x around inf 95.4%
if -0.0077000000000000002 < x < 2.4000000000000001e-5Initial program 99.7%
Taylor expanded in x around 0 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
*-commutative99.7%
Simplified99.7%
Final simplification97.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(/
(* (- x 2.0) z)
(+ 47.066876606 (* x (+ 313.399215894 (* x 263.505074721)))))))
(if (<= x -1.45e+30)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 2.8e-49)
t_0
(if (<= x 2.3e-32)
(* -0.0424927283095952 (* x y))
(if (<= x 3.3)
t_0
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x)))))))))
double code(double x, double y, double z) {
double t_0 = ((x - 2.0) * z) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
double tmp;
if (x <= -1.45e+30) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 2.8e-49) {
tmp = t_0;
} else if (x <= 2.3e-32) {
tmp = -0.0424927283095952 * (x * y);
} else if (x <= 3.3) {
tmp = t_0;
} 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) :: t_0
real(8) :: tmp
t_0 = ((x - 2.0d0) * z) / (47.066876606d0 + (x * (313.399215894d0 + (x * 263.505074721d0))))
if (x <= (-1.45d+30)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 2.8d-49) then
tmp = t_0
else if (x <= 2.3d-32) then
tmp = (-0.0424927283095952d0) * (x * y)
else if (x <= 3.3d0) then
tmp = t_0
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 t_0 = ((x - 2.0) * z) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
double tmp;
if (x <= -1.45e+30) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 2.8e-49) {
tmp = t_0;
} else if (x <= 2.3e-32) {
tmp = -0.0424927283095952 * (x * y);
} else if (x <= 3.3) {
tmp = t_0;
} else {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
}
return tmp;
}
def code(x, y, z): t_0 = ((x - 2.0) * z) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))) tmp = 0 if x <= -1.45e+30: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 2.8e-49: tmp = t_0 elif x <= 2.3e-32: tmp = -0.0424927283095952 * (x * y) elif x <= 3.3: tmp = t_0 else: tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(x - 2.0) * z) / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * 263.505074721))))) tmp = 0.0 if (x <= -1.45e+30) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 2.8e-49) tmp = t_0; elseif (x <= 2.3e-32) tmp = Float64(-0.0424927283095952 * Float64(x * y)); elseif (x <= 3.3) tmp = t_0; 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) t_0 = ((x - 2.0) * z) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))); tmp = 0.0; if (x <= -1.45e+30) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 2.8e-49) tmp = t_0; elseif (x <= 2.3e-32) tmp = -0.0424927283095952 * (x * y); elseif (x <= 3.3) tmp = t_0; else tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(x - 2.0), $MachinePrecision] * z), $MachinePrecision] / N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * 263.505074721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.45e+30], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 2.8e-49], t$95$0, If[LessEqual[x, 2.3e-32], N[(-0.0424927283095952 * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.3], t$95$0, N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\left(x - 2\right) \cdot z}{47.066876606 + x \cdot \left(313.399215894 + x \cdot 263.505074721\right)}\\
\mathbf{if}\;x \leq -1.45 \cdot 10^{+30}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{-49}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 2.3 \cdot 10^{-32}:\\
\;\;\;\;-0.0424927283095952 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;x \leq 3.3:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\end{array}
\end{array}
if x < -1.4499999999999999e30Initial program 13.4%
associate-/l*22.4%
sub-neg22.4%
metadata-eval22.4%
fma-def22.4%
fma-def22.4%
fma-def22.4%
fma-def22.4%
fma-def22.4%
fma-def22.4%
fma-def22.4%
Simplified22.4%
Taylor expanded in x around inf 97.7%
if -1.4499999999999999e30 < x < 2.79999999999999997e-49 or 2.3000000000000001e-32 < x < 3.2999999999999998Initial program 99.7%
Taylor expanded in x around 0 95.9%
*-commutative95.9%
Simplified95.9%
Taylor expanded in z around inf 67.5%
if 2.79999999999999997e-49 < x < 2.3000000000000001e-32Initial program 99.6%
associate-/l*99.2%
sub-neg99.2%
metadata-eval99.2%
fma-def99.2%
fma-def99.2%
fma-def99.2%
fma-def99.2%
fma-def99.2%
fma-def99.2%
fma-def99.2%
Simplified99.2%
Taylor expanded in y around inf 75.4%
Taylor expanded in x around 0 75.6%
if 3.2999999999999998 < x Initial program 15.1%
associate-/l*17.8%
sub-neg17.8%
metadata-eval17.8%
fma-def17.8%
fma-def17.8%
fma-def17.8%
fma-def17.8%
fma-def17.8%
fma-def17.8%
fma-def17.8%
Simplified17.8%
Taylor expanded in x around inf 91.8%
associate-*r/91.8%
metadata-eval91.8%
Simplified91.8%
Final simplification80.9%
(FPCore (x y z)
:precision binary64
(if (<= x -1.45e+30)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 0.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.45e+30) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 0.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.45d+30)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 0.13d0) 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.45e+30) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 0.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.45e+30: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 0.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.45e+30) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 0.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.45e+30) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 0.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.45e+30], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 0.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.45 \cdot 10^{+30}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 0.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.4499999999999999e30Initial program 13.4%
associate-/l*22.4%
sub-neg22.4%
metadata-eval22.4%
fma-def22.4%
fma-def22.4%
fma-def22.4%
fma-def22.4%
fma-def22.4%
fma-def22.4%
fma-def22.4%
Simplified22.4%
Taylor expanded in x around inf 97.7%
if -1.4499999999999999e30 < x < 0.13Initial program 99.7%
Simplified99.3%
Taylor expanded in x around 0 90.2%
if 0.13 < x Initial program 15.1%
associate-/l*17.8%
sub-neg17.8%
metadata-eval17.8%
fma-def17.8%
fma-def17.8%
fma-def17.8%
fma-def17.8%
fma-def17.8%
fma-def17.8%
fma-def17.8%
Simplified17.8%
Taylor expanded in x around inf 91.8%
associate-*r/91.8%
metadata-eval91.8%
Simplified91.8%
Final simplification92.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ (* (- x 2.0) z) (+ 47.066876606 (* x 313.399215894))))
(t_1 (/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x)))))
(if (<= x -1.18e-7)
t_1
(if (<= x 4.8e-49)
t_0
(if (<= x 2.2e-28)
(* -0.0424927283095952 (* x y))
(if (<= x 3.2) t_0 t_1))))))
double code(double x, double y, double z) {
double t_0 = ((x - 2.0) * z) / (47.066876606 + (x * 313.399215894));
double t_1 = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
double tmp;
if (x <= -1.18e-7) {
tmp = t_1;
} else if (x <= 4.8e-49) {
tmp = t_0;
} else if (x <= 2.2e-28) {
tmp = -0.0424927283095952 * (x * y);
} else if (x <= 3.2) {
tmp = t_0;
} else {
tmp = t_1;
}
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) * z) / (47.066876606d0 + (x * 313.399215894d0))
t_1 = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
if (x <= (-1.18d-7)) then
tmp = t_1
else if (x <= 4.8d-49) then
tmp = t_0
else if (x <= 2.2d-28) then
tmp = (-0.0424927283095952d0) * (x * y)
else if (x <= 3.2d0) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((x - 2.0) * z) / (47.066876606 + (x * 313.399215894));
double t_1 = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
double tmp;
if (x <= -1.18e-7) {
tmp = t_1;
} else if (x <= 4.8e-49) {
tmp = t_0;
} else if (x <= 2.2e-28) {
tmp = -0.0424927283095952 * (x * y);
} else if (x <= 3.2) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = ((x - 2.0) * z) / (47.066876606 + (x * 313.399215894)) t_1 = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) tmp = 0 if x <= -1.18e-7: tmp = t_1 elif x <= 4.8e-49: tmp = t_0 elif x <= 2.2e-28: tmp = -0.0424927283095952 * (x * y) elif x <= 3.2: tmp = t_0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(x - 2.0) * z) / Float64(47.066876606 + Float64(x * 313.399215894))) t_1 = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))) tmp = 0.0 if (x <= -1.18e-7) tmp = t_1; elseif (x <= 4.8e-49) tmp = t_0; elseif (x <= 2.2e-28) tmp = Float64(-0.0424927283095952 * Float64(x * y)); elseif (x <= 3.2) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((x - 2.0) * z) / (47.066876606 + (x * 313.399215894)); t_1 = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); tmp = 0.0; if (x <= -1.18e-7) tmp = t_1; elseif (x <= 4.8e-49) tmp = t_0; elseif (x <= 2.2e-28) tmp = -0.0424927283095952 * (x * y); elseif (x <= 3.2) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(x - 2.0), $MachinePrecision] * z), $MachinePrecision] / N[(47.066876606 + N[(x * 313.399215894), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.18e-7], t$95$1, If[LessEqual[x, 4.8e-49], t$95$0, If[LessEqual[x, 2.2e-28], N[(-0.0424927283095952 * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.2], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\left(x - 2\right) \cdot z}{47.066876606 + x \cdot 313.399215894}\\
t_1 := \frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\mathbf{if}\;x \leq -1.18 \cdot 10^{-7}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{-49}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{-28}:\\
\;\;\;\;-0.0424927283095952 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;x \leq 3.2:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -1.18e-7 or 3.2000000000000002 < x Initial program 18.2%
associate-/l*23.3%
sub-neg23.3%
metadata-eval23.3%
fma-def23.3%
fma-def23.3%
fma-def23.3%
fma-def23.3%
fma-def23.3%
fma-def23.3%
fma-def23.3%
Simplified23.3%
Taylor expanded in x around inf 90.2%
associate-*r/90.2%
metadata-eval90.2%
Simplified90.2%
if -1.18e-7 < x < 4.79999999999999985e-49 or 2.19999999999999996e-28 < x < 3.2000000000000002Initial program 99.7%
Taylor expanded in x around 0 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in z around inf 70.6%
Taylor expanded in x around 0 70.3%
*-commutative70.3%
Simplified70.3%
if 4.79999999999999985e-49 < x < 2.19999999999999996e-28Initial program 99.6%
associate-/l*99.2%
sub-neg99.2%
metadata-eval99.2%
fma-def99.2%
fma-def99.2%
fma-def99.2%
fma-def99.2%
fma-def99.2%
fma-def99.2%
fma-def99.2%
Simplified99.2%
Taylor expanded in y around inf 75.4%
Taylor expanded in x around 0 75.6%
Final simplification80.7%
(FPCore (x y z)
:precision binary64
(if (<= x -1.45e+30)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 9e-49)
(/
(* z -2.0)
(+ 47.066876606 (* x (+ 313.399215894 (* x 263.505074721)))))
(if (<= x 2.5e-32)
(* -0.0424927283095952 (* x y))
(if (<= x 3.2)
(/ (* (- x 2.0) z) (+ 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 <= -1.45e+30) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 9e-49) {
tmp = (z * -2.0) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
} else if (x <= 2.5e-32) {
tmp = -0.0424927283095952 * (x * y);
} else if (x <= 3.2) {
tmp = ((x - 2.0) * z) / (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 <= (-1.45d+30)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 9d-49) then
tmp = (z * (-2.0d0)) / (47.066876606d0 + (x * (313.399215894d0 + (x * 263.505074721d0))))
else if (x <= 2.5d-32) then
tmp = (-0.0424927283095952d0) * (x * y)
else if (x <= 3.2d0) then
tmp = ((x - 2.0d0) * z) / (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 <= -1.45e+30) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 9e-49) {
tmp = (z * -2.0) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
} else if (x <= 2.5e-32) {
tmp = -0.0424927283095952 * (x * y);
} else if (x <= 3.2) {
tmp = ((x - 2.0) * z) / (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 <= -1.45e+30: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 9e-49: tmp = (z * -2.0) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))) elif x <= 2.5e-32: tmp = -0.0424927283095952 * (x * y) elif x <= 3.2: tmp = ((x - 2.0) * z) / (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 <= -1.45e+30) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 9e-49) tmp = Float64(Float64(z * -2.0) / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * 263.505074721))))); elseif (x <= 2.5e-32) tmp = Float64(-0.0424927283095952 * Float64(x * y)); elseif (x <= 3.2) tmp = Float64(Float64(Float64(x - 2.0) * z) / 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 <= -1.45e+30) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 9e-49) tmp = (z * -2.0) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))); elseif (x <= 2.5e-32) tmp = -0.0424927283095952 * (x * y); elseif (x <= 3.2) tmp = ((x - 2.0) * z) / (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, -1.45e+30], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 9e-49], N[(N[(z * -2.0), $MachinePrecision] / N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * 263.505074721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.5e-32], N[(-0.0424927283095952 * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.2], N[(N[(N[(x - 2.0), $MachinePrecision] * z), $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 -1.45 \cdot 10^{+30}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 9 \cdot 10^{-49}:\\
\;\;\;\;\frac{z \cdot -2}{47.066876606 + x \cdot \left(313.399215894 + x \cdot 263.505074721\right)}\\
\mathbf{elif}\;x \leq 2.5 \cdot 10^{-32}:\\
\;\;\;\;-0.0424927283095952 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;x \leq 3.2:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot z}{47.066876606 + x \cdot 313.399215894}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\end{array}
\end{array}
if x < -1.4499999999999999e30Initial program 13.4%
associate-/l*22.4%
sub-neg22.4%
metadata-eval22.4%
fma-def22.4%
fma-def22.4%
fma-def22.4%
fma-def22.4%
fma-def22.4%
fma-def22.4%
fma-def22.4%
Simplified22.4%
Taylor expanded in x around inf 97.7%
if -1.4499999999999999e30 < x < 9.0000000000000004e-49Initial program 99.7%
Taylor expanded in x around 0 95.8%
*-commutative95.8%
Simplified95.8%
Taylor expanded in z around inf 68.5%
Taylor expanded in x around 0 68.4%
*-commutative68.4%
Simplified68.4%
if 9.0000000000000004e-49 < x < 2.5e-32Initial program 99.6%
associate-/l*99.2%
sub-neg99.2%
metadata-eval99.2%
fma-def99.2%
fma-def99.2%
fma-def99.2%
fma-def99.2%
fma-def99.2%
fma-def99.2%
fma-def99.2%
Simplified99.2%
Taylor expanded in y around inf 75.4%
Taylor expanded in x around 0 75.6%
if 2.5e-32 < x < 3.2000000000000002Initial program 99.5%
Taylor expanded in x around 0 97.8%
*-commutative97.8%
Simplified97.8%
Taylor expanded in z around inf 47.7%
Taylor expanded in x around 0 43.1%
*-commutative43.1%
Simplified43.1%
if 3.2000000000000002 < x Initial program 15.1%
associate-/l*17.8%
sub-neg17.8%
metadata-eval17.8%
fma-def17.8%
fma-def17.8%
fma-def17.8%
fma-def17.8%
fma-def17.8%
fma-def17.8%
fma-def17.8%
Simplified17.8%
Taylor expanded in x around inf 91.8%
associate-*r/91.8%
metadata-eval91.8%
Simplified91.8%
Final simplification80.8%
(FPCore (x y z)
:precision binary64
(if (<= x -1.45e+30)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 1.36e-49)
(/
(* z -2.0)
(+ 47.066876606 (* x (+ 313.399215894 (* x 263.505074721)))))
(if (<= x 2.4)
(/ (+ x -2.0) (+ (/ 313.399215894 y) (/ 47.066876606 (* x y))))
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x)))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.45e+30) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 1.36e-49) {
tmp = (z * -2.0) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
} else if (x <= 2.4) {
tmp = (x + -2.0) / ((313.399215894 / y) + (47.066876606 / (x * y)));
} 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.45d+30)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 1.36d-49) then
tmp = (z * (-2.0d0)) / (47.066876606d0 + (x * (313.399215894d0 + (x * 263.505074721d0))))
else if (x <= 2.4d0) then
tmp = (x + (-2.0d0)) / ((313.399215894d0 / y) + (47.066876606d0 / (x * y)))
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.45e+30) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 1.36e-49) {
tmp = (z * -2.0) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
} else if (x <= 2.4) {
tmp = (x + -2.0) / ((313.399215894 / y) + (47.066876606 / (x * y)));
} else {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.45e+30: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 1.36e-49: tmp = (z * -2.0) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))) elif x <= 2.4: tmp = (x + -2.0) / ((313.399215894 / y) + (47.066876606 / (x * y))) else: tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.45e+30) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 1.36e-49) tmp = Float64(Float64(z * -2.0) / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * 263.505074721))))); elseif (x <= 2.4) tmp = Float64(Float64(x + -2.0) / Float64(Float64(313.399215894 / y) + Float64(47.066876606 / Float64(x * y)))); 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.45e+30) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 1.36e-49) tmp = (z * -2.0) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))); elseif (x <= 2.4) tmp = (x + -2.0) / ((313.399215894 / y) + (47.066876606 / (x * y))); else tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.45e+30], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 1.36e-49], N[(N[(z * -2.0), $MachinePrecision] / N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * 263.505074721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.4], N[(N[(x + -2.0), $MachinePrecision] / N[(N[(313.399215894 / y), $MachinePrecision] + N[(47.066876606 / N[(x * y), $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.45 \cdot 10^{+30}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 1.36 \cdot 10^{-49}:\\
\;\;\;\;\frac{z \cdot -2}{47.066876606 + x \cdot \left(313.399215894 + x \cdot 263.505074721\right)}\\
\mathbf{elif}\;x \leq 2.4:\\
\;\;\;\;\frac{x + -2}{\frac{313.399215894}{y} + \frac{47.066876606}{x \cdot y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\end{array}
\end{array}
if x < -1.4499999999999999e30Initial program 13.4%
associate-/l*22.4%
sub-neg22.4%
metadata-eval22.4%
fma-def22.4%
fma-def22.4%
fma-def22.4%
fma-def22.4%
fma-def22.4%
fma-def22.4%
fma-def22.4%
Simplified22.4%
Taylor expanded in x around inf 97.7%
if -1.4499999999999999e30 < x < 1.36000000000000006e-49Initial program 99.7%
Taylor expanded in x around 0 95.8%
*-commutative95.8%
Simplified95.8%
Taylor expanded in z around inf 68.5%
Taylor expanded in x around 0 68.4%
*-commutative68.4%
Simplified68.4%
if 1.36000000000000006e-49 < x < 2.39999999999999991Initial program 99.6%
associate-/l*99.1%
sub-neg99.1%
metadata-eval99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
Simplified99.1%
Taylor expanded in y around inf 51.2%
Taylor expanded in x around 0 50.1%
associate-*r/50.1%
metadata-eval50.1%
associate-*r/50.3%
metadata-eval50.3%
Simplified50.3%
if 2.39999999999999991 < x Initial program 15.1%
associate-/l*17.8%
sub-neg17.8%
metadata-eval17.8%
fma-def17.8%
fma-def17.8%
fma-def17.8%
fma-def17.8%
fma-def17.8%
fma-def17.8%
fma-def17.8%
Simplified17.8%
Taylor expanded in x around inf 91.8%
associate-*r/91.8%
metadata-eval91.8%
Simplified91.8%
Final simplification80.1%
(FPCore (x y z)
:precision binary64
(if (<= x -1.45e+30)
(/ (+ x -2.0) 0.24013125253755718)
(if (<= x 1.92e-50)
(/ (+ x -2.0) (/ 47.066876606 z))
(if (<= x 1.8)
(* -0.0424927283095952 (* x y))
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x)))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.45e+30) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 1.92e-50) {
tmp = (x + -2.0) / (47.066876606 / z);
} else if (x <= 1.8) {
tmp = -0.0424927283095952 * (x * y);
} 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.45d+30)) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else if (x <= 1.92d-50) then
tmp = (x + (-2.0d0)) / (47.066876606d0 / z)
else if (x <= 1.8d0) then
tmp = (-0.0424927283095952d0) * (x * y)
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.45e+30) {
tmp = (x + -2.0) / 0.24013125253755718;
} else if (x <= 1.92e-50) {
tmp = (x + -2.0) / (47.066876606 / z);
} else if (x <= 1.8) {
tmp = -0.0424927283095952 * (x * y);
} else {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.45e+30: tmp = (x + -2.0) / 0.24013125253755718 elif x <= 1.92e-50: tmp = (x + -2.0) / (47.066876606 / z) elif x <= 1.8: tmp = -0.0424927283095952 * (x * y) else: tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.45e+30) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); elseif (x <= 1.92e-50) tmp = Float64(Float64(x + -2.0) / Float64(47.066876606 / z)); elseif (x <= 1.8) tmp = Float64(-0.0424927283095952 * Float64(x * y)); 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.45e+30) tmp = (x + -2.0) / 0.24013125253755718; elseif (x <= 1.92e-50) tmp = (x + -2.0) / (47.066876606 / z); elseif (x <= 1.8) tmp = -0.0424927283095952 * (x * y); else tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.45e+30], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], If[LessEqual[x, 1.92e-50], N[(N[(x + -2.0), $MachinePrecision] / N[(47.066876606 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.8], N[(-0.0424927283095952 * N[(x * y), $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.45 \cdot 10^{+30}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{elif}\;x \leq 1.92 \cdot 10^{-50}:\\
\;\;\;\;\frac{x + -2}{\frac{47.066876606}{z}}\\
\mathbf{elif}\;x \leq 1.8:\\
\;\;\;\;-0.0424927283095952 \cdot \left(x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\end{array}
\end{array}
if x < -1.4499999999999999e30Initial program 13.4%
associate-/l*22.4%
sub-neg22.4%
metadata-eval22.4%
fma-def22.4%
fma-def22.4%
fma-def22.4%
fma-def22.4%
fma-def22.4%
fma-def22.4%
fma-def22.4%
Simplified22.4%
Taylor expanded in x around inf 97.7%
if -1.4499999999999999e30 < x < 1.92e-50Initial program 99.7%
associate-/l*99.4%
sub-neg99.4%
metadata-eval99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
Simplified99.4%
Taylor expanded in x around 0 68.0%
if 1.92e-50 < x < 1.80000000000000004Initial program 99.6%
associate-/l*99.1%
sub-neg99.1%
metadata-eval99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
Simplified99.1%
Taylor expanded in y around inf 51.2%
Taylor expanded in x around 0 47.8%
if 1.80000000000000004 < x Initial program 15.1%
associate-/l*17.8%
sub-neg17.8%
metadata-eval17.8%
fma-def17.8%
fma-def17.8%
fma-def17.8%
fma-def17.8%
fma-def17.8%
fma-def17.8%
fma-def17.8%
Simplified17.8%
Taylor expanded in x around inf 91.8%
associate-*r/91.8%
metadata-eval91.8%
Simplified91.8%
Final simplification79.8%
(FPCore (x y z)
:precision binary64
(if (<= x -1.45e+30)
(* x 4.16438922228)
(if (<= x 2.7e-52)
(* z -0.0424927283095952)
(if (<= x 2.0) (* -0.0424927283095952 (* x y)) (* x 4.16438922228)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.45e+30) {
tmp = x * 4.16438922228;
} else if (x <= 2.7e-52) {
tmp = z * -0.0424927283095952;
} else if (x <= 2.0) {
tmp = -0.0424927283095952 * (x * y);
} 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 <= (-1.45d+30)) then
tmp = x * 4.16438922228d0
else if (x <= 2.7d-52) then
tmp = z * (-0.0424927283095952d0)
else if (x <= 2.0d0) then
tmp = (-0.0424927283095952d0) * (x * y)
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 <= -1.45e+30) {
tmp = x * 4.16438922228;
} else if (x <= 2.7e-52) {
tmp = z * -0.0424927283095952;
} else if (x <= 2.0) {
tmp = -0.0424927283095952 * (x * y);
} else {
tmp = x * 4.16438922228;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.45e+30: tmp = x * 4.16438922228 elif x <= 2.7e-52: tmp = z * -0.0424927283095952 elif x <= 2.0: tmp = -0.0424927283095952 * (x * y) else: tmp = x * 4.16438922228 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.45e+30) tmp = Float64(x * 4.16438922228); elseif (x <= 2.7e-52) tmp = Float64(z * -0.0424927283095952); elseif (x <= 2.0) tmp = Float64(-0.0424927283095952 * Float64(x * y)); else tmp = Float64(x * 4.16438922228); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.45e+30) tmp = x * 4.16438922228; elseif (x <= 2.7e-52) tmp = z * -0.0424927283095952; elseif (x <= 2.0) tmp = -0.0424927283095952 * (x * y); else tmp = x * 4.16438922228; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.45e+30], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 2.7e-52], N[(z * -0.0424927283095952), $MachinePrecision], If[LessEqual[x, 2.0], N[(-0.0424927283095952 * N[(x * y), $MachinePrecision]), $MachinePrecision], N[(x * 4.16438922228), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.45 \cdot 10^{+30}:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 2.7 \cdot 10^{-52}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{elif}\;x \leq 2:\\
\;\;\;\;-0.0424927283095952 \cdot \left(x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228\\
\end{array}
\end{array}
if x < -1.4499999999999999e30 or 2 < x Initial program 14.4%
Simplified19.7%
Taylor expanded in x around inf 93.6%
*-commutative93.6%
Simplified93.6%
if -1.4499999999999999e30 < x < 2.70000000000000009e-52Initial program 99.7%
Simplified99.4%
Taylor expanded in x around 0 67.9%
if 2.70000000000000009e-52 < x < 2Initial program 99.6%
associate-/l*99.1%
sub-neg99.1%
metadata-eval99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
Simplified99.1%
Taylor expanded in y around inf 51.2%
Taylor expanded in x around 0 47.8%
Final simplification79.4%
(FPCore (x y z)
:precision binary64
(if (<= x -1.45e+30)
(* x 4.16438922228)
(if (<= x 8.6e-49)
(* z -0.0424927283095952)
(if (<= x 2.0)
(* -0.0424927283095952 (* x y))
(- (* x 4.16438922228) 110.1139242984811)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.45e+30) {
tmp = x * 4.16438922228;
} else if (x <= 8.6e-49) {
tmp = z * -0.0424927283095952;
} else if (x <= 2.0) {
tmp = -0.0424927283095952 * (x * y);
} 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.45d+30)) then
tmp = x * 4.16438922228d0
else if (x <= 8.6d-49) then
tmp = z * (-0.0424927283095952d0)
else if (x <= 2.0d0) then
tmp = (-0.0424927283095952d0) * (x * y)
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.45e+30) {
tmp = x * 4.16438922228;
} else if (x <= 8.6e-49) {
tmp = z * -0.0424927283095952;
} else if (x <= 2.0) {
tmp = -0.0424927283095952 * (x * y);
} else {
tmp = (x * 4.16438922228) - 110.1139242984811;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.45e+30: tmp = x * 4.16438922228 elif x <= 8.6e-49: tmp = z * -0.0424927283095952 elif x <= 2.0: tmp = -0.0424927283095952 * (x * y) else: tmp = (x * 4.16438922228) - 110.1139242984811 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.45e+30) tmp = Float64(x * 4.16438922228); elseif (x <= 8.6e-49) tmp = Float64(z * -0.0424927283095952); elseif (x <= 2.0) tmp = Float64(-0.0424927283095952 * Float64(x * y)); 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.45e+30) tmp = x * 4.16438922228; elseif (x <= 8.6e-49) tmp = z * -0.0424927283095952; elseif (x <= 2.0) tmp = -0.0424927283095952 * (x * y); else tmp = (x * 4.16438922228) - 110.1139242984811; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.45e+30], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 8.6e-49], N[(z * -0.0424927283095952), $MachinePrecision], If[LessEqual[x, 2.0], N[(-0.0424927283095952 * N[(x * y), $MachinePrecision]), $MachinePrecision], N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.45 \cdot 10^{+30}:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 8.6 \cdot 10^{-49}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{elif}\;x \leq 2:\\
\;\;\;\;-0.0424927283095952 \cdot \left(x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\
\end{array}
\end{array}
if x < -1.4499999999999999e30Initial program 13.4%
Simplified22.4%
Taylor expanded in x around inf 97.1%
*-commutative97.1%
Simplified97.1%
if -1.4499999999999999e30 < x < 8.60000000000000033e-49Initial program 99.7%
Simplified99.4%
Taylor expanded in x around 0 67.9%
if 8.60000000000000033e-49 < x < 2Initial program 99.6%
associate-/l*99.1%
sub-neg99.1%
metadata-eval99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
Simplified99.1%
Taylor expanded in y around inf 51.2%
Taylor expanded in x around 0 47.8%
if 2 < x Initial program 15.1%
Simplified17.7%
Taylor expanded in x around inf 91.3%
Final simplification79.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ (+ x -2.0) 0.24013125253755718)))
(if (<= x -1.45e+30)
t_0
(if (<= x 1.22e-49)
(* z -0.0424927283095952)
(if (<= x 1.85) (* -0.0424927283095952 (* x y)) t_0)))))
double code(double x, double y, double z) {
double t_0 = (x + -2.0) / 0.24013125253755718;
double tmp;
if (x <= -1.45e+30) {
tmp = t_0;
} else if (x <= 1.22e-49) {
tmp = z * -0.0424927283095952;
} else if (x <= 1.85) {
tmp = -0.0424927283095952 * (x * y);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (x + (-2.0d0)) / 0.24013125253755718d0
if (x <= (-1.45d+30)) then
tmp = t_0
else if (x <= 1.22d-49) then
tmp = z * (-0.0424927283095952d0)
else if (x <= 1.85d0) then
tmp = (-0.0424927283095952d0) * (x * y)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (x + -2.0) / 0.24013125253755718;
double tmp;
if (x <= -1.45e+30) {
tmp = t_0;
} else if (x <= 1.22e-49) {
tmp = z * -0.0424927283095952;
} else if (x <= 1.85) {
tmp = -0.0424927283095952 * (x * y);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = (x + -2.0) / 0.24013125253755718 tmp = 0 if x <= -1.45e+30: tmp = t_0 elif x <= 1.22e-49: tmp = z * -0.0424927283095952 elif x <= 1.85: tmp = -0.0424927283095952 * (x * y) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(x + -2.0) / 0.24013125253755718) tmp = 0.0 if (x <= -1.45e+30) tmp = t_0; elseif (x <= 1.22e-49) tmp = Float64(z * -0.0424927283095952); elseif (x <= 1.85) tmp = Float64(-0.0424927283095952 * Float64(x * y)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x + -2.0) / 0.24013125253755718; tmp = 0.0; if (x <= -1.45e+30) tmp = t_0; elseif (x <= 1.22e-49) tmp = z * -0.0424927283095952; elseif (x <= 1.85) tmp = -0.0424927283095952 * (x * y); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]}, If[LessEqual[x, -1.45e+30], t$95$0, If[LessEqual[x, 1.22e-49], N[(z * -0.0424927283095952), $MachinePrecision], If[LessEqual[x, 1.85], N[(-0.0424927283095952 * N[(x * y), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x + -2}{0.24013125253755718}\\
\mathbf{if}\;x \leq -1.45 \cdot 10^{+30}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 1.22 \cdot 10^{-49}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{elif}\;x \leq 1.85:\\
\;\;\;\;-0.0424927283095952 \cdot \left(x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x < -1.4499999999999999e30 or 1.8500000000000001 < x Initial program 14.4%
associate-/l*19.7%
sub-neg19.7%
metadata-eval19.7%
fma-def19.7%
fma-def19.7%
fma-def19.7%
fma-def19.7%
fma-def19.7%
fma-def19.7%
fma-def19.7%
Simplified19.7%
Taylor expanded in x around inf 94.1%
if -1.4499999999999999e30 < x < 1.2199999999999999e-49Initial program 99.7%
Simplified99.4%
Taylor expanded in x around 0 67.9%
if 1.2199999999999999e-49 < x < 1.8500000000000001Initial program 99.6%
associate-/l*99.1%
sub-neg99.1%
metadata-eval99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
Simplified99.1%
Taylor expanded in y around inf 51.2%
Taylor expanded in x around 0 47.8%
Final simplification79.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ (+ x -2.0) 0.24013125253755718)))
(if (<= x -1.45e+30)
t_0
(if (<= x 9.5e-54)
(/ (+ x -2.0) (/ 47.066876606 z))
(if (<= x 0.68) (* -0.0424927283095952 (* x y)) t_0)))))
double code(double x, double y, double z) {
double t_0 = (x + -2.0) / 0.24013125253755718;
double tmp;
if (x <= -1.45e+30) {
tmp = t_0;
} else if (x <= 9.5e-54) {
tmp = (x + -2.0) / (47.066876606 / z);
} else if (x <= 0.68) {
tmp = -0.0424927283095952 * (x * y);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (x + (-2.0d0)) / 0.24013125253755718d0
if (x <= (-1.45d+30)) then
tmp = t_0
else if (x <= 9.5d-54) then
tmp = (x + (-2.0d0)) / (47.066876606d0 / z)
else if (x <= 0.68d0) then
tmp = (-0.0424927283095952d0) * (x * y)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (x + -2.0) / 0.24013125253755718;
double tmp;
if (x <= -1.45e+30) {
tmp = t_0;
} else if (x <= 9.5e-54) {
tmp = (x + -2.0) / (47.066876606 / z);
} else if (x <= 0.68) {
tmp = -0.0424927283095952 * (x * y);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = (x + -2.0) / 0.24013125253755718 tmp = 0 if x <= -1.45e+30: tmp = t_0 elif x <= 9.5e-54: tmp = (x + -2.0) / (47.066876606 / z) elif x <= 0.68: tmp = -0.0424927283095952 * (x * y) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(x + -2.0) / 0.24013125253755718) tmp = 0.0 if (x <= -1.45e+30) tmp = t_0; elseif (x <= 9.5e-54) tmp = Float64(Float64(x + -2.0) / Float64(47.066876606 / z)); elseif (x <= 0.68) tmp = Float64(-0.0424927283095952 * Float64(x * y)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x + -2.0) / 0.24013125253755718; tmp = 0.0; if (x <= -1.45e+30) tmp = t_0; elseif (x <= 9.5e-54) tmp = (x + -2.0) / (47.066876606 / z); elseif (x <= 0.68) tmp = -0.0424927283095952 * (x * y); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]}, If[LessEqual[x, -1.45e+30], t$95$0, If[LessEqual[x, 9.5e-54], N[(N[(x + -2.0), $MachinePrecision] / N[(47.066876606 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 0.68], N[(-0.0424927283095952 * N[(x * y), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x + -2}{0.24013125253755718}\\
\mathbf{if}\;x \leq -1.45 \cdot 10^{+30}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{-54}:\\
\;\;\;\;\frac{x + -2}{\frac{47.066876606}{z}}\\
\mathbf{elif}\;x \leq 0.68:\\
\;\;\;\;-0.0424927283095952 \cdot \left(x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x < -1.4499999999999999e30 or 0.680000000000000049 < x Initial program 14.4%
associate-/l*19.7%
sub-neg19.7%
metadata-eval19.7%
fma-def19.7%
fma-def19.7%
fma-def19.7%
fma-def19.7%
fma-def19.7%
fma-def19.7%
fma-def19.7%
Simplified19.7%
Taylor expanded in x around inf 94.1%
if -1.4499999999999999e30 < x < 9.4999999999999994e-54Initial program 99.7%
associate-/l*99.4%
sub-neg99.4%
metadata-eval99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
Simplified99.4%
Taylor expanded in x around 0 68.0%
if 9.4999999999999994e-54 < x < 0.680000000000000049Initial program 99.6%
associate-/l*99.1%
sub-neg99.1%
metadata-eval99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
fma-def99.1%
Simplified99.1%
Taylor expanded in y around inf 51.2%
Taylor expanded in x around 0 47.8%
Final simplification79.7%
(FPCore (x y z) :precision binary64 (if (or (<= x -1.45e+30) (not (<= x 2.0))) (* x 4.16438922228) (* z -0.0424927283095952)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1.45e+30) || !(x <= 2.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.45d+30)) .or. (.not. (x <= 2.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.45e+30) || !(x <= 2.0)) {
tmp = x * 4.16438922228;
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1.45e+30) or not (x <= 2.0): tmp = x * 4.16438922228 else: tmp = z * -0.0424927283095952 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -1.45e+30) || !(x <= 2.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.45e+30) || ~((x <= 2.0))) tmp = x * 4.16438922228; else tmp = z * -0.0424927283095952; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -1.45e+30], N[Not[LessEqual[x, 2.0]], $MachinePrecision]], N[(x * 4.16438922228), $MachinePrecision], N[(z * -0.0424927283095952), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.45 \cdot 10^{+30} \lor \neg \left(x \leq 2\right):\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{else}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\end{array}
\end{array}
if x < -1.4499999999999999e30 or 2 < x Initial program 14.4%
Simplified19.7%
Taylor expanded in x around inf 93.6%
*-commutative93.6%
Simplified93.6%
if -1.4499999999999999e30 < x < 2Initial program 99.7%
Simplified99.3%
Taylor expanded in x around 0 62.6%
Final simplification77.8%
(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%
Simplified60.2%
Taylor expanded in x around 0 33.2%
Final simplification33.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- (+ (/ y (* x x)) (* 4.16438922228 x)) 110.1139242984811)))
(if (< x -3.326128725870005e+62)
t_0
(if (< x 9.429991714554673e+55)
(*
(/ (- x 2.0) 1.0)
(/
(+
(*
(+
(* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x)
y)
x)
z)
(+
(*
(+
(+ (* 263.505074721 x) (+ (* 43.3400022514 (* x x)) (* x (* x x))))
313.399215894)
x)
47.066876606)))
t_0))))
double code(double x, double y, double z) {
double t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811;
double tmp;
if (x < -3.326128725870005e+62) {
tmp = t_0;
} else if (x < 9.429991714554673e+55) {
tmp = ((x - 2.0) / 1.0) * (((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / (((((263.505074721 * x) + ((43.3400022514 * (x * x)) + (x * (x * x)))) + 313.399215894) * x) + 47.066876606));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = ((y / (x * x)) + (4.16438922228d0 * x)) - 110.1139242984811d0
if (x < (-3.326128725870005d+62)) then
tmp = t_0
else if (x < 9.429991714554673d+55) then
tmp = ((x - 2.0d0) / 1.0d0) * (((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z) / (((((263.505074721d0 * x) + ((43.3400022514d0 * (x * x)) + (x * (x * x)))) + 313.399215894d0) * x) + 47.066876606d0))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811;
double tmp;
if (x < -3.326128725870005e+62) {
tmp = t_0;
} else if (x < 9.429991714554673e+55) {
tmp = ((x - 2.0) / 1.0) * (((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / (((((263.505074721 * x) + ((43.3400022514 * (x * x)) + (x * (x * x)))) + 313.399215894) * x) + 47.066876606));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811 tmp = 0 if x < -3.326128725870005e+62: tmp = t_0 elif x < 9.429991714554673e+55: tmp = ((x - 2.0) / 1.0) * (((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / (((((263.505074721 * x) + ((43.3400022514 * (x * x)) + (x * (x * x)))) + 313.399215894) * x) + 47.066876606)) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(y / Float64(x * x)) + Float64(4.16438922228 * x)) - 110.1139242984811) tmp = 0.0 if (x < -3.326128725870005e+62) tmp = t_0; elseif (x < 9.429991714554673e+55) tmp = Float64(Float64(Float64(x - 2.0) / 1.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / Float64(Float64(Float64(Float64(Float64(263.505074721 * x) + Float64(Float64(43.3400022514 * Float64(x * x)) + Float64(x * Float64(x * x)))) + 313.399215894) * x) + 47.066876606))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811; tmp = 0.0; if (x < -3.326128725870005e+62) tmp = t_0; elseif (x < 9.429991714554673e+55) tmp = ((x - 2.0) / 1.0) * (((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / (((((263.505074721 * x) + ((43.3400022514 * (x * x)) + (x * (x * x)))) + 313.399215894) * x) + 47.066876606)); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(4.16438922228 * x), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision]}, If[Less[x, -3.326128725870005e+62], t$95$0, If[Less[x, 9.429991714554673e+55], N[(N[(N[(x - 2.0), $MachinePrecision] / 1.0), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision] * x), $MachinePrecision] + 137.519416416), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision] / N[(N[(N[(N[(N[(263.505074721 * x), $MachinePrecision] + N[(N[(43.3400022514 * N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision] * x), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\frac{y}{x \cdot x} + 4.16438922228 \cdot x\right) - 110.1139242984811\\
\mathbf{if}\;x < -3.326128725870005 \cdot 10^{+62}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x < 9.429991714554673 \cdot 10^{+55}:\\
\;\;\;\;\frac{x - 2}{1} \cdot \frac{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}{\left(\left(263.505074721 \cdot x + \left(43.3400022514 \cdot \left(x \cdot x\right) + x \cdot \left(x \cdot x\right)\right)\right) + 313.399215894\right) \cdot x + 47.066876606}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
herbie shell --seed 2023322
(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)))