
(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 21 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))
5e+276)
(*
(+ 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)))
(+
70.37071397084
(-
(+ (* x 4.16438922228) (/ y (* x x)))
(+ (/ 19.8795684148 x) (/ 1580.1551497719765 (* x x)))))))
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)) <= 5e+276) {
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 = 70.37071397084 + (((x * 4.16438922228) + (y / (x * x))) - ((19.8795684148 / x) + (1580.1551497719765 / (x * x))));
}
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)) <= 5e+276) 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(70.37071397084 + Float64(Float64(Float64(x * 4.16438922228) + Float64(y / Float64(x * x))) - Float64(Float64(19.8795684148 / x) + Float64(1580.1551497719765 / Float64(x * x))))); 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], 5e+276], 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[(70.37071397084 + N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(19.8795684148 / x), $MachinePrecision] + N[(1580.1551497719765 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 5 \cdot 10^{+276}:\\
\;\;\;\;\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}:\\
\;\;\;\;70.37071397084 + \left(\left(x \cdot 4.16438922228 + \frac{y}{x \cdot x}\right) - \left(\frac{19.8795684148}{x} + \frac{1580.1551497719765}{x \cdot x}\right)\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < 5.00000000000000001e276Initial program 98.2%
associate-*r/99.5%
sub-neg99.5%
metadata-eval99.5%
*-commutative99.5%
fma-def99.5%
*-commutative99.5%
fma-def99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
*-commutative99.5%
Simplified99.6%
if 5.00000000000000001e276 < (/.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.4%
Taylor expanded in x around inf 0.4%
Taylor expanded in x around inf 97.6%
associate--l+97.6%
+-commutative97.6%
*-commutative97.6%
unpow297.6%
associate-*r/97.6%
metadata-eval97.6%
associate-*r/97.6%
metadata-eval97.6%
unpow297.6%
Simplified97.6%
Final simplification98.7%
(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) 5e+276)
(* (+ x -2.0) (+ (/ t_1 t_0) (/ z t_0)))
(+
70.37071397084
(-
(+ (* x 4.16438922228) (/ y (* x x)))
(+ (/ 19.8795684148 x) (/ 1580.1551497719765 (* x x))))))))
double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double t_1 = x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y);
double tmp;
if ((((x - 2.0) * (t_1 + z)) / t_0) <= 5e+276) {
tmp = (x + -2.0) * ((t_1 / t_0) + (z / t_0));
} else {
tmp = 70.37071397084 + (((x * 4.16438922228) + (y / (x * x))) - ((19.8795684148 / x) + (1580.1551497719765 / (x * x))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: 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) <= 5d+276) then
tmp = (x + (-2.0d0)) * ((t_1 / t_0) + (z / t_0))
else
tmp = 70.37071397084d0 + (((x * 4.16438922228d0) + (y / (x * x))) - ((19.8795684148d0 / x) + (1580.1551497719765d0 / (x * x))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double t_1 = x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y);
double tmp;
if ((((x - 2.0) * (t_1 + z)) / t_0) <= 5e+276) {
tmp = (x + -2.0) * ((t_1 / t_0) + (z / t_0));
} else {
tmp = 70.37071397084 + (((x * 4.16438922228) + (y / (x * x))) - ((19.8795684148 / x) + (1580.1551497719765 / (x * x))));
}
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) <= 5e+276: tmp = (x + -2.0) * ((t_1 / t_0) + (z / t_0)) else: tmp = 70.37071397084 + (((x * 4.16438922228) + (y / (x * x))) - ((19.8795684148 / x) + (1580.1551497719765 / (x * x)))) return tmp
function code(x, y, z) t_0 = Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) 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) <= 5e+276) tmp = Float64(Float64(x + -2.0) * Float64(Float64(t_1 / t_0) + Float64(z / t_0))); else tmp = Float64(70.37071397084 + Float64(Float64(Float64(x * 4.16438922228) + Float64(y / Float64(x * x))) - Float64(Float64(19.8795684148 / x) + Float64(1580.1551497719765 / Float64(x * x))))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606; 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) <= 5e+276) tmp = (x + -2.0) * ((t_1 / t_0) + (z / t_0)); else tmp = 70.37071397084 + (((x * 4.16438922228) + (y / (x * x))) - ((19.8795684148 / x) + (1580.1551497719765 / (x * x)))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]}, 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], 5e+276], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(t$95$1 / t$95$0), $MachinePrecision] + N[(z / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(70.37071397084 + N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(19.8795684148 / x), $MachinePrecision] + N[(1580.1551497719765 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606\\
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 5 \cdot 10^{+276}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(\frac{t_1}{t_0} + \frac{z}{t_0}\right)\\
\mathbf{else}:\\
\;\;\;\;70.37071397084 + \left(\left(x \cdot 4.16438922228 + \frac{y}{x \cdot x}\right) - \left(\frac{19.8795684148}{x} + \frac{1580.1551497719765}{x \cdot x}\right)\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < 5.00000000000000001e276Initial program 98.2%
associate-*r/99.5%
sub-neg99.5%
metadata-eval99.5%
*-commutative99.5%
fma-def99.5%
*-commutative99.5%
fma-def99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
*-commutative99.5%
Simplified99.6%
Taylor expanded in z around 0 99.6%
if 5.00000000000000001e276 < (/.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.4%
Taylor expanded in x around inf 0.4%
Taylor expanded in x around inf 97.6%
associate--l+97.6%
+-commutative97.6%
*-commutative97.6%
unpow297.6%
associate-*r/97.6%
metadata-eval97.6%
associate-*r/97.6%
metadata-eval97.6%
unpow297.6%
Simplified97.6%
Final simplification98.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(/
(*
(- 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))))
(if (<= t_0 5e+276)
t_0
(+
70.37071397084
(-
(+ (* x 4.16438922228) (/ y (* x x)))
(+ (/ 19.8795684148 x) (/ 1580.1551497719765 (* x x))))))))
double code(double x, double y, double z) {
double t_0 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
double tmp;
if (t_0 <= 5e+276) {
tmp = t_0;
} else {
tmp = 70.37071397084 + (((x * 4.16438922228) + (y / (x * x))) - ((19.8795684148 / x) + (1580.1551497719765 / (x * x))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = ((x - 2.0d0) * ((x * ((x * ((x * ((x * 4.16438922228d0) + 78.6994924154d0)) + 137.519416416d0)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0)
if (t_0 <= 5d+276) then
tmp = t_0
else
tmp = 70.37071397084d0 + (((x * 4.16438922228d0) + (y / (x * x))) - ((19.8795684148d0 / x) + (1580.1551497719765d0 / (x * x))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
double tmp;
if (t_0 <= 5e+276) {
tmp = t_0;
} else {
tmp = 70.37071397084 + (((x * 4.16438922228) + (y / (x * x))) - ((19.8795684148 / x) + (1580.1551497719765 / (x * x))));
}
return tmp;
}
def code(x, y, z): t_0 = ((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) tmp = 0 if t_0 <= 5e+276: tmp = t_0 else: tmp = 70.37071397084 + (((x * 4.16438922228) + (y / (x * x))) - ((19.8795684148 / x) + (1580.1551497719765 / (x * x)))) return tmp
function code(x, y, z) t_0 = 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)) tmp = 0.0 if (t_0 <= 5e+276) tmp = t_0; else tmp = Float64(70.37071397084 + Float64(Float64(Float64(x * 4.16438922228) + Float64(y / Float64(x * x))) - Float64(Float64(19.8795684148 / x) + Float64(1580.1551497719765 / Float64(x * x))))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((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); tmp = 0.0; if (t_0 <= 5e+276) tmp = t_0; else tmp = 70.37071397084 + (((x * 4.16438922228) + (y / (x * x))) - ((19.8795684148 / x) + (1580.1551497719765 / (x * x)))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(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]}, If[LessEqual[t$95$0, 5e+276], t$95$0, N[(70.37071397084 + N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(19.8795684148 / x), $MachinePrecision] + N[(1580.1551497719765 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \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}\\
\mathbf{if}\;t_0 \leq 5 \cdot 10^{+276}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;70.37071397084 + \left(\left(x \cdot 4.16438922228 + \frac{y}{x \cdot x}\right) - \left(\frac{19.8795684148}{x} + \frac{1580.1551497719765}{x \cdot x}\right)\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < 5.00000000000000001e276Initial program 98.2%
if 5.00000000000000001e276 < (/.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.4%
Taylor expanded in x around inf 0.4%
Taylor expanded in x around inf 97.6%
associate--l+97.6%
+-commutative97.6%
*-commutative97.6%
unpow297.6%
associate-*r/97.6%
metadata-eval97.6%
associate-*r/97.6%
metadata-eval97.6%
unpow297.6%
Simplified97.6%
Final simplification97.9%
(FPCore (x y z)
:precision binary64
(if (or (<= x -6.4e+59) (not (<= x 2.7e+51)))
(+
70.37071397084
(-
(+ (* x 4.16438922228) (/ y (* x x)))
(+ (/ 19.8795684148 x) (/ 1580.1551497719765 (* x x)))))
(/
(*
(- x 2.0)
(+
(*
x
(+
(* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
z))
(+ 47.066876606 (* x (+ 313.399215894 (* (+ x 43.3400022514) (* x x))))))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -6.4e+59) || !(x <= 2.7e+51)) {
tmp = 70.37071397084 + (((x * 4.16438922228) + (y / (x * x))) - ((19.8795684148 / x) + (1580.1551497719765 / (x * x))));
} else {
tmp = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / (47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (x * x)))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-6.4d+59)) .or. (.not. (x <= 2.7d+51))) then
tmp = 70.37071397084d0 + (((x * 4.16438922228d0) + (y / (x * x))) - ((19.8795684148d0 / x) + (1580.1551497719765d0 / (x * x))))
else
tmp = ((x - 2.0d0) * ((x * ((x * ((x * ((x * 4.16438922228d0) + 78.6994924154d0)) + 137.519416416d0)) + y)) + z)) / (47.066876606d0 + (x * (313.399215894d0 + ((x + 43.3400022514d0) * (x * x)))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -6.4e+59) || !(x <= 2.7e+51)) {
tmp = 70.37071397084 + (((x * 4.16438922228) + (y / (x * x))) - ((19.8795684148 / x) + (1580.1551497719765 / (x * x))));
} else {
tmp = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / (47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (x * x)))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -6.4e+59) or not (x <= 2.7e+51): tmp = 70.37071397084 + (((x * 4.16438922228) + (y / (x * x))) - ((19.8795684148 / x) + (1580.1551497719765 / (x * x)))) else: tmp = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / (47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (x * x))))) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -6.4e+59) || !(x <= 2.7e+51)) tmp = Float64(70.37071397084 + Float64(Float64(Float64(x * 4.16438922228) + Float64(y / Float64(x * x))) - Float64(Float64(19.8795684148 / x) + Float64(1580.1551497719765 / Float64(x * x))))); else tmp = Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(Float64(x + 43.3400022514) * Float64(x * x)))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -6.4e+59) || ~((x <= 2.7e+51))) tmp = 70.37071397084 + (((x * 4.16438922228) + (y / (x * x))) - ((19.8795684148 / x) + (1580.1551497719765 / (x * x)))); else tmp = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / (47.066876606 + (x * (313.399215894 + ((x + 43.3400022514) * (x * x))))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -6.4e+59], N[Not[LessEqual[x, 2.7e+51]], $MachinePrecision]], N[(70.37071397084 + N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(19.8795684148 / x), $MachinePrecision] + N[(1580.1551497719765 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(47.066876606 + N[(x * N[(313.399215894 + N[(N[(x + 43.3400022514), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.4 \cdot 10^{+59} \lor \neg \left(x \leq 2.7 \cdot 10^{+51}\right):\\
\;\;\;\;70.37071397084 + \left(\left(x \cdot 4.16438922228 + \frac{y}{x \cdot x}\right) - \left(\frac{19.8795684148}{x} + \frac{1580.1551497719765}{x \cdot x}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{47.066876606 + x \cdot \left(313.399215894 + \left(x + 43.3400022514\right) \cdot \left(x \cdot x\right)\right)}\\
\end{array}
\end{array}
if x < -6.39999999999999964e59 or 2.69999999999999992e51 < x Initial program 2.1%
Taylor expanded in x around inf 2.1%
Taylor expanded in x around inf 97.6%
associate--l+97.6%
+-commutative97.6%
*-commutative97.6%
unpow297.6%
associate-*r/97.6%
metadata-eval97.6%
associate-*r/97.6%
metadata-eval97.6%
unpow297.6%
Simplified97.6%
if -6.39999999999999964e59 < x < 2.69999999999999992e51Initial program 98.9%
Taylor expanded in x around inf 97.6%
cube-mult97.6%
unpow297.6%
distribute-rgt-out97.6%
+-commutative97.6%
unpow297.6%
Simplified97.6%
Final simplification97.6%
(FPCore (x y z)
:precision binary64
(if (or (<= x -9.6e+20) (not (<= x 235000000.0)))
(+
70.37071397084
(-
(+ (* x 4.16438922228) (/ y (* x x)))
(+ (/ 19.8795684148 x) (/ 1580.1551497719765 (* x x)))))
(/
(* (- x 2.0) (+ z (* x (+ y (* x 137.519416416)))))
(+
(* x (+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -9.6e+20) || !(x <= 235000000.0)) {
tmp = 70.37071397084 + (((x * 4.16438922228) + (y / (x * x))) - ((19.8795684148 / x) + (1580.1551497719765 / (x * x))));
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-9.6d+20)) .or. (.not. (x <= 235000000.0d0))) then
tmp = 70.37071397084d0 + (((x * 4.16438922228d0) + (y / (x * x))) - ((19.8795684148d0 / x) + (1580.1551497719765d0 / (x * x))))
else
tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -9.6e+20) || !(x <= 235000000.0)) {
tmp = 70.37071397084 + (((x * 4.16438922228) + (y / (x * x))) - ((19.8795684148 / x) + (1580.1551497719765 / (x * x))));
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -9.6e+20) or not (x <= 235000000.0): tmp = 70.37071397084 + (((x * 4.16438922228) + (y / (x * x))) - ((19.8795684148 / x) + (1580.1551497719765 / (x * x)))) else: tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -9.6e+20) || !(x <= 235000000.0)) tmp = Float64(70.37071397084 + Float64(Float64(Float64(x * 4.16438922228) + Float64(y / Float64(x * x))) - Float64(Float64(19.8795684148 / x) + Float64(1580.1551497719765 / Float64(x * x))))); else tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * 137.519416416))))) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -9.6e+20) || ~((x <= 235000000.0))) tmp = 70.37071397084 + (((x * 4.16438922228) + (y / (x * x))) - ((19.8795684148 / x) + (1580.1551497719765 / (x * x)))); else tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -9.6e+20], N[Not[LessEqual[x, 235000000.0]], $MachinePrecision]], N[(70.37071397084 + N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(19.8795684148 / x), $MachinePrecision] + N[(1580.1551497719765 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * 137.519416416), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.6 \cdot 10^{+20} \lor \neg \left(x \leq 235000000\right):\\
\;\;\;\;70.37071397084 + \left(\left(x \cdot 4.16438922228 + \frac{y}{x \cdot x}\right) - \left(\frac{19.8795684148}{x} + \frac{1580.1551497719765}{x \cdot x}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\\
\end{array}
\end{array}
if x < -9.6e20 or 2.35e8 < x Initial program 12.4%
Taylor expanded in x around inf 12.1%
Taylor expanded in x around inf 95.9%
associate--l+95.9%
+-commutative95.9%
*-commutative95.9%
unpow295.9%
associate-*r/95.9%
metadata-eval95.9%
associate-*r/95.9%
metadata-eval95.9%
unpow295.9%
Simplified95.9%
if -9.6e20 < x < 2.35e8Initial program 99.6%
Taylor expanded in x around 0 98.9%
*-commutative98.9%
Simplified98.9%
Final simplification97.4%
(FPCore (x y z)
:precision binary64
(if (or (<= x -1.35) (not (<= x 1.15e-27)))
(*
(+ x -2.0)
(+
4.16438922228
(/
z
(+
47.066876606
(* x (+ 313.399215894 (* x (* x (+ x 43.3400022514)))))))))
(/
(* (- x 2.0) (+ z (* x (+ y (* x 137.519416416)))))
(+ 47.066876606 (* x 313.399215894)))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1.35) || !(x <= 1.15e-27)) {
tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + (x * (x * (x + 43.3400022514))))))));
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894));
}
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.35d0)) .or. (.not. (x <= 1.15d-27))) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 + (z / (47.066876606d0 + (x * (313.399215894d0 + (x * (x * (x + 43.3400022514d0))))))))
else
tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / (47.066876606d0 + (x * 313.399215894d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -1.35) || !(x <= 1.15e-27)) {
tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + (x * (x * (x + 43.3400022514))))))));
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1.35) or not (x <= 1.15e-27): tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + (x * (x * (x + 43.3400022514)))))))) else: tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894)) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -1.35) || !(x <= 1.15e-27)) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(z / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * Float64(x * Float64(x + 43.3400022514))))))))); else tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * 137.519416416))))) / Float64(47.066876606 + Float64(x * 313.399215894))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -1.35) || ~((x <= 1.15e-27))) tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + (x * (x * (x + 43.3400022514)))))))); else tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -1.35], N[Not[LessEqual[x, 1.15e-27]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(z / N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * 137.519416416), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(47.066876606 + N[(x * 313.399215894), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.35 \lor \neg \left(x \leq 1.15 \cdot 10^{-27}\right):\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{z}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(x \cdot \left(x + 43.3400022514\right)\right)\right)}\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 313.399215894}\\
\end{array}
\end{array}
if x < -1.3500000000000001 or 1.15e-27 < x Initial program 18.4%
associate-*r/24.5%
sub-neg24.5%
metadata-eval24.5%
*-commutative24.5%
fma-def24.5%
*-commutative24.5%
fma-def24.5%
*-commutative24.5%
fma-def24.5%
fma-def24.5%
*-commutative24.5%
Simplified24.5%
Taylor expanded in z around 0 24.5%
Taylor expanded in x around inf 90.6%
Taylor expanded in x around inf 70.0%
cube-mult70.0%
unpow270.0%
distribute-rgt-out89.5%
unpow289.5%
associate-*r*89.5%
+-commutative89.5%
Simplified89.5%
if -1.3500000000000001 < x < 1.15e-27Initial 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 simplification94.1%
(FPCore (x y z)
:precision binary64
(if (or (<= x -1.35) (not (<= x 400.0)))
(+
70.37071397084
(-
(+ (* x 4.16438922228) (/ y (* x x)))
(+ (/ 19.8795684148 x) (/ 1580.1551497719765 (* x x)))))
(/
(* (- x 2.0) (+ z (* x (+ y (* x 137.519416416)))))
(+ 47.066876606 (* x 313.399215894)))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1.35) || !(x <= 400.0)) {
tmp = 70.37071397084 + (((x * 4.16438922228) + (y / (x * x))) - ((19.8795684148 / x) + (1580.1551497719765 / (x * x))));
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894));
}
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.35d0)) .or. (.not. (x <= 400.0d0))) then
tmp = 70.37071397084d0 + (((x * 4.16438922228d0) + (y / (x * x))) - ((19.8795684148d0 / x) + (1580.1551497719765d0 / (x * x))))
else
tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / (47.066876606d0 + (x * 313.399215894d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -1.35) || !(x <= 400.0)) {
tmp = 70.37071397084 + (((x * 4.16438922228) + (y / (x * x))) - ((19.8795684148 / x) + (1580.1551497719765 / (x * x))));
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1.35) or not (x <= 400.0): tmp = 70.37071397084 + (((x * 4.16438922228) + (y / (x * x))) - ((19.8795684148 / x) + (1580.1551497719765 / (x * x)))) else: tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894)) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -1.35) || !(x <= 400.0)) tmp = Float64(70.37071397084 + Float64(Float64(Float64(x * 4.16438922228) + Float64(y / Float64(x * x))) - Float64(Float64(19.8795684148 / x) + Float64(1580.1551497719765 / Float64(x * x))))); else tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * 137.519416416))))) / Float64(47.066876606 + Float64(x * 313.399215894))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -1.35) || ~((x <= 400.0))) tmp = 70.37071397084 + (((x * 4.16438922228) + (y / (x * x))) - ((19.8795684148 / x) + (1580.1551497719765 / (x * x)))); else tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -1.35], N[Not[LessEqual[x, 400.0]], $MachinePrecision]], N[(70.37071397084 + N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(19.8795684148 / x), $MachinePrecision] + N[(1580.1551497719765 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * 137.519416416), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(47.066876606 + N[(x * 313.399215894), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.35 \lor \neg \left(x \leq 400\right):\\
\;\;\;\;70.37071397084 + \left(\left(x \cdot 4.16438922228 + \frac{y}{x \cdot x}\right) - \left(\frac{19.8795684148}{x} + \frac{1580.1551497719765}{x \cdot x}\right)\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 313.399215894}\\
\end{array}
\end{array}
if x < -1.3500000000000001 or 400 < x Initial program 14.9%
Taylor expanded in x around inf 13.6%
Taylor expanded in x around inf 94.0%
associate--l+94.0%
+-commutative94.0%
*-commutative94.0%
unpow294.0%
associate-*r/94.0%
metadata-eval94.0%
associate-*r/94.0%
metadata-eval94.0%
unpow294.0%
Simplified94.0%
if -1.3500000000000001 < x < 400Initial program 99.7%
Taylor expanded in x around 0 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 98.3%
*-commutative98.3%
Simplified98.3%
Final simplification96.0%
(FPCore (x y z)
:precision binary64
(if (<= x -1.35)
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x)))
(if (<= x 5200.0)
(/
(* (- x 2.0) (+ z (* x (+ y (* x 137.519416416)))))
(+ 47.066876606 (* x 313.399215894)))
(/ (+ x -2.0) 0.24013125253755718))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.35) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else if (x <= 5200.0) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894));
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1.35d0)) then
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
else if (x <= 5200.0d0) then
tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / (47.066876606d0 + (x * 313.399215894d0))
else
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1.35) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else if (x <= 5200.0) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894));
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.35: tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) elif x <= 5200.0: tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894)) else: tmp = (x + -2.0) / 0.24013125253755718 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.35) tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); elseif (x <= 5200.0) tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * 137.519416416))))) / Float64(47.066876606 + Float64(x * 313.399215894))); else tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.35) tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); elseif (x <= 5200.0) tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * 313.399215894)); else tmp = (x + -2.0) / 0.24013125253755718; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.35], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5200.0], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * 137.519416416), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(47.066876606 + N[(x * 313.399215894), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.35:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\mathbf{elif}\;x \leq 5200:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{47.066876606 + x \cdot 313.399215894}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\end{array}
\end{array}
if x < -1.3500000000000001Initial program 17.5%
associate-/l*20.5%
sub-neg20.5%
metadata-eval20.5%
fma-def20.5%
fma-def20.5%
fma-def20.5%
fma-def20.5%
fma-def20.5%
fma-def20.5%
fma-def20.5%
Simplified20.5%
Taylor expanded in x around inf 84.1%
associate-*r/84.1%
metadata-eval84.1%
Simplified84.1%
if -1.3500000000000001 < x < 5200Initial program 99.7%
Taylor expanded in x around 0 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 98.3%
*-commutative98.3%
Simplified98.3%
if 5200 < x Initial program 12.7%
associate-/l*21.8%
sub-neg21.8%
metadata-eval21.8%
fma-def21.8%
fma-def21.8%
fma-def21.8%
fma-def21.8%
fma-def21.8%
fma-def21.8%
fma-def21.8%
Simplified21.8%
Taylor expanded in x around inf 88.6%
Final simplification92.0%
(FPCore (x y z)
:precision binary64
(if (<= x -560000000.0)
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x)))
(if (<= x 1.95)
(*
(+ x -2.0)
(+
(* z 0.0212463641547976)
(* x (- (* y 0.0212463641547976) (* z 0.14147091005106402)))))
(/ (+ x -2.0) 0.24013125253755718))))
double code(double x, double y, double z) {
double tmp;
if (x <= -560000000.0) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else if (x <= 1.95) {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402))));
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-560000000.0d0)) then
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
else if (x <= 1.95d0) then
tmp = (x + (-2.0d0)) * ((z * 0.0212463641547976d0) + (x * ((y * 0.0212463641547976d0) - (z * 0.14147091005106402d0))))
else
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -560000000.0) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else if (x <= 1.95) {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402))));
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -560000000.0: tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) elif x <= 1.95: tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402)))) else: tmp = (x + -2.0) / 0.24013125253755718 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -560000000.0) tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); elseif (x <= 1.95) tmp = Float64(Float64(x + -2.0) * Float64(Float64(z * 0.0212463641547976) + Float64(x * Float64(Float64(y * 0.0212463641547976) - Float64(z * 0.14147091005106402))))); else tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -560000000.0) tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); elseif (x <= 1.95) tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402)))); else tmp = (x + -2.0) / 0.24013125253755718; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -560000000.0], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.95], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(z * 0.0212463641547976), $MachinePrecision] + N[(x * N[(N[(y * 0.0212463641547976), $MachinePrecision] - N[(z * 0.14147091005106402), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -560000000:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\mathbf{elif}\;x \leq 1.95:\\
\;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976 + x \cdot \left(y \cdot 0.0212463641547976 - z \cdot 0.14147091005106402\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\end{array}
\end{array}
if x < -5.6e8Initial program 14.8%
associate-/l*17.9%
sub-neg17.9%
metadata-eval17.9%
fma-def17.9%
fma-def17.9%
fma-def17.9%
fma-def17.9%
fma-def17.9%
fma-def17.9%
fma-def17.9%
Simplified17.9%
Taylor expanded in x around inf 86.8%
associate-*r/86.8%
metadata-eval86.8%
Simplified86.8%
if -5.6e8 < x < 1.94999999999999996Initial program 99.7%
associate-*r/99.7%
sub-neg99.7%
metadata-eval99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 93.3%
if 1.94999999999999996 < x Initial program 13.8%
associate-/l*22.8%
sub-neg22.8%
metadata-eval22.8%
fma-def22.8%
fma-def22.8%
fma-def22.9%
fma-def22.9%
fma-def22.9%
fma-def22.9%
fma-def22.9%
Simplified22.9%
Taylor expanded in x around inf 87.5%
Final simplification90.1%
(FPCore (x y z)
:precision binary64
(if (<= x -320000.0)
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x)))
(if (<= x 1050.0)
(*
(+ x -2.0)
(+
(* 0.0212463641547976 (* x y))
(/ z (+ 47.066876606 (* x 313.399215894)))))
(/ (+ x -2.0) 0.24013125253755718))))
double code(double x, double y, double z) {
double tmp;
if (x <= -320000.0) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else if (x <= 1050.0) {
tmp = (x + -2.0) * ((0.0212463641547976 * (x * y)) + (z / (47.066876606 + (x * 313.399215894))));
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-320000.0d0)) then
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
else if (x <= 1050.0d0) then
tmp = (x + (-2.0d0)) * ((0.0212463641547976d0 * (x * y)) + (z / (47.066876606d0 + (x * 313.399215894d0))))
else
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -320000.0) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else if (x <= 1050.0) {
tmp = (x + -2.0) * ((0.0212463641547976 * (x * y)) + (z / (47.066876606 + (x * 313.399215894))));
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -320000.0: tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) elif x <= 1050.0: tmp = (x + -2.0) * ((0.0212463641547976 * (x * y)) + (z / (47.066876606 + (x * 313.399215894)))) else: tmp = (x + -2.0) / 0.24013125253755718 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -320000.0) tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); elseif (x <= 1050.0) tmp = Float64(Float64(x + -2.0) * Float64(Float64(0.0212463641547976 * Float64(x * y)) + Float64(z / Float64(47.066876606 + Float64(x * 313.399215894))))); else tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -320000.0) tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); elseif (x <= 1050.0) tmp = (x + -2.0) * ((0.0212463641547976 * (x * y)) + (z / (47.066876606 + (x * 313.399215894)))); else tmp = (x + -2.0) / 0.24013125253755718; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -320000.0], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1050.0], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(0.0212463641547976 * N[(x * y), $MachinePrecision]), $MachinePrecision] + N[(z / N[(47.066876606 + N[(x * 313.399215894), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -320000:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\mathbf{elif}\;x \leq 1050:\\
\;\;\;\;\left(x + -2\right) \cdot \left(0.0212463641547976 \cdot \left(x \cdot y\right) + \frac{z}{47.066876606 + x \cdot 313.399215894}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\end{array}
\end{array}
if x < -3.2e5Initial program 16.2%
associate-/l*19.2%
sub-neg19.2%
metadata-eval19.2%
fma-def19.2%
fma-def19.2%
fma-def19.3%
fma-def19.3%
fma-def19.3%
fma-def19.3%
fma-def19.3%
Simplified19.3%
Taylor expanded in x around inf 85.4%
associate-*r/85.4%
metadata-eval85.4%
Simplified85.4%
if -3.2e5 < x < 1050Initial program 99.7%
associate-*r/99.7%
sub-neg99.7%
metadata-eval99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in z around 0 99.7%
Taylor expanded in x around 0 95.0%
Taylor expanded in x around 0 93.6%
*-commutative67.6%
Simplified93.6%
if 1050 < x Initial program 12.7%
associate-/l*21.8%
sub-neg21.8%
metadata-eval21.8%
fma-def21.8%
fma-def21.8%
fma-def21.8%
fma-def21.8%
fma-def21.8%
fma-def21.8%
fma-def21.8%
Simplified21.8%
Taylor expanded in x around inf 88.6%
Final simplification90.2%
(FPCore (x y z)
:precision binary64
(if (<= x -560000000.0)
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x)))
(if (<= x 450.0)
(* (+ x -2.0) (+ (* 0.0212463641547976 (* x y)) (* z 0.0212463641547976)))
(/ (+ x -2.0) 0.24013125253755718))))
double code(double x, double y, double z) {
double tmp;
if (x <= -560000000.0) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else if (x <= 450.0) {
tmp = (x + -2.0) * ((0.0212463641547976 * (x * y)) + (z * 0.0212463641547976));
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-560000000.0d0)) then
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
else if (x <= 450.0d0) then
tmp = (x + (-2.0d0)) * ((0.0212463641547976d0 * (x * y)) + (z * 0.0212463641547976d0))
else
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -560000000.0) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else if (x <= 450.0) {
tmp = (x + -2.0) * ((0.0212463641547976 * (x * y)) + (z * 0.0212463641547976));
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -560000000.0: tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) elif x <= 450.0: tmp = (x + -2.0) * ((0.0212463641547976 * (x * y)) + (z * 0.0212463641547976)) else: tmp = (x + -2.0) / 0.24013125253755718 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -560000000.0) tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); elseif (x <= 450.0) tmp = Float64(Float64(x + -2.0) * Float64(Float64(0.0212463641547976 * Float64(x * y)) + Float64(z * 0.0212463641547976))); else tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -560000000.0) tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); elseif (x <= 450.0) tmp = (x + -2.0) * ((0.0212463641547976 * (x * y)) + (z * 0.0212463641547976)); else tmp = (x + -2.0) / 0.24013125253755718; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -560000000.0], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 450.0], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(0.0212463641547976 * N[(x * y), $MachinePrecision]), $MachinePrecision] + N[(z * 0.0212463641547976), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -560000000:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\mathbf{elif}\;x \leq 450:\\
\;\;\;\;\left(x + -2\right) \cdot \left(0.0212463641547976 \cdot \left(x \cdot y\right) + z \cdot 0.0212463641547976\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\end{array}
\end{array}
if x < -5.6e8Initial program 14.8%
associate-/l*17.9%
sub-neg17.9%
metadata-eval17.9%
fma-def17.9%
fma-def17.9%
fma-def17.9%
fma-def17.9%
fma-def17.9%
fma-def17.9%
fma-def17.9%
Simplified17.9%
Taylor expanded in x around inf 86.8%
associate-*r/86.8%
metadata-eval86.8%
Simplified86.8%
if -5.6e8 < x < 450Initial program 99.6%
associate-*r/99.7%
sub-neg99.7%
metadata-eval99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in z around 0 99.7%
Taylor expanded in x around 0 95.0%
Taylor expanded in x around 0 92.2%
if 450 < x Initial program 12.7%
associate-/l*21.8%
sub-neg21.8%
metadata-eval21.8%
fma-def21.8%
fma-def21.8%
fma-def21.8%
fma-def21.8%
fma-def21.8%
fma-def21.8%
fma-def21.8%
Simplified21.8%
Taylor expanded in x around inf 88.6%
Final simplification89.9%
(FPCore (x y z)
:precision binary64
(if (<= x -320000.0)
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x)))
(if (<= x 400.0)
(* (+ x -2.0) (/ z (+ 47.066876606 (* x 313.399215894))))
(/ (+ x -2.0) 0.24013125253755718))))
double code(double x, double y, double z) {
double tmp;
if (x <= -320000.0) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else if (x <= 400.0) {
tmp = (x + -2.0) * (z / (47.066876606 + (x * 313.399215894)));
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-320000.0d0)) then
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
else if (x <= 400.0d0) then
tmp = (x + (-2.0d0)) * (z / (47.066876606d0 + (x * 313.399215894d0)))
else
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -320000.0) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else if (x <= 400.0) {
tmp = (x + -2.0) * (z / (47.066876606 + (x * 313.399215894)));
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -320000.0: tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) elif x <= 400.0: tmp = (x + -2.0) * (z / (47.066876606 + (x * 313.399215894))) else: tmp = (x + -2.0) / 0.24013125253755718 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -320000.0) tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); elseif (x <= 400.0) tmp = Float64(Float64(x + -2.0) * Float64(z / Float64(47.066876606 + Float64(x * 313.399215894)))); else tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -320000.0) tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); elseif (x <= 400.0) tmp = (x + -2.0) * (z / (47.066876606 + (x * 313.399215894))); else tmp = (x + -2.0) / 0.24013125253755718; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -320000.0], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 400.0], N[(N[(x + -2.0), $MachinePrecision] * N[(z / N[(47.066876606 + N[(x * 313.399215894), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -320000:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\mathbf{elif}\;x \leq 400:\\
\;\;\;\;\left(x + -2\right) \cdot \frac{z}{47.066876606 + x \cdot 313.399215894}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\end{array}
\end{array}
if x < -3.2e5Initial program 16.2%
associate-/l*19.2%
sub-neg19.2%
metadata-eval19.2%
fma-def19.2%
fma-def19.2%
fma-def19.3%
fma-def19.3%
fma-def19.3%
fma-def19.3%
fma-def19.3%
Simplified19.3%
Taylor expanded in x around inf 85.4%
associate-*r/85.4%
metadata-eval85.4%
Simplified85.4%
if -3.2e5 < x < 400Initial program 99.7%
associate-*r/99.7%
sub-neg99.7%
metadata-eval99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in z around inf 68.9%
Taylor expanded in x around 0 67.6%
*-commutative67.6%
Simplified67.6%
if 400 < x Initial program 12.7%
associate-/l*21.8%
sub-neg21.8%
metadata-eval21.8%
fma-def21.8%
fma-def21.8%
fma-def21.8%
fma-def21.8%
fma-def21.8%
fma-def21.8%
fma-def21.8%
Simplified21.8%
Taylor expanded in x around inf 88.6%
Final simplification77.9%
(FPCore (x y z) :precision binary64 (if (or (<= x -2.55e-31) (not (<= x 460.0))) (/ (+ x -2.0) 0.24013125253755718) (* (+ x -2.0) (* z 0.0212463641547976))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -2.55e-31) || !(x <= 460.0)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = (x + -2.0) * (z * 0.0212463641547976);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-2.55d-31)) .or. (.not. (x <= 460.0d0))) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else
tmp = (x + (-2.0d0)) * (z * 0.0212463641547976d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -2.55e-31) || !(x <= 460.0)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = (x + -2.0) * (z * 0.0212463641547976);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -2.55e-31) or not (x <= 460.0): tmp = (x + -2.0) / 0.24013125253755718 else: tmp = (x + -2.0) * (z * 0.0212463641547976) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -2.55e-31) || !(x <= 460.0)) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); else tmp = Float64(Float64(x + -2.0) * Float64(z * 0.0212463641547976)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -2.55e-31) || ~((x <= 460.0))) tmp = (x + -2.0) / 0.24013125253755718; else tmp = (x + -2.0) * (z * 0.0212463641547976); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -2.55e-31], N[Not[LessEqual[x, 460.0]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(z * 0.0212463641547976), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.55 \cdot 10^{-31} \lor \neg \left(x \leq 460\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976\right)\\
\end{array}
\end{array}
if x < -2.5499999999999999e-31 or 460 < x Initial program 16.7%
associate-/l*22.9%
sub-neg22.9%
metadata-eval22.9%
fma-def22.9%
fma-def22.9%
fma-def22.9%
fma-def22.9%
fma-def22.9%
fma-def22.9%
fma-def22.9%
Simplified22.9%
Taylor expanded in x around inf 84.6%
if -2.5499999999999999e-31 < x < 460Initial program 99.7%
associate-*r/99.7%
sub-neg99.7%
metadata-eval99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 69.0%
Final simplification77.5%
(FPCore (x y z) :precision binary64 (if (or (<= x -2.55e-31) (not (<= x 400.0))) (/ (+ x -2.0) 0.24013125253755718) (/ (+ x -2.0) (/ 47.066876606 z))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -2.55e-31) || !(x <= 400.0)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = (x + -2.0) / (47.066876606 / z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-2.55d-31)) .or. (.not. (x <= 400.0d0))) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else
tmp = (x + (-2.0d0)) / (47.066876606d0 / z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -2.55e-31) || !(x <= 400.0)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = (x + -2.0) / (47.066876606 / z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -2.55e-31) or not (x <= 400.0): tmp = (x + -2.0) / 0.24013125253755718 else: tmp = (x + -2.0) / (47.066876606 / z) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -2.55e-31) || !(x <= 400.0)) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); else tmp = Float64(Float64(x + -2.0) / Float64(47.066876606 / z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -2.55e-31) || ~((x <= 400.0))) tmp = (x + -2.0) / 0.24013125253755718; else tmp = (x + -2.0) / (47.066876606 / z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -2.55e-31], N[Not[LessEqual[x, 400.0]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / N[(47.066876606 / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.55 \cdot 10^{-31} \lor \neg \left(x \leq 400\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{\frac{47.066876606}{z}}\\
\end{array}
\end{array}
if x < -2.5499999999999999e-31 or 400 < x Initial program 16.7%
associate-/l*22.9%
sub-neg22.9%
metadata-eval22.9%
fma-def22.9%
fma-def22.9%
fma-def22.9%
fma-def22.9%
fma-def22.9%
fma-def22.9%
fma-def22.9%
Simplified22.9%
Taylor expanded in x around inf 84.6%
if -2.5499999999999999e-31 < x < 400Initial program 99.7%
associate-/l*99.6%
sub-neg99.6%
metadata-eval99.6%
fma-def99.6%
fma-def99.6%
fma-def99.6%
fma-def99.6%
fma-def99.6%
fma-def99.6%
fma-def99.6%
Simplified99.6%
Taylor expanded in x around 0 69.2%
Final simplification77.5%
(FPCore (x y z)
:precision binary64
(if (<= x -560000000.0)
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x)))
(if (<= x 400.0)
(/ (+ x -2.0) (/ 47.066876606 z))
(/ (+ x -2.0) 0.24013125253755718))))
double code(double x, double y, double z) {
double tmp;
if (x <= -560000000.0) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else if (x <= 400.0) {
tmp = (x + -2.0) / (47.066876606 / z);
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-560000000.0d0)) then
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
else if (x <= 400.0d0) then
tmp = (x + (-2.0d0)) / (47.066876606d0 / z)
else
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -560000000.0) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else if (x <= 400.0) {
tmp = (x + -2.0) / (47.066876606 / z);
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -560000000.0: tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) elif x <= 400.0: tmp = (x + -2.0) / (47.066876606 / z) else: tmp = (x + -2.0) / 0.24013125253755718 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -560000000.0) tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); elseif (x <= 400.0) tmp = Float64(Float64(x + -2.0) / Float64(47.066876606 / z)); else tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -560000000.0) tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); elseif (x <= 400.0) tmp = (x + -2.0) / (47.066876606 / z); else tmp = (x + -2.0) / 0.24013125253755718; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -560000000.0], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 400.0], N[(N[(x + -2.0), $MachinePrecision] / N[(47.066876606 / z), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -560000000:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\mathbf{elif}\;x \leq 400:\\
\;\;\;\;\frac{x + -2}{\frac{47.066876606}{z}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\end{array}
\end{array}
if x < -5.6e8Initial program 14.8%
associate-/l*17.9%
sub-neg17.9%
metadata-eval17.9%
fma-def17.9%
fma-def17.9%
fma-def17.9%
fma-def17.9%
fma-def17.9%
fma-def17.9%
fma-def17.9%
Simplified17.9%
Taylor expanded in x around inf 86.8%
associate-*r/86.8%
metadata-eval86.8%
Simplified86.8%
if -5.6e8 < x < 400Initial program 99.6%
associate-/l*99.6%
sub-neg99.6%
metadata-eval99.6%
fma-def99.6%
fma-def99.6%
fma-def99.6%
fma-def99.6%
fma-def99.6%
fma-def99.6%
fma-def99.6%
Simplified99.6%
Taylor expanded in x around 0 66.4%
if 400 < x Initial program 12.7%
associate-/l*21.8%
sub-neg21.8%
metadata-eval21.8%
fma-def21.8%
fma-def21.8%
fma-def21.8%
fma-def21.8%
fma-def21.8%
fma-def21.8%
fma-def21.8%
Simplified21.8%
Taylor expanded in x around inf 88.6%
Final simplification77.6%
(FPCore (x y z) :precision binary64 (if (or (<= x -2.55e-31) (not (<= x 2.0))) (/ (+ x -2.0) 0.24013125253755718) (* z -0.0424927283095952)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -2.55e-31) || !(x <= 2.0)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-2.55d-31)) .or. (.not. (x <= 2.0d0))) then
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
else
tmp = z * (-0.0424927283095952d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -2.55e-31) || !(x <= 2.0)) {
tmp = (x + -2.0) / 0.24013125253755718;
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -2.55e-31) or not (x <= 2.0): tmp = (x + -2.0) / 0.24013125253755718 else: tmp = z * -0.0424927283095952 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -2.55e-31) || !(x <= 2.0)) tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); else tmp = Float64(z * -0.0424927283095952); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -2.55e-31) || ~((x <= 2.0))) tmp = (x + -2.0) / 0.24013125253755718; else tmp = z * -0.0424927283095952; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -2.55e-31], N[Not[LessEqual[x, 2.0]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision], N[(z * -0.0424927283095952), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.55 \cdot 10^{-31} \lor \neg \left(x \leq 2\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\mathbf{else}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\end{array}
\end{array}
if x < -2.5499999999999999e-31 or 2 < x Initial program 17.3%
associate-/l*23.4%
sub-neg23.4%
metadata-eval23.4%
fma-def23.4%
fma-def23.4%
fma-def23.4%
fma-def23.4%
fma-def23.4%
fma-def23.4%
fma-def23.4%
Simplified23.4%
Taylor expanded in x around inf 84.0%
if -2.5499999999999999e-31 < x < 2Initial program 99.7%
associate-*r/99.7%
sub-neg99.7%
metadata-eval99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 69.5%
*-commutative69.5%
Simplified69.5%
Final simplification77.4%
(FPCore (x y z)
:precision binary64
(if (<= x -2.55e-31)
(* x 4.16438922228)
(if (<= x 2.0)
(* z -0.0424927283095952)
(+ (* x 4.16438922228) 70.37071397084))))
double code(double x, double y, double z) {
double tmp;
if (x <= -2.55e-31) {
tmp = x * 4.16438922228;
} else if (x <= 2.0) {
tmp = z * -0.0424927283095952;
} else {
tmp = (x * 4.16438922228) + 70.37071397084;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-2.55d-31)) then
tmp = x * 4.16438922228d0
else if (x <= 2.0d0) then
tmp = z * (-0.0424927283095952d0)
else
tmp = (x * 4.16438922228d0) + 70.37071397084d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -2.55e-31) {
tmp = x * 4.16438922228;
} else if (x <= 2.0) {
tmp = z * -0.0424927283095952;
} else {
tmp = (x * 4.16438922228) + 70.37071397084;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -2.55e-31: tmp = x * 4.16438922228 elif x <= 2.0: tmp = z * -0.0424927283095952 else: tmp = (x * 4.16438922228) + 70.37071397084 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -2.55e-31) tmp = Float64(x * 4.16438922228); elseif (x <= 2.0) tmp = Float64(z * -0.0424927283095952); else tmp = Float64(Float64(x * 4.16438922228) + 70.37071397084); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -2.55e-31) tmp = x * 4.16438922228; elseif (x <= 2.0) tmp = z * -0.0424927283095952; else tmp = (x * 4.16438922228) + 70.37071397084; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -2.55e-31], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 2.0], N[(z * -0.0424927283095952), $MachinePrecision], N[(N[(x * 4.16438922228), $MachinePrecision] + 70.37071397084), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.55 \cdot 10^{-31}:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 2:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228 + 70.37071397084\\
\end{array}
\end{array}
if x < -2.5499999999999999e-31Initial program 21.2%
associate-*r/24.1%
sub-neg24.1%
metadata-eval24.1%
*-commutative24.1%
fma-def24.1%
*-commutative24.1%
fma-def24.1%
*-commutative24.1%
fma-def24.1%
fma-def24.1%
*-commutative24.1%
Simplified24.2%
Taylor expanded in x around inf 79.7%
*-commutative79.7%
Simplified79.7%
if -2.5499999999999999e-31 < x < 2Initial program 99.7%
associate-*r/99.7%
sub-neg99.7%
metadata-eval99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 69.5%
*-commutative69.5%
Simplified69.5%
if 2 < x Initial program 13.8%
Taylor expanded in x around inf 12.3%
Taylor expanded in x around inf 87.1%
+-commutative87.1%
*-commutative87.1%
Simplified87.1%
Final simplification77.2%
(FPCore (x y z)
:precision binary64
(if (<= x -2.55e-31)
(- (* x 4.16438922228) 110.1139242984811)
(if (<= x 2.0)
(* z -0.0424927283095952)
(+ (* x 4.16438922228) 70.37071397084))))
double code(double x, double y, double z) {
double tmp;
if (x <= -2.55e-31) {
tmp = (x * 4.16438922228) - 110.1139242984811;
} else if (x <= 2.0) {
tmp = z * -0.0424927283095952;
} else {
tmp = (x * 4.16438922228) + 70.37071397084;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-2.55d-31)) then
tmp = (x * 4.16438922228d0) - 110.1139242984811d0
else if (x <= 2.0d0) then
tmp = z * (-0.0424927283095952d0)
else
tmp = (x * 4.16438922228d0) + 70.37071397084d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -2.55e-31) {
tmp = (x * 4.16438922228) - 110.1139242984811;
} else if (x <= 2.0) {
tmp = z * -0.0424927283095952;
} else {
tmp = (x * 4.16438922228) + 70.37071397084;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -2.55e-31: tmp = (x * 4.16438922228) - 110.1139242984811 elif x <= 2.0: tmp = z * -0.0424927283095952 else: tmp = (x * 4.16438922228) + 70.37071397084 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -2.55e-31) tmp = Float64(Float64(x * 4.16438922228) - 110.1139242984811); elseif (x <= 2.0) tmp = Float64(z * -0.0424927283095952); else tmp = Float64(Float64(x * 4.16438922228) + 70.37071397084); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -2.55e-31) tmp = (x * 4.16438922228) - 110.1139242984811; elseif (x <= 2.0) tmp = z * -0.0424927283095952; else tmp = (x * 4.16438922228) + 70.37071397084; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -2.55e-31], N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision], If[LessEqual[x, 2.0], N[(z * -0.0424927283095952), $MachinePrecision], N[(N[(x * 4.16438922228), $MachinePrecision] + 70.37071397084), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.55 \cdot 10^{-31}:\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\
\mathbf{elif}\;x \leq 2:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228 + 70.37071397084\\
\end{array}
\end{array}
if x < -2.5499999999999999e-31Initial program 21.2%
associate-*r/24.1%
sub-neg24.1%
metadata-eval24.1%
*-commutative24.1%
fma-def24.1%
*-commutative24.1%
fma-def24.1%
*-commutative24.1%
fma-def24.1%
fma-def24.1%
*-commutative24.1%
Simplified24.2%
Taylor expanded in x around inf 80.0%
if -2.5499999999999999e-31 < x < 2Initial program 99.7%
associate-*r/99.7%
sub-neg99.7%
metadata-eval99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 69.5%
*-commutative69.5%
Simplified69.5%
if 2 < x Initial program 13.8%
Taylor expanded in x around inf 12.3%
Taylor expanded in x around inf 87.1%
+-commutative87.1%
*-commutative87.1%
Simplified87.1%
Final simplification77.3%
(FPCore (x y z) :precision binary64 (if (<= x -2.55e-31) (* x 4.16438922228) (if (<= x 2.0) (* z -0.0424927283095952) (* x 4.16438922228))))
double code(double x, double y, double z) {
double tmp;
if (x <= -2.55e-31) {
tmp = x * 4.16438922228;
} else if (x <= 2.0) {
tmp = z * -0.0424927283095952;
} else {
tmp = x * 4.16438922228;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-2.55d-31)) then
tmp = x * 4.16438922228d0
else if (x <= 2.0d0) then
tmp = z * (-0.0424927283095952d0)
else
tmp = x * 4.16438922228d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -2.55e-31) {
tmp = x * 4.16438922228;
} else if (x <= 2.0) {
tmp = z * -0.0424927283095952;
} else {
tmp = x * 4.16438922228;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -2.55e-31: tmp = x * 4.16438922228 elif x <= 2.0: tmp = z * -0.0424927283095952 else: tmp = x * 4.16438922228 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -2.55e-31) tmp = Float64(x * 4.16438922228); elseif (x <= 2.0) tmp = Float64(z * -0.0424927283095952); else tmp = Float64(x * 4.16438922228); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -2.55e-31) tmp = x * 4.16438922228; elseif (x <= 2.0) tmp = z * -0.0424927283095952; else tmp = x * 4.16438922228; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -2.55e-31], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 2.0], N[(z * -0.0424927283095952), $MachinePrecision], N[(x * 4.16438922228), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.55 \cdot 10^{-31}:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 2:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228\\
\end{array}
\end{array}
if x < -2.5499999999999999e-31 or 2 < x Initial program 17.3%
associate-*r/23.5%
sub-neg23.5%
metadata-eval23.5%
*-commutative23.5%
fma-def23.5%
*-commutative23.5%
fma-def23.5%
*-commutative23.5%
fma-def23.5%
fma-def23.5%
*-commutative23.5%
Simplified23.5%
Taylor expanded in x around inf 83.6%
*-commutative83.6%
Simplified83.6%
if -2.5499999999999999e-31 < x < 2Initial program 99.7%
associate-*r/99.7%
sub-neg99.7%
metadata-eval99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 69.5%
*-commutative69.5%
Simplified69.5%
Final simplification77.2%
(FPCore (x y z) :precision binary64 (* x -0.3407596943375357))
double code(double x, double y, double z) {
return x * -0.3407596943375357;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x * (-0.3407596943375357d0)
end function
public static double code(double x, double y, double z) {
return x * -0.3407596943375357;
}
def code(x, y, z): return x * -0.3407596943375357
function code(x, y, z) return Float64(x * -0.3407596943375357) end
function tmp = code(x, y, z) tmp = x * -0.3407596943375357; end
code[x_, y_, z_] := N[(x * -0.3407596943375357), $MachinePrecision]
\begin{array}{l}
\\
x \cdot -0.3407596943375357
\end{array}
Initial program 54.6%
associate-/l*57.9%
sub-neg57.9%
metadata-eval57.9%
fma-def57.9%
fma-def57.9%
fma-def58.0%
fma-def57.9%
fma-def57.9%
fma-def57.9%
fma-def57.9%
Simplified57.9%
Taylor expanded in x around inf 47.6%
associate-*r/47.6%
metadata-eval47.6%
Simplified47.6%
Taylor expanded in x around 0 2.3%
*-commutative2.3%
Simplified2.3%
Final simplification2.3%
(FPCore (x y z) :precision binary64 (* x 4.16438922228))
double code(double x, double y, double z) {
return x * 4.16438922228;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x * 4.16438922228d0
end function
public static double code(double x, double y, double z) {
return x * 4.16438922228;
}
def code(x, y, z): return x * 4.16438922228
function code(x, y, z) return Float64(x * 4.16438922228) end
function tmp = code(x, y, z) tmp = x * 4.16438922228; end
code[x_, y_, z_] := N[(x * 4.16438922228), $MachinePrecision]
\begin{array}{l}
\\
x \cdot 4.16438922228
\end{array}
Initial program 54.6%
associate-*r/58.0%
sub-neg58.0%
metadata-eval58.0%
*-commutative58.0%
fma-def58.0%
*-commutative58.0%
fma-def58.0%
*-commutative58.0%
fma-def58.0%
fma-def58.0%
*-commutative58.0%
Simplified58.0%
Taylor expanded in x around inf 47.1%
*-commutative47.1%
Simplified47.1%
Final simplification47.1%
(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 2023171
(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)))