
(FPCore (x y z t) :precision binary64 (/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))
double code(double x, double y, double z, double t) {
return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
}
def code(x, y, z, t): return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0)
function code(x, y, z, t) return Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / Float64(Float64(t * z) - x))) / Float64(x + 1.0)) end
function tmp = code(x, y, z, t) tmp = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0); end
code[x_, y_, z_, t_] := N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(t * z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))
double code(double x, double y, double z, double t) {
return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
}
def code(x, y, z, t): return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0)
function code(x, y, z, t) return Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / Float64(Float64(t * z) - x))) / Float64(x + 1.0)) end
function tmp = code(x, y, z, t) tmp = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0); end
code[x_, y_, z_, t_] := N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(t * z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- x (* y z))) (t_2 (- (* z t) x)))
(if (<= (/ (- (/ t_1 t_2) x) (- -1.0 x)) 5e+263)
(/ (- x (/ 1.0 (/ t_2 t_1))) (+ x 1.0))
(+ (/ x (+ x 1.0)) (/ (+ (/ y (+ x 1.0)) (/ (/ x z) (- -1.0 x))) t)))))
double code(double x, double y, double z, double t) {
double t_1 = x - (y * z);
double t_2 = (z * t) - x;
double tmp;
if ((((t_1 / t_2) - x) / (-1.0 - x)) <= 5e+263) {
tmp = (x - (1.0 / (t_2 / t_1))) / (x + 1.0);
} else {
tmp = (x / (x + 1.0)) + (((y / (x + 1.0)) + ((x / z) / (-1.0 - x))) / t);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x - (y * z)
t_2 = (z * t) - x
if ((((t_1 / t_2) - x) / ((-1.0d0) - x)) <= 5d+263) then
tmp = (x - (1.0d0 / (t_2 / t_1))) / (x + 1.0d0)
else
tmp = (x / (x + 1.0d0)) + (((y / (x + 1.0d0)) + ((x / z) / ((-1.0d0) - x))) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x - (y * z);
double t_2 = (z * t) - x;
double tmp;
if ((((t_1 / t_2) - x) / (-1.0 - x)) <= 5e+263) {
tmp = (x - (1.0 / (t_2 / t_1))) / (x + 1.0);
} else {
tmp = (x / (x + 1.0)) + (((y / (x + 1.0)) + ((x / z) / (-1.0 - x))) / t);
}
return tmp;
}
def code(x, y, z, t): t_1 = x - (y * z) t_2 = (z * t) - x tmp = 0 if (((t_1 / t_2) - x) / (-1.0 - x)) <= 5e+263: tmp = (x - (1.0 / (t_2 / t_1))) / (x + 1.0) else: tmp = (x / (x + 1.0)) + (((y / (x + 1.0)) + ((x / z) / (-1.0 - x))) / t) return tmp
function code(x, y, z, t) t_1 = Float64(x - Float64(y * z)) t_2 = Float64(Float64(z * t) - x) tmp = 0.0 if (Float64(Float64(Float64(t_1 / t_2) - x) / Float64(-1.0 - x)) <= 5e+263) tmp = Float64(Float64(x - Float64(1.0 / Float64(t_2 / t_1))) / Float64(x + 1.0)); else tmp = Float64(Float64(x / Float64(x + 1.0)) + Float64(Float64(Float64(y / Float64(x + 1.0)) + Float64(Float64(x / z) / Float64(-1.0 - x))) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x - (y * z); t_2 = (z * t) - x; tmp = 0.0; if ((((t_1 / t_2) - x) / (-1.0 - x)) <= 5e+263) tmp = (x - (1.0 / (t_2 / t_1))) / (x + 1.0); else tmp = (x / (x + 1.0)) + (((y / (x + 1.0)) + ((x / z) / (-1.0 - x))) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, If[LessEqual[N[(N[(N[(t$95$1 / t$95$2), $MachinePrecision] - x), $MachinePrecision] / N[(-1.0 - x), $MachinePrecision]), $MachinePrecision], 5e+263], N[(N[(x - N[(1.0 / N[(t$95$2 / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x / z), $MachinePrecision] / N[(-1.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot z\\
t_2 := z \cdot t - x\\
\mathbf{if}\;\frac{\frac{t\_1}{t\_2} - x}{-1 - x} \leq 5 \cdot 10^{+263}:\\
\;\;\;\;\frac{x - \frac{1}{\frac{t\_2}{t\_1}}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + 1} + \frac{\frac{y}{x + 1} + \frac{\frac{x}{z}}{-1 - x}}{t}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 5.00000000000000022e263Initial program 96.9%
*-commutative96.9%
Simplified96.9%
clear-num96.9%
inv-pow96.9%
fma-neg96.9%
Applied egg-rr96.9%
unpow-196.9%
div-sub96.0%
*-commutative96.0%
div-sub96.9%
fma-neg96.9%
*-commutative96.9%
Simplified96.9%
if 5.00000000000000022e263 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) Initial program 30.6%
*-commutative30.6%
Simplified30.6%
Taylor expanded in t around -inf 84.1%
+-commutative84.1%
mul-1-neg84.1%
unsub-neg84.1%
+-commutative84.1%
sub-neg84.1%
mul-1-neg84.1%
distribute-neg-frac284.1%
distribute-neg-in84.1%
metadata-eval84.1%
unsub-neg84.1%
mul-1-neg84.1%
remove-double-neg84.1%
associate-/r*84.1%
+-commutative84.1%
Simplified84.1%
Final simplification95.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- x (* y z))) (t_2 (- (* z t) x)))
(if (<= (/ (- (/ t_1 t_2) x) (- -1.0 x)) 5e+263)
(/ (- x (/ 1.0 (/ t_2 t_1))) (+ x 1.0))
(/ (+ x (/ y t)) (+ x 1.0)))))
double code(double x, double y, double z, double t) {
double t_1 = x - (y * z);
double t_2 = (z * t) - x;
double tmp;
if ((((t_1 / t_2) - x) / (-1.0 - x)) <= 5e+263) {
tmp = (x - (1.0 / (t_2 / t_1))) / (x + 1.0);
} else {
tmp = (x + (y / t)) / (x + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x - (y * z)
t_2 = (z * t) - x
if ((((t_1 / t_2) - x) / ((-1.0d0) - x)) <= 5d+263) then
tmp = (x - (1.0d0 / (t_2 / t_1))) / (x + 1.0d0)
else
tmp = (x + (y / t)) / (x + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x - (y * z);
double t_2 = (z * t) - x;
double tmp;
if ((((t_1 / t_2) - x) / (-1.0 - x)) <= 5e+263) {
tmp = (x - (1.0 / (t_2 / t_1))) / (x + 1.0);
} else {
tmp = (x + (y / t)) / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): t_1 = x - (y * z) t_2 = (z * t) - x tmp = 0 if (((t_1 / t_2) - x) / (-1.0 - x)) <= 5e+263: tmp = (x - (1.0 / (t_2 / t_1))) / (x + 1.0) else: tmp = (x + (y / t)) / (x + 1.0) return tmp
function code(x, y, z, t) t_1 = Float64(x - Float64(y * z)) t_2 = Float64(Float64(z * t) - x) tmp = 0.0 if (Float64(Float64(Float64(t_1 / t_2) - x) / Float64(-1.0 - x)) <= 5e+263) tmp = Float64(Float64(x - Float64(1.0 / Float64(t_2 / t_1))) / Float64(x + 1.0)); else tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x - (y * z); t_2 = (z * t) - x; tmp = 0.0; if ((((t_1 / t_2) - x) / (-1.0 - x)) <= 5e+263) tmp = (x - (1.0 / (t_2 / t_1))) / (x + 1.0); else tmp = (x + (y / t)) / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, If[LessEqual[N[(N[(N[(t$95$1 / t$95$2), $MachinePrecision] - x), $MachinePrecision] / N[(-1.0 - x), $MachinePrecision]), $MachinePrecision], 5e+263], N[(N[(x - N[(1.0 / N[(t$95$2 / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot z\\
t_2 := z \cdot t - x\\
\mathbf{if}\;\frac{\frac{t\_1}{t\_2} - x}{-1 - x} \leq 5 \cdot 10^{+263}:\\
\;\;\;\;\frac{x - \frac{1}{\frac{t\_2}{t\_1}}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 5.00000000000000022e263Initial program 96.9%
*-commutative96.9%
Simplified96.9%
clear-num96.9%
inv-pow96.9%
fma-neg96.9%
Applied egg-rr96.9%
unpow-196.9%
div-sub96.0%
*-commutative96.0%
div-sub96.9%
fma-neg96.9%
*-commutative96.9%
Simplified96.9%
if 5.00000000000000022e263 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) Initial program 30.6%
*-commutative30.6%
Simplified30.6%
Taylor expanded in z around inf 84.0%
Final simplification95.5%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (/ (- (/ (- x (* y z)) (- (* z t) x)) x) (- -1.0 x)))) (if (<= t_1 5e+263) t_1 (/ (+ x (/ y t)) (+ x 1.0)))))
double code(double x, double y, double z, double t) {
double t_1 = (((x - (y * z)) / ((z * t) - x)) - x) / (-1.0 - x);
double tmp;
if (t_1 <= 5e+263) {
tmp = t_1;
} else {
tmp = (x + (y / t)) / (x + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (((x - (y * z)) / ((z * t) - x)) - x) / ((-1.0d0) - x)
if (t_1 <= 5d+263) then
tmp = t_1
else
tmp = (x + (y / t)) / (x + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (((x - (y * z)) / ((z * t) - x)) - x) / (-1.0 - x);
double tmp;
if (t_1 <= 5e+263) {
tmp = t_1;
} else {
tmp = (x + (y / t)) / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): t_1 = (((x - (y * z)) / ((z * t) - x)) - x) / (-1.0 - x) tmp = 0 if t_1 <= 5e+263: tmp = t_1 else: tmp = (x + (y / t)) / (x + 1.0) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(Float64(Float64(x - Float64(y * z)) / Float64(Float64(z * t) - x)) - x) / Float64(-1.0 - x)) tmp = 0.0 if (t_1 <= 5e+263) tmp = t_1; else tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (((x - (y * z)) / ((z * t) - x)) - x) / (-1.0 - x); tmp = 0.0; if (t_1 <= 5e+263) tmp = t_1; else tmp = (x + (y / t)) / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / N[(-1.0 - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 5e+263], t$95$1, N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{x - y \cdot z}{z \cdot t - x} - x}{-1 - x}\\
\mathbf{if}\;t\_1 \leq 5 \cdot 10^{+263}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 5.00000000000000022e263Initial program 96.9%
if 5.00000000000000022e263 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) Initial program 30.6%
*-commutative30.6%
Simplified30.6%
Taylor expanded in z around inf 84.0%
Final simplification95.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ y (* t (+ x 1.0)))))
(if (<= x -3.6e-40)
(/ x (+ x 1.0))
(if (<= x -2.6e-63)
(/ y t)
(if (<= x -8e-211)
x
(if (<= x 1.6e-120)
t_1
(if (<= x 5.4e-83) x (if (<= x 4.3e+17) t_1 1.0))))))))
double code(double x, double y, double z, double t) {
double t_1 = y / (t * (x + 1.0));
double tmp;
if (x <= -3.6e-40) {
tmp = x / (x + 1.0);
} else if (x <= -2.6e-63) {
tmp = y / t;
} else if (x <= -8e-211) {
tmp = x;
} else if (x <= 1.6e-120) {
tmp = t_1;
} else if (x <= 5.4e-83) {
tmp = x;
} else if (x <= 4.3e+17) {
tmp = t_1;
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = y / (t * (x + 1.0d0))
if (x <= (-3.6d-40)) then
tmp = x / (x + 1.0d0)
else if (x <= (-2.6d-63)) then
tmp = y / t
else if (x <= (-8d-211)) then
tmp = x
else if (x <= 1.6d-120) then
tmp = t_1
else if (x <= 5.4d-83) then
tmp = x
else if (x <= 4.3d+17) then
tmp = t_1
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y / (t * (x + 1.0));
double tmp;
if (x <= -3.6e-40) {
tmp = x / (x + 1.0);
} else if (x <= -2.6e-63) {
tmp = y / t;
} else if (x <= -8e-211) {
tmp = x;
} else if (x <= 1.6e-120) {
tmp = t_1;
} else if (x <= 5.4e-83) {
tmp = x;
} else if (x <= 4.3e+17) {
tmp = t_1;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t): t_1 = y / (t * (x + 1.0)) tmp = 0 if x <= -3.6e-40: tmp = x / (x + 1.0) elif x <= -2.6e-63: tmp = y / t elif x <= -8e-211: tmp = x elif x <= 1.6e-120: tmp = t_1 elif x <= 5.4e-83: tmp = x elif x <= 4.3e+17: tmp = t_1 else: tmp = 1.0 return tmp
function code(x, y, z, t) t_1 = Float64(y / Float64(t * Float64(x + 1.0))) tmp = 0.0 if (x <= -3.6e-40) tmp = Float64(x / Float64(x + 1.0)); elseif (x <= -2.6e-63) tmp = Float64(y / t); elseif (x <= -8e-211) tmp = x; elseif (x <= 1.6e-120) tmp = t_1; elseif (x <= 5.4e-83) tmp = x; elseif (x <= 4.3e+17) tmp = t_1; else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y / (t * (x + 1.0)); tmp = 0.0; if (x <= -3.6e-40) tmp = x / (x + 1.0); elseif (x <= -2.6e-63) tmp = y / t; elseif (x <= -8e-211) tmp = x; elseif (x <= 1.6e-120) tmp = t_1; elseif (x <= 5.4e-83) tmp = x; elseif (x <= 4.3e+17) tmp = t_1; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y / N[(t * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.6e-40], N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.6e-63], N[(y / t), $MachinePrecision], If[LessEqual[x, -8e-211], x, If[LessEqual[x, 1.6e-120], t$95$1, If[LessEqual[x, 5.4e-83], x, If[LessEqual[x, 4.3e+17], t$95$1, 1.0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{t \cdot \left(x + 1\right)}\\
\mathbf{if}\;x \leq -3.6 \cdot 10^{-40}:\\
\;\;\;\;\frac{x}{x + 1}\\
\mathbf{elif}\;x \leq -2.6 \cdot 10^{-63}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{elif}\;x \leq -8 \cdot 10^{-211}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{-120}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 5.4 \cdot 10^{-83}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 4.3 \cdot 10^{+17}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < -3.6e-40Initial program 90.5%
*-commutative90.5%
Simplified90.5%
Taylor expanded in t around inf 83.4%
+-commutative83.4%
Simplified83.4%
if -3.6e-40 < x < -2.6000000000000001e-63Initial program 83.3%
*-commutative83.3%
Simplified83.3%
Taylor expanded in z around inf 83.4%
Taylor expanded in x around 0 83.4%
if -2.6000000000000001e-63 < x < -8.00000000000000069e-211 or 1.6e-120 < x < 5.39999999999999982e-83Initial program 97.1%
*-commutative97.1%
Simplified97.1%
Taylor expanded in t around inf 47.7%
+-commutative47.7%
Simplified47.7%
Taylor expanded in x around 0 47.7%
if -8.00000000000000069e-211 < x < 1.6e-120 or 5.39999999999999982e-83 < x < 4.3e17Initial program 89.7%
*-commutative89.7%
Simplified89.7%
Taylor expanded in y around inf 61.3%
associate-/l*64.6%
+-commutative64.6%
Simplified64.6%
Taylor expanded in z around inf 62.1%
+-commutative62.1%
Simplified62.1%
if 4.3e17 < x Initial program 86.2%
*-commutative86.2%
Simplified86.2%
Taylor expanded in z around inf 78.1%
Taylor expanded in x around inf 88.0%
Final simplification72.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ y (* t (+ x 1.0)))))
(if (<= x -4.9e-39)
(/ x (+ x 1.0))
(if (<= x -3.6e-64)
(/ y t)
(if (<= x -8e-211)
(* x (+ 1.0 (/ -1.0 (* z t))))
(if (<= x 4.4e-120)
t_1
(if (<= x 4.1e-83) x (if (<= x 4.3e+17) t_1 1.0))))))))
double code(double x, double y, double z, double t) {
double t_1 = y / (t * (x + 1.0));
double tmp;
if (x <= -4.9e-39) {
tmp = x / (x + 1.0);
} else if (x <= -3.6e-64) {
tmp = y / t;
} else if (x <= -8e-211) {
tmp = x * (1.0 + (-1.0 / (z * t)));
} else if (x <= 4.4e-120) {
tmp = t_1;
} else if (x <= 4.1e-83) {
tmp = x;
} else if (x <= 4.3e+17) {
tmp = t_1;
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = y / (t * (x + 1.0d0))
if (x <= (-4.9d-39)) then
tmp = x / (x + 1.0d0)
else if (x <= (-3.6d-64)) then
tmp = y / t
else if (x <= (-8d-211)) then
tmp = x * (1.0d0 + ((-1.0d0) / (z * t)))
else if (x <= 4.4d-120) then
tmp = t_1
else if (x <= 4.1d-83) then
tmp = x
else if (x <= 4.3d+17) then
tmp = t_1
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y / (t * (x + 1.0));
double tmp;
if (x <= -4.9e-39) {
tmp = x / (x + 1.0);
} else if (x <= -3.6e-64) {
tmp = y / t;
} else if (x <= -8e-211) {
tmp = x * (1.0 + (-1.0 / (z * t)));
} else if (x <= 4.4e-120) {
tmp = t_1;
} else if (x <= 4.1e-83) {
tmp = x;
} else if (x <= 4.3e+17) {
tmp = t_1;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t): t_1 = y / (t * (x + 1.0)) tmp = 0 if x <= -4.9e-39: tmp = x / (x + 1.0) elif x <= -3.6e-64: tmp = y / t elif x <= -8e-211: tmp = x * (1.0 + (-1.0 / (z * t))) elif x <= 4.4e-120: tmp = t_1 elif x <= 4.1e-83: tmp = x elif x <= 4.3e+17: tmp = t_1 else: tmp = 1.0 return tmp
function code(x, y, z, t) t_1 = Float64(y / Float64(t * Float64(x + 1.0))) tmp = 0.0 if (x <= -4.9e-39) tmp = Float64(x / Float64(x + 1.0)); elseif (x <= -3.6e-64) tmp = Float64(y / t); elseif (x <= -8e-211) tmp = Float64(x * Float64(1.0 + Float64(-1.0 / Float64(z * t)))); elseif (x <= 4.4e-120) tmp = t_1; elseif (x <= 4.1e-83) tmp = x; elseif (x <= 4.3e+17) tmp = t_1; else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y / (t * (x + 1.0)); tmp = 0.0; if (x <= -4.9e-39) tmp = x / (x + 1.0); elseif (x <= -3.6e-64) tmp = y / t; elseif (x <= -8e-211) tmp = x * (1.0 + (-1.0 / (z * t))); elseif (x <= 4.4e-120) tmp = t_1; elseif (x <= 4.1e-83) tmp = x; elseif (x <= 4.3e+17) tmp = t_1; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y / N[(t * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.9e-39], N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.6e-64], N[(y / t), $MachinePrecision], If[LessEqual[x, -8e-211], N[(x * N[(1.0 + N[(-1.0 / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.4e-120], t$95$1, If[LessEqual[x, 4.1e-83], x, If[LessEqual[x, 4.3e+17], t$95$1, 1.0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{t \cdot \left(x + 1\right)}\\
\mathbf{if}\;x \leq -4.9 \cdot 10^{-39}:\\
\;\;\;\;\frac{x}{x + 1}\\
\mathbf{elif}\;x \leq -3.6 \cdot 10^{-64}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{elif}\;x \leq -8 \cdot 10^{-211}:\\
\;\;\;\;x \cdot \left(1 + \frac{-1}{z \cdot t}\right)\\
\mathbf{elif}\;x \leq 4.4 \cdot 10^{-120}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 4.1 \cdot 10^{-83}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 4.3 \cdot 10^{+17}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < -4.89999999999999974e-39Initial program 90.5%
*-commutative90.5%
Simplified90.5%
Taylor expanded in t around inf 83.4%
+-commutative83.4%
Simplified83.4%
if -4.89999999999999974e-39 < x < -3.5999999999999998e-64Initial program 83.3%
*-commutative83.3%
Simplified83.3%
Taylor expanded in z around inf 83.4%
Taylor expanded in x around 0 83.4%
if -3.5999999999999998e-64 < x < -8.00000000000000069e-211Initial program 95.1%
*-commutative95.1%
Simplified95.1%
Taylor expanded in y around 0 81.6%
+-commutative81.6%
Simplified81.6%
Taylor expanded in x around 0 63.2%
if -8.00000000000000069e-211 < x < 4.40000000000000025e-120 or 4.1e-83 < x < 4.3e17Initial program 89.7%
*-commutative89.7%
Simplified89.7%
Taylor expanded in y around inf 61.3%
associate-/l*64.6%
+-commutative64.6%
Simplified64.6%
Taylor expanded in z around inf 62.1%
+-commutative62.1%
Simplified62.1%
if 4.40000000000000025e-120 < x < 4.1e-83Initial program 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around inf 52.1%
+-commutative52.1%
Simplified52.1%
Taylor expanded in x around 0 52.1%
if 4.3e17 < x Initial program 86.2%
*-commutative86.2%
Simplified86.2%
Taylor expanded in z around inf 78.1%
Taylor expanded in x around inf 88.0%
Final simplification73.9%
(FPCore (x y z t)
:precision binary64
(if (<= x -3e-39)
(/ x (+ x 1.0))
(if (<= x -1.28e-67)
(/ y t)
(if (<= x -8e-211)
x
(if (<= x 4.4e-120)
(/ y t)
(if (<= x 8.4e-84)
x
(if (<= x 100000000.0) (/ y t) (- 1.0 (/ 1.0 x)))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3e-39) {
tmp = x / (x + 1.0);
} else if (x <= -1.28e-67) {
tmp = y / t;
} else if (x <= -8e-211) {
tmp = x;
} else if (x <= 4.4e-120) {
tmp = y / t;
} else if (x <= 8.4e-84) {
tmp = x;
} else if (x <= 100000000.0) {
tmp = y / t;
} else {
tmp = 1.0 - (1.0 / x);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-3d-39)) then
tmp = x / (x + 1.0d0)
else if (x <= (-1.28d-67)) then
tmp = y / t
else if (x <= (-8d-211)) then
tmp = x
else if (x <= 4.4d-120) then
tmp = y / t
else if (x <= 8.4d-84) then
tmp = x
else if (x <= 100000000.0d0) then
tmp = y / t
else
tmp = 1.0d0 - (1.0d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3e-39) {
tmp = x / (x + 1.0);
} else if (x <= -1.28e-67) {
tmp = y / t;
} else if (x <= -8e-211) {
tmp = x;
} else if (x <= 4.4e-120) {
tmp = y / t;
} else if (x <= 8.4e-84) {
tmp = x;
} else if (x <= 100000000.0) {
tmp = y / t;
} else {
tmp = 1.0 - (1.0 / x);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -3e-39: tmp = x / (x + 1.0) elif x <= -1.28e-67: tmp = y / t elif x <= -8e-211: tmp = x elif x <= 4.4e-120: tmp = y / t elif x <= 8.4e-84: tmp = x elif x <= 100000000.0: tmp = y / t else: tmp = 1.0 - (1.0 / x) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -3e-39) tmp = Float64(x / Float64(x + 1.0)); elseif (x <= -1.28e-67) tmp = Float64(y / t); elseif (x <= -8e-211) tmp = x; elseif (x <= 4.4e-120) tmp = Float64(y / t); elseif (x <= 8.4e-84) tmp = x; elseif (x <= 100000000.0) tmp = Float64(y / t); else tmp = Float64(1.0 - Float64(1.0 / x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -3e-39) tmp = x / (x + 1.0); elseif (x <= -1.28e-67) tmp = y / t; elseif (x <= -8e-211) tmp = x; elseif (x <= 4.4e-120) tmp = y / t; elseif (x <= 8.4e-84) tmp = x; elseif (x <= 100000000.0) tmp = y / t; else tmp = 1.0 - (1.0 / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -3e-39], N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.28e-67], N[(y / t), $MachinePrecision], If[LessEqual[x, -8e-211], x, If[LessEqual[x, 4.4e-120], N[(y / t), $MachinePrecision], If[LessEqual[x, 8.4e-84], x, If[LessEqual[x, 100000000.0], N[(y / t), $MachinePrecision], N[(1.0 - N[(1.0 / x), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3 \cdot 10^{-39}:\\
\;\;\;\;\frac{x}{x + 1}\\
\mathbf{elif}\;x \leq -1.28 \cdot 10^{-67}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{elif}\;x \leq -8 \cdot 10^{-211}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 4.4 \cdot 10^{-120}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{elif}\;x \leq 8.4 \cdot 10^{-84}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 100000000:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{1}{x}\\
\end{array}
\end{array}
if x < -3.00000000000000028e-39Initial program 90.5%
*-commutative90.5%
Simplified90.5%
Taylor expanded in t around inf 83.4%
+-commutative83.4%
Simplified83.4%
if -3.00000000000000028e-39 < x < -1.28e-67 or -8.00000000000000069e-211 < x < 4.40000000000000025e-120 or 8.39999999999999992e-84 < x < 1e8Initial program 89.9%
*-commutative89.9%
Simplified89.9%
Taylor expanded in z around inf 76.3%
Taylor expanded in x around 0 64.0%
if -1.28e-67 < x < -8.00000000000000069e-211 or 4.40000000000000025e-120 < x < 8.39999999999999992e-84Initial program 97.1%
*-commutative97.1%
Simplified97.1%
Taylor expanded in t around inf 47.7%
+-commutative47.7%
Simplified47.7%
Taylor expanded in x around 0 47.7%
if 1e8 < x Initial program 85.5%
*-commutative85.5%
Simplified85.5%
Taylor expanded in t around inf 85.6%
+-commutative85.6%
Simplified85.6%
Taylor expanded in x around inf 85.6%
Final simplification72.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ 1.0 (/ (* y (/ z x)) (- -1.0 x))))
(t_2 (/ (+ x (/ y t)) (+ x 1.0))))
(if (<= t -1.1e-110)
t_2
(if (<= t 7.5e-162)
t_1
(if (<= t 3.4e-150)
(/ y (* t (+ x 1.0)))
(if (<= t 6.2e+45) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = 1.0 + ((y * (z / x)) / (-1.0 - x));
double t_2 = (x + (y / t)) / (x + 1.0);
double tmp;
if (t <= -1.1e-110) {
tmp = t_2;
} else if (t <= 7.5e-162) {
tmp = t_1;
} else if (t <= 3.4e-150) {
tmp = y / (t * (x + 1.0));
} else if (t <= 6.2e+45) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 1.0d0 + ((y * (z / x)) / ((-1.0d0) - x))
t_2 = (x + (y / t)) / (x + 1.0d0)
if (t <= (-1.1d-110)) then
tmp = t_2
else if (t <= 7.5d-162) then
tmp = t_1
else if (t <= 3.4d-150) then
tmp = y / (t * (x + 1.0d0))
else if (t <= 6.2d+45) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = 1.0 + ((y * (z / x)) / (-1.0 - x));
double t_2 = (x + (y / t)) / (x + 1.0);
double tmp;
if (t <= -1.1e-110) {
tmp = t_2;
} else if (t <= 7.5e-162) {
tmp = t_1;
} else if (t <= 3.4e-150) {
tmp = y / (t * (x + 1.0));
} else if (t <= 6.2e+45) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = 1.0 + ((y * (z / x)) / (-1.0 - x)) t_2 = (x + (y / t)) / (x + 1.0) tmp = 0 if t <= -1.1e-110: tmp = t_2 elif t <= 7.5e-162: tmp = t_1 elif t <= 3.4e-150: tmp = y / (t * (x + 1.0)) elif t <= 6.2e+45: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(1.0 + Float64(Float64(y * Float64(z / x)) / Float64(-1.0 - x))) t_2 = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)) tmp = 0.0 if (t <= -1.1e-110) tmp = t_2; elseif (t <= 7.5e-162) tmp = t_1; elseif (t <= 3.4e-150) tmp = Float64(y / Float64(t * Float64(x + 1.0))); elseif (t <= 6.2e+45) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 1.0 + ((y * (z / x)) / (-1.0 - x)); t_2 = (x + (y / t)) / (x + 1.0); tmp = 0.0; if (t <= -1.1e-110) tmp = t_2; elseif (t <= 7.5e-162) tmp = t_1; elseif (t <= 3.4e-150) tmp = y / (t * (x + 1.0)); elseif (t <= 6.2e+45) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(1.0 + N[(N[(y * N[(z / x), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.1e-110], t$95$2, If[LessEqual[t, 7.5e-162], t$95$1, If[LessEqual[t, 3.4e-150], N[(y / N[(t * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.2e+45], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 + \frac{y \cdot \frac{z}{x}}{-1 - x}\\
t_2 := \frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{if}\;t \leq -1.1 \cdot 10^{-110}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{-162}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{-150}:\\
\;\;\;\;\frac{y}{t \cdot \left(x + 1\right)}\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.1e-110 or 6.19999999999999975e45 < t Initial program 87.8%
*-commutative87.8%
Simplified87.8%
Taylor expanded in z around inf 90.6%
if -1.1e-110 < t < 7.49999999999999972e-162 or 3.39999999999999999e-150 < t < 6.19999999999999975e45Initial program 93.2%
*-commutative93.2%
Simplified93.2%
Taylor expanded in t around 0 76.3%
associate-+r+76.3%
mul-1-neg76.3%
unsub-neg76.3%
+-commutative76.3%
associate-/l*80.2%
+-commutative80.2%
Simplified80.2%
div-sub80.2%
pow180.2%
pow180.2%
pow-div80.2%
metadata-eval80.2%
metadata-eval80.2%
Applied egg-rr80.2%
if 7.49999999999999972e-162 < t < 3.39999999999999999e-150Initial program 83.7%
*-commutative83.7%
Simplified83.7%
Taylor expanded in y around inf 83.7%
associate-/l*99.2%
+-commutative99.2%
Simplified99.2%
Taylor expanded in z around inf 86.6%
+-commutative86.6%
Simplified86.6%
Final simplification86.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ 1.0 (/ (* y (/ z x)) (- -1.0 x))))
(t_2 (/ (+ x (/ y t)) (+ x 1.0))))
(if (<= t -7.4e-109)
t_2
(if (<= t 6e-162)
t_1
(if (<= t 5.5e-150)
(* y (/ z (* (- (* z t) x) (+ x 1.0))))
(if (<= t 6.2e+45) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = 1.0 + ((y * (z / x)) / (-1.0 - x));
double t_2 = (x + (y / t)) / (x + 1.0);
double tmp;
if (t <= -7.4e-109) {
tmp = t_2;
} else if (t <= 6e-162) {
tmp = t_1;
} else if (t <= 5.5e-150) {
tmp = y * (z / (((z * t) - x) * (x + 1.0)));
} else if (t <= 6.2e+45) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 1.0d0 + ((y * (z / x)) / ((-1.0d0) - x))
t_2 = (x + (y / t)) / (x + 1.0d0)
if (t <= (-7.4d-109)) then
tmp = t_2
else if (t <= 6d-162) then
tmp = t_1
else if (t <= 5.5d-150) then
tmp = y * (z / (((z * t) - x) * (x + 1.0d0)))
else if (t <= 6.2d+45) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = 1.0 + ((y * (z / x)) / (-1.0 - x));
double t_2 = (x + (y / t)) / (x + 1.0);
double tmp;
if (t <= -7.4e-109) {
tmp = t_2;
} else if (t <= 6e-162) {
tmp = t_1;
} else if (t <= 5.5e-150) {
tmp = y * (z / (((z * t) - x) * (x + 1.0)));
} else if (t <= 6.2e+45) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = 1.0 + ((y * (z / x)) / (-1.0 - x)) t_2 = (x + (y / t)) / (x + 1.0) tmp = 0 if t <= -7.4e-109: tmp = t_2 elif t <= 6e-162: tmp = t_1 elif t <= 5.5e-150: tmp = y * (z / (((z * t) - x) * (x + 1.0))) elif t <= 6.2e+45: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(1.0 + Float64(Float64(y * Float64(z / x)) / Float64(-1.0 - x))) t_2 = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)) tmp = 0.0 if (t <= -7.4e-109) tmp = t_2; elseif (t <= 6e-162) tmp = t_1; elseif (t <= 5.5e-150) tmp = Float64(y * Float64(z / Float64(Float64(Float64(z * t) - x) * Float64(x + 1.0)))); elseif (t <= 6.2e+45) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 1.0 + ((y * (z / x)) / (-1.0 - x)); t_2 = (x + (y / t)) / (x + 1.0); tmp = 0.0; if (t <= -7.4e-109) tmp = t_2; elseif (t <= 6e-162) tmp = t_1; elseif (t <= 5.5e-150) tmp = y * (z / (((z * t) - x) * (x + 1.0))); elseif (t <= 6.2e+45) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(1.0 + N[(N[(y * N[(z / x), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.4e-109], t$95$2, If[LessEqual[t, 6e-162], t$95$1, If[LessEqual[t, 5.5e-150], N[(y * N[(z / N[(N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision] * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.2e+45], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 + \frac{y \cdot \frac{z}{x}}{-1 - x}\\
t_2 := \frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{if}\;t \leq -7.4 \cdot 10^{-109}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-162}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{-150}:\\
\;\;\;\;y \cdot \frac{z}{\left(z \cdot t - x\right) \cdot \left(x + 1\right)}\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -7.39999999999999961e-109 or 6.19999999999999975e45 < t Initial program 87.8%
*-commutative87.8%
Simplified87.8%
Taylor expanded in z around inf 90.6%
if -7.39999999999999961e-109 < t < 5.99999999999999997e-162 or 5.4999999999999996e-150 < t < 6.19999999999999975e45Initial program 93.2%
*-commutative93.2%
Simplified93.2%
Taylor expanded in t around 0 76.3%
associate-+r+76.3%
mul-1-neg76.3%
unsub-neg76.3%
+-commutative76.3%
associate-/l*80.2%
+-commutative80.2%
Simplified80.2%
div-sub80.2%
pow180.2%
pow180.2%
pow-div80.2%
metadata-eval80.2%
metadata-eval80.2%
Applied egg-rr80.2%
if 5.99999999999999997e-162 < t < 5.4999999999999996e-150Initial program 83.7%
*-commutative83.7%
Simplified83.7%
Taylor expanded in y around inf 83.7%
associate-/l*99.2%
+-commutative99.2%
Simplified99.2%
Final simplification86.6%
(FPCore (x y z t)
:precision binary64
(if (<= x -0.2)
1.0
(if (<= x 1.95e-121)
(/ y t)
(if (<= x 1.75e-84)
x
(if (<= x 100000000.0) (/ y t) (- 1.0 (/ 1.0 x)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -0.2) {
tmp = 1.0;
} else if (x <= 1.95e-121) {
tmp = y / t;
} else if (x <= 1.75e-84) {
tmp = x;
} else if (x <= 100000000.0) {
tmp = y / t;
} else {
tmp = 1.0 - (1.0 / x);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-0.2d0)) then
tmp = 1.0d0
else if (x <= 1.95d-121) then
tmp = y / t
else if (x <= 1.75d-84) then
tmp = x
else if (x <= 100000000.0d0) then
tmp = y / t
else
tmp = 1.0d0 - (1.0d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -0.2) {
tmp = 1.0;
} else if (x <= 1.95e-121) {
tmp = y / t;
} else if (x <= 1.75e-84) {
tmp = x;
} else if (x <= 100000000.0) {
tmp = y / t;
} else {
tmp = 1.0 - (1.0 / x);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -0.2: tmp = 1.0 elif x <= 1.95e-121: tmp = y / t elif x <= 1.75e-84: tmp = x elif x <= 100000000.0: tmp = y / t else: tmp = 1.0 - (1.0 / x) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -0.2) tmp = 1.0; elseif (x <= 1.95e-121) tmp = Float64(y / t); elseif (x <= 1.75e-84) tmp = x; elseif (x <= 100000000.0) tmp = Float64(y / t); else tmp = Float64(1.0 - Float64(1.0 / x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -0.2) tmp = 1.0; elseif (x <= 1.95e-121) tmp = y / t; elseif (x <= 1.75e-84) tmp = x; elseif (x <= 100000000.0) tmp = y / t; else tmp = 1.0 - (1.0 / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -0.2], 1.0, If[LessEqual[x, 1.95e-121], N[(y / t), $MachinePrecision], If[LessEqual[x, 1.75e-84], x, If[LessEqual[x, 100000000.0], N[(y / t), $MachinePrecision], N[(1.0 - N[(1.0 / x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.2:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 1.95 \cdot 10^{-121}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{elif}\;x \leq 1.75 \cdot 10^{-84}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 100000000:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{1}{x}\\
\end{array}
\end{array}
if x < -0.20000000000000001Initial program 91.3%
*-commutative91.3%
Simplified91.3%
Taylor expanded in z around inf 75.7%
Taylor expanded in x around inf 87.1%
if -0.20000000000000001 < x < 1.95e-121 or 1.7500000000000001e-84 < x < 1e8Initial program 90.5%
*-commutative90.5%
Simplified90.5%
Taylor expanded in z around inf 72.5%
Taylor expanded in x around 0 52.7%
if 1.95e-121 < x < 1.7500000000000001e-84Initial program 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around inf 52.1%
+-commutative52.1%
Simplified52.1%
Taylor expanded in x around 0 52.1%
if 1e8 < x Initial program 85.5%
*-commutative85.5%
Simplified85.5%
Taylor expanded in t around inf 85.6%
+-commutative85.6%
Simplified85.6%
Taylor expanded in x around inf 85.6%
Final simplification69.1%
(FPCore (x y z t) :precision binary64 (if (or (<= z -4.6e-16) (not (<= z 7.8e-33))) (/ (+ x (/ y t)) (+ x 1.0)) (/ (+ x (/ 1.0 (/ (- x (* z t)) x))) (+ x 1.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4.6e-16) || !(z <= 7.8e-33)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = (x + (1.0 / ((x - (z * t)) / x))) / (x + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-4.6d-16)) .or. (.not. (z <= 7.8d-33))) then
tmp = (x + (y / t)) / (x + 1.0d0)
else
tmp = (x + (1.0d0 / ((x - (z * t)) / x))) / (x + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4.6e-16) || !(z <= 7.8e-33)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = (x + (1.0 / ((x - (z * t)) / x))) / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -4.6e-16) or not (z <= 7.8e-33): tmp = (x + (y / t)) / (x + 1.0) else: tmp = (x + (1.0 / ((x - (z * t)) / x))) / (x + 1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -4.6e-16) || !(z <= 7.8e-33)) tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); else tmp = Float64(Float64(x + Float64(1.0 / Float64(Float64(x - Float64(z * t)) / x))) / Float64(x + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -4.6e-16) || ~((z <= 7.8e-33))) tmp = (x + (y / t)) / (x + 1.0); else tmp = (x + (1.0 / ((x - (z * t)) / x))) / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -4.6e-16], N[Not[LessEqual[z, 7.8e-33]], $MachinePrecision]], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(1.0 / N[(N[(x - N[(z * t), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.6 \cdot 10^{-16} \lor \neg \left(z \leq 7.8 \cdot 10^{-33}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{1}{\frac{x - z \cdot t}{x}}}{x + 1}\\
\end{array}
\end{array}
if z < -4.5999999999999998e-16 or 7.79999999999999948e-33 < z Initial program 83.4%
*-commutative83.4%
Simplified83.4%
Taylor expanded in z around inf 85.4%
if -4.5999999999999998e-16 < z < 7.79999999999999948e-33Initial program 99.8%
*-commutative99.8%
Simplified99.8%
clear-num99.9%
inv-pow99.9%
fma-neg99.9%
Applied egg-rr99.9%
unpow-199.9%
div-sub99.9%
*-commutative99.9%
div-sub99.9%
fma-neg99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in y around 0 81.6%
Final simplification83.9%
(FPCore (x y z t)
:precision binary64
(if (<= x -0.2)
1.0
(if (<= x 4.2e-120)
(/ y t)
(if (<= x 2.1e-84) x (if (<= x 100000000.0) (/ y t) 1.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -0.2) {
tmp = 1.0;
} else if (x <= 4.2e-120) {
tmp = y / t;
} else if (x <= 2.1e-84) {
tmp = x;
} else if (x <= 100000000.0) {
tmp = y / t;
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-0.2d0)) then
tmp = 1.0d0
else if (x <= 4.2d-120) then
tmp = y / t
else if (x <= 2.1d-84) then
tmp = x
else if (x <= 100000000.0d0) then
tmp = y / t
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -0.2) {
tmp = 1.0;
} else if (x <= 4.2e-120) {
tmp = y / t;
} else if (x <= 2.1e-84) {
tmp = x;
} else if (x <= 100000000.0) {
tmp = y / t;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -0.2: tmp = 1.0 elif x <= 4.2e-120: tmp = y / t elif x <= 2.1e-84: tmp = x elif x <= 100000000.0: tmp = y / t else: tmp = 1.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -0.2) tmp = 1.0; elseif (x <= 4.2e-120) tmp = Float64(y / t); elseif (x <= 2.1e-84) tmp = x; elseif (x <= 100000000.0) tmp = Float64(y / t); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -0.2) tmp = 1.0; elseif (x <= 4.2e-120) tmp = y / t; elseif (x <= 2.1e-84) tmp = x; elseif (x <= 100000000.0) tmp = y / t; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -0.2], 1.0, If[LessEqual[x, 4.2e-120], N[(y / t), $MachinePrecision], If[LessEqual[x, 2.1e-84], x, If[LessEqual[x, 100000000.0], N[(y / t), $MachinePrecision], 1.0]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.2:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{-120}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{-84}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 100000000:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < -0.20000000000000001 or 1e8 < x Initial program 88.2%
*-commutative88.2%
Simplified88.2%
Taylor expanded in z around inf 76.9%
Taylor expanded in x around inf 86.2%
if -0.20000000000000001 < x < 4.2000000000000001e-120 or 2.09999999999999998e-84 < x < 1e8Initial program 90.5%
*-commutative90.5%
Simplified90.5%
Taylor expanded in z around inf 72.5%
Taylor expanded in x around 0 52.7%
if 4.2000000000000001e-120 < x < 2.09999999999999998e-84Initial program 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around inf 52.1%
+-commutative52.1%
Simplified52.1%
Taylor expanded in x around 0 52.1%
Final simplification69.0%
(FPCore (x y z t) :precision binary64 (if (or (<= z -4.2e-16) (not (<= z 2.45e-31))) (/ (+ x (/ y t)) (+ x 1.0)) (/ (+ x (/ x (- x (* z t)))) (+ x 1.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4.2e-16) || !(z <= 2.45e-31)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = (x + (x / (x - (z * t)))) / (x + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-4.2d-16)) .or. (.not. (z <= 2.45d-31))) then
tmp = (x + (y / t)) / (x + 1.0d0)
else
tmp = (x + (x / (x - (z * t)))) / (x + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4.2e-16) || !(z <= 2.45e-31)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = (x + (x / (x - (z * t)))) / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -4.2e-16) or not (z <= 2.45e-31): tmp = (x + (y / t)) / (x + 1.0) else: tmp = (x + (x / (x - (z * t)))) / (x + 1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -4.2e-16) || !(z <= 2.45e-31)) tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); else tmp = Float64(Float64(x + Float64(x / Float64(x - Float64(z * t)))) / Float64(x + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -4.2e-16) || ~((z <= 2.45e-31))) tmp = (x + (y / t)) / (x + 1.0); else tmp = (x + (x / (x - (z * t)))) / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -4.2e-16], N[Not[LessEqual[z, 2.45e-31]], $MachinePrecision]], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(x / N[(x - N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{-16} \lor \neg \left(z \leq 2.45 \cdot 10^{-31}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{x}{x - z \cdot t}}{x + 1}\\
\end{array}
\end{array}
if z < -4.2000000000000002e-16 or 2.45000000000000012e-31 < z Initial program 83.4%
*-commutative83.4%
Simplified83.4%
Taylor expanded in z around inf 85.4%
if -4.2000000000000002e-16 < z < 2.45000000000000012e-31Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in y around 0 81.5%
+-commutative81.5%
Simplified81.5%
Final simplification83.9%
(FPCore (x y z t) :precision binary64 (if (<= x -5.8e+62) 1.0 (if (<= x 2e+46) (/ (+ x (/ y t)) (+ x 1.0)) (- 1.0 (/ 1.0 x)))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -5.8e+62) {
tmp = 1.0;
} else if (x <= 2e+46) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = 1.0 - (1.0 / x);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-5.8d+62)) then
tmp = 1.0d0
else if (x <= 2d+46) then
tmp = (x + (y / t)) / (x + 1.0d0)
else
tmp = 1.0d0 - (1.0d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -5.8e+62) {
tmp = 1.0;
} else if (x <= 2e+46) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = 1.0 - (1.0 / x);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -5.8e+62: tmp = 1.0 elif x <= 2e+46: tmp = (x + (y / t)) / (x + 1.0) else: tmp = 1.0 - (1.0 / x) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -5.8e+62) tmp = 1.0; elseif (x <= 2e+46) tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); else tmp = Float64(1.0 - Float64(1.0 / x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -5.8e+62) tmp = 1.0; elseif (x <= 2e+46) tmp = (x + (y / t)) / (x + 1.0); else tmp = 1.0 - (1.0 / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -5.8e+62], 1.0, If[LessEqual[x, 2e+46], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(1.0 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.8 \cdot 10^{+62}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 2 \cdot 10^{+46}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{1}{x}\\
\end{array}
\end{array}
if x < -5.79999999999999968e62Initial program 88.5%
*-commutative88.5%
Simplified88.5%
Taylor expanded in z around inf 75.9%
Taylor expanded in x around inf 95.4%
if -5.79999999999999968e62 < x < 2e46Initial program 91.6%
*-commutative91.6%
Simplified91.6%
Taylor expanded in z around inf 73.5%
if 2e46 < x Initial program 86.3%
*-commutative86.3%
Simplified86.3%
Taylor expanded in t around inf 91.6%
+-commutative91.6%
Simplified91.6%
Taylor expanded in x around inf 91.6%
Final simplification81.2%
(FPCore (x y z t) :precision binary64 (if (<= x -0.2) 1.0 (if (<= x 4.1e-85) x 1.0)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -0.2) {
tmp = 1.0;
} else if (x <= 4.1e-85) {
tmp = x;
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-0.2d0)) then
tmp = 1.0d0
else if (x <= 4.1d-85) then
tmp = x
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -0.2) {
tmp = 1.0;
} else if (x <= 4.1e-85) {
tmp = x;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -0.2: tmp = 1.0 elif x <= 4.1e-85: tmp = x else: tmp = 1.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -0.2) tmp = 1.0; elseif (x <= 4.1e-85) tmp = x; else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -0.2) tmp = 1.0; elseif (x <= 4.1e-85) tmp = x; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -0.2], 1.0, If[LessEqual[x, 4.1e-85], x, 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.2:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 4.1 \cdot 10^{-85}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < -0.20000000000000001 or 4.09999999999999994e-85 < x Initial program 87.4%
*-commutative87.4%
Simplified87.4%
Taylor expanded in z around inf 75.3%
Taylor expanded in x around inf 78.3%
if -0.20000000000000001 < x < 4.09999999999999994e-85Initial program 92.9%
*-commutative92.9%
Simplified92.9%
Taylor expanded in t around inf 27.6%
+-commutative27.6%
Simplified27.6%
Taylor expanded in x around 0 26.8%
Final simplification55.4%
(FPCore (x y z t) :precision binary64 1.0)
double code(double x, double y, double z, double t) {
return 1.0;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = 1.0d0
end function
public static double code(double x, double y, double z, double t) {
return 1.0;
}
def code(x, y, z, t): return 1.0
function code(x, y, z, t) return 1.0 end
function tmp = code(x, y, z, t) tmp = 1.0; end
code[x_, y_, z_, t_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 89.9%
*-commutative89.9%
Simplified89.9%
Taylor expanded in z around inf 74.3%
Taylor expanded in x around inf 50.2%
Final simplification50.2%
(FPCore (x y z t) :precision binary64 (/ (+ x (- (/ y (- t (/ x z))) (/ x (- (* t z) x)))) (+ x 1.0)))
double code(double x, double y, double z, double t) {
return (x + ((y / (t - (x / z))) - (x / ((t * z) - x)))) / (x + 1.0);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x + ((y / (t - (x / z))) - (x / ((t * z) - x)))) / (x + 1.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x + ((y / (t - (x / z))) - (x / ((t * z) - x)))) / (x + 1.0);
}
def code(x, y, z, t): return (x + ((y / (t - (x / z))) - (x / ((t * z) - x)))) / (x + 1.0)
function code(x, y, z, t) return Float64(Float64(x + Float64(Float64(y / Float64(t - Float64(x / z))) - Float64(x / Float64(Float64(t * z) - x)))) / Float64(x + 1.0)) end
function tmp = code(x, y, z, t) tmp = (x + ((y / (t - (x / z))) - (x / ((t * z) - x)))) / (x + 1.0); end
code[x_, y_, z_, t_] := N[(N[(x + N[(N[(y / N[(t - N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[(N[(t * z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \left(\frac{y}{t - \frac{x}{z}} - \frac{x}{t \cdot z - x}\right)}{x + 1}
\end{array}
herbie shell --seed 2024075
(FPCore (x y z t)
:name "Diagrams.Trail:splitAtParam from diagrams-lib-1.3.0.3, A"
:precision binary64
:alt
(/ (+ x (- (/ y (- t (/ x z))) (/ x (- (* t z) x)))) (+ x 1.0))
(/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))