
(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 19 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) x) (- (* z t) x))) (+ x 1.0)))
(t_2 (/ y (+ x 1.0))))
(if (<= t_1 (- INFINITY))
(* (/ z (fma t z (- x))) t_2)
(if (<= t_1 1e+307)
t_1
(+ (/ x (+ x 1.0)) (/ (- t_2 (/ x (* z (+ x 1.0)))) t))))))
double code(double x, double y, double z, double t) {
double t_1 = (x + (((y * z) - x) / ((z * t) - x))) / (x + 1.0);
double t_2 = y / (x + 1.0);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (z / fma(t, z, -x)) * t_2;
} else if (t_1 <= 1e+307) {
tmp = t_1;
} else {
tmp = (x / (x + 1.0)) + ((t_2 - (x / (z * (x + 1.0)))) / t);
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0)) t_2 = Float64(y / Float64(x + 1.0)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(z / fma(t, z, Float64(-x))) * t_2); elseif (t_1 <= 1e+307) tmp = t_1; else tmp = Float64(Float64(x / Float64(x + 1.0)) + Float64(Float64(t_2 - Float64(x / Float64(z * Float64(x + 1.0)))) / t)); end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(z / N[(t * z + (-x)), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[t$95$1, 1e+307], t$95$1, N[(N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 - N[(x / N[(z * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z - x}{z \cdot t - x}}{x + 1}\\
t_2 := \frac{y}{x + 1}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{z}{\mathsf{fma}\left(t, z, -x\right)} \cdot t\_2\\
\mathbf{elif}\;t\_1 \leq 10^{+307}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + 1} + \frac{t\_2 - \frac{x}{z \cdot \left(x + 1\right)}}{t}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1)) < -inf.0Initial program 38.0%
*-commutative38.0%
Simplified38.0%
Taylor expanded in y around inf 37.2%
times-frac88.3%
+-commutative88.3%
fma-neg88.3%
Simplified88.3%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1)) < 9.99999999999999986e306Initial program 98.5%
if 9.99999999999999986e306 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1)) Initial program 6.7%
*-commutative6.7%
Simplified6.7%
Taylor expanded in t around -inf 87.6%
+-commutative87.6%
mul-1-neg87.6%
unsub-neg87.6%
+-commutative87.6%
sub-neg87.6%
mul-1-neg87.6%
distribute-neg-frac287.6%
distribute-neg-in87.6%
metadata-eval87.6%
unsub-neg87.6%
mul-1-neg87.6%
remove-double-neg87.6%
+-commutative87.6%
Simplified87.6%
Final simplification96.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* z t) x)) (t_2 (/ (+ x (/ (- (* y z) x) t_1)) (+ x 1.0))))
(if (<= t_2 (- INFINITY))
(* y (/ z (* t_1 (+ x 1.0))))
(if (<= t_2 1e+307)
t_2
(+ (/ x (+ x 1.0)) (/ (- (/ y (+ x 1.0)) (/ x (* z (+ x 1.0)))) t))))))
double code(double x, double y, double z, double t) {
double t_1 = (z * t) - x;
double t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = y * (z / (t_1 * (x + 1.0)));
} else if (t_2 <= 1e+307) {
tmp = t_2;
} else {
tmp = (x / (x + 1.0)) + (((y / (x + 1.0)) - (x / (z * (x + 1.0)))) / t);
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double t_1 = (z * t) - x;
double t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0);
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = y * (z / (t_1 * (x + 1.0)));
} else if (t_2 <= 1e+307) {
tmp = t_2;
} else {
tmp = (x / (x + 1.0)) + (((y / (x + 1.0)) - (x / (z * (x + 1.0)))) / t);
}
return tmp;
}
def code(x, y, z, t): t_1 = (z * t) - x t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0) tmp = 0 if t_2 <= -math.inf: tmp = y * (z / (t_1 * (x + 1.0))) elif t_2 <= 1e+307: tmp = t_2 else: tmp = (x / (x + 1.0)) + (((y / (x + 1.0)) - (x / (z * (x + 1.0)))) / t) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(z * t) - x) t_2 = Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / t_1)) / Float64(x + 1.0)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(y * Float64(z / Float64(t_1 * Float64(x + 1.0)))); elseif (t_2 <= 1e+307) tmp = t_2; else tmp = Float64(Float64(x / Float64(x + 1.0)) + Float64(Float64(Float64(y / Float64(x + 1.0)) - Float64(x / Float64(z * Float64(x + 1.0)))) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (z * t) - x; t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0); tmp = 0.0; if (t_2 <= -Inf) tmp = y * (z / (t_1 * (x + 1.0))); elseif (t_2 <= 1e+307) tmp = t_2; else tmp = (x / (x + 1.0)) + (((y / (x + 1.0)) - (x / (z * (x + 1.0)))) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(y * N[(z / N[(t$95$1 * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+307], t$95$2, N[(N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] - N[(x / N[(z * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot t - x\\
t_2 := \frac{x + \frac{y \cdot z - x}{t\_1}}{x + 1}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;y \cdot \frac{z}{t\_1 \cdot \left(x + 1\right)}\\
\mathbf{elif}\;t\_2 \leq 10^{+307}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + 1} + \frac{\frac{y}{x + 1} - \frac{x}{z \cdot \left(x + 1\right)}}{t}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1)) < -inf.0Initial program 38.0%
*-commutative38.0%
Simplified38.0%
Taylor expanded in y around inf 37.2%
associate-/l*71.1%
+-commutative71.1%
fma-neg71.1%
Simplified71.1%
Taylor expanded in y around 0 37.2%
associate-/l*71.1%
+-commutative71.1%
Simplified71.1%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1)) < 9.99999999999999986e306Initial program 98.5%
if 9.99999999999999986e306 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1)) Initial program 6.7%
*-commutative6.7%
Simplified6.7%
Taylor expanded in t around -inf 87.6%
+-commutative87.6%
mul-1-neg87.6%
unsub-neg87.6%
+-commutative87.6%
sub-neg87.6%
mul-1-neg87.6%
distribute-neg-frac287.6%
distribute-neg-in87.6%
metadata-eval87.6%
unsub-neg87.6%
mul-1-neg87.6%
remove-double-neg87.6%
+-commutative87.6%
Simplified87.6%
Final simplification95.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* z t) x)) (t_2 (/ (+ x (/ (- (* y z) x) t_1)) (+ x 1.0))))
(if (<= t_2 (- INFINITY))
(* y (/ z (* t_1 (+ x 1.0))))
(if (<= t_2 1e+307) t_2 (+ (/ x (+ x 1.0)) (/ y (* t (+ x 1.0))))))))
double code(double x, double y, double z, double t) {
double t_1 = (z * t) - x;
double t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = y * (z / (t_1 * (x + 1.0)));
} else if (t_2 <= 1e+307) {
tmp = t_2;
} else {
tmp = (x / (x + 1.0)) + (y / (t * (x + 1.0)));
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double t_1 = (z * t) - x;
double t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0);
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = y * (z / (t_1 * (x + 1.0)));
} else if (t_2 <= 1e+307) {
tmp = t_2;
} else {
tmp = (x / (x + 1.0)) + (y / (t * (x + 1.0)));
}
return tmp;
}
def code(x, y, z, t): t_1 = (z * t) - x t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0) tmp = 0 if t_2 <= -math.inf: tmp = y * (z / (t_1 * (x + 1.0))) elif t_2 <= 1e+307: tmp = t_2 else: tmp = (x / (x + 1.0)) + (y / (t * (x + 1.0))) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(z * t) - x) t_2 = Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / t_1)) / Float64(x + 1.0)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(y * Float64(z / Float64(t_1 * Float64(x + 1.0)))); elseif (t_2 <= 1e+307) tmp = t_2; else tmp = Float64(Float64(x / Float64(x + 1.0)) + Float64(y / Float64(t * Float64(x + 1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (z * t) - x; t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0); tmp = 0.0; if (t_2 <= -Inf) tmp = y * (z / (t_1 * (x + 1.0))); elseif (t_2 <= 1e+307) tmp = t_2; else tmp = (x / (x + 1.0)) + (y / (t * (x + 1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(y * N[(z / N[(t$95$1 * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+307], t$95$2, N[(N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot t - x\\
t_2 := \frac{x + \frac{y \cdot z - x}{t\_1}}{x + 1}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;y \cdot \frac{z}{t\_1 \cdot \left(x + 1\right)}\\
\mathbf{elif}\;t\_2 \leq 10^{+307}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + 1} + \frac{y}{t \cdot \left(x + 1\right)}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1)) < -inf.0Initial program 38.0%
*-commutative38.0%
Simplified38.0%
Taylor expanded in y around inf 37.2%
associate-/l*71.1%
+-commutative71.1%
fma-neg71.1%
Simplified71.1%
Taylor expanded in y around 0 37.2%
associate-/l*71.1%
+-commutative71.1%
Simplified71.1%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1)) < 9.99999999999999986e306Initial program 98.5%
if 9.99999999999999986e306 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1)) Initial program 6.7%
*-commutative6.7%
Simplified6.7%
Taylor expanded in y around inf 6.7%
Taylor expanded in t around inf 87.5%
+-commutative87.5%
+-commutative87.5%
Simplified87.5%
Final simplification95.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (+ x 1.0))) (t_2 (- 1.0 (/ (* y z) x))))
(if (<= x -4.5e-14)
t_1
(if (<= x -2.65e-83)
(- 1.0 (* z (/ y x)))
(if (<= x -8.2e-131)
t_1
(if (<= x -8.2e-160)
t_2
(if (<= x -7.6e-172)
t_1
(if (<= x 9.8e-110) (/ y t) (if (<= x 6.2e-23) t_2 t_1)))))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (x + 1.0);
double t_2 = 1.0 - ((y * z) / x);
double tmp;
if (x <= -4.5e-14) {
tmp = t_1;
} else if (x <= -2.65e-83) {
tmp = 1.0 - (z * (y / x));
} else if (x <= -8.2e-131) {
tmp = t_1;
} else if (x <= -8.2e-160) {
tmp = t_2;
} else if (x <= -7.6e-172) {
tmp = t_1;
} else if (x <= 9.8e-110) {
tmp = y / t;
} else if (x <= 6.2e-23) {
tmp = t_2;
} else {
tmp = t_1;
}
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 / (x + 1.0d0)
t_2 = 1.0d0 - ((y * z) / x)
if (x <= (-4.5d-14)) then
tmp = t_1
else if (x <= (-2.65d-83)) then
tmp = 1.0d0 - (z * (y / x))
else if (x <= (-8.2d-131)) then
tmp = t_1
else if (x <= (-8.2d-160)) then
tmp = t_2
else if (x <= (-7.6d-172)) then
tmp = t_1
else if (x <= 9.8d-110) then
tmp = y / t
else if (x <= 6.2d-23) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x / (x + 1.0);
double t_2 = 1.0 - ((y * z) / x);
double tmp;
if (x <= -4.5e-14) {
tmp = t_1;
} else if (x <= -2.65e-83) {
tmp = 1.0 - (z * (y / x));
} else if (x <= -8.2e-131) {
tmp = t_1;
} else if (x <= -8.2e-160) {
tmp = t_2;
} else if (x <= -7.6e-172) {
tmp = t_1;
} else if (x <= 9.8e-110) {
tmp = y / t;
} else if (x <= 6.2e-23) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (x + 1.0) t_2 = 1.0 - ((y * z) / x) tmp = 0 if x <= -4.5e-14: tmp = t_1 elif x <= -2.65e-83: tmp = 1.0 - (z * (y / x)) elif x <= -8.2e-131: tmp = t_1 elif x <= -8.2e-160: tmp = t_2 elif x <= -7.6e-172: tmp = t_1 elif x <= 9.8e-110: tmp = y / t elif x <= 6.2e-23: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(x + 1.0)) t_2 = Float64(1.0 - Float64(Float64(y * z) / x)) tmp = 0.0 if (x <= -4.5e-14) tmp = t_1; elseif (x <= -2.65e-83) tmp = Float64(1.0 - Float64(z * Float64(y / x))); elseif (x <= -8.2e-131) tmp = t_1; elseif (x <= -8.2e-160) tmp = t_2; elseif (x <= -7.6e-172) tmp = t_1; elseif (x <= 9.8e-110) tmp = Float64(y / t); elseif (x <= 6.2e-23) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (x + 1.0); t_2 = 1.0 - ((y * z) / x); tmp = 0.0; if (x <= -4.5e-14) tmp = t_1; elseif (x <= -2.65e-83) tmp = 1.0 - (z * (y / x)); elseif (x <= -8.2e-131) tmp = t_1; elseif (x <= -8.2e-160) tmp = t_2; elseif (x <= -7.6e-172) tmp = t_1; elseif (x <= 9.8e-110) tmp = y / t; elseif (x <= 6.2e-23) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 - N[(N[(y * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.5e-14], t$95$1, If[LessEqual[x, -2.65e-83], N[(1.0 - N[(z * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -8.2e-131], t$95$1, If[LessEqual[x, -8.2e-160], t$95$2, If[LessEqual[x, -7.6e-172], t$95$1, If[LessEqual[x, 9.8e-110], N[(y / t), $MachinePrecision], If[LessEqual[x, 6.2e-23], t$95$2, t$95$1]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + 1}\\
t_2 := 1 - \frac{y \cdot z}{x}\\
\mathbf{if}\;x \leq -4.5 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -2.65 \cdot 10^{-83}:\\
\;\;\;\;1 - z \cdot \frac{y}{x}\\
\mathbf{elif}\;x \leq -8.2 \cdot 10^{-131}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -8.2 \cdot 10^{-160}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -7.6 \cdot 10^{-172}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 9.8 \cdot 10^{-110}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{-23}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -4.4999999999999998e-14 or -2.65e-83 < x < -8.2000000000000004e-131 or -8.20000000000000003e-160 < x < -7.59999999999999974e-172 or 6.1999999999999998e-23 < x Initial program 83.9%
*-commutative83.9%
Simplified83.9%
Taylor expanded in t around inf 81.5%
+-commutative81.5%
Simplified81.5%
if -4.4999999999999998e-14 < x < -2.65e-83Initial program 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in z around 0 63.5%
Taylor expanded in y around inf 64.1%
mul-1-neg64.1%
distribute-rgt-in64.1%
*-lft-identity64.1%
unpow264.1%
associate-*l/64.1%
*-commutative64.1%
distribute-rgt-neg-in64.1%
*-lft-identity64.1%
unpow264.1%
distribute-rgt-in64.1%
associate-/r*64.1%
distribute-neg-frac64.1%
distribute-neg-frac264.1%
Simplified64.1%
Taylor expanded in x around 0 64.1%
mul-1-neg64.1%
*-commutative64.1%
associate-*r/64.1%
distribute-rgt-neg-in64.1%
distribute-neg-frac264.1%
Simplified64.1%
if -8.2000000000000004e-131 < x < -8.20000000000000003e-160 or 9.7999999999999995e-110 < x < 6.1999999999999998e-23Initial program 96.0%
*-commutative96.0%
Simplified96.0%
Taylor expanded in z around 0 47.0%
Taylor expanded in y around inf 62.5%
mul-1-neg62.5%
distribute-rgt-in62.5%
*-lft-identity62.5%
unpow262.5%
associate-*l/47.2%
*-commutative47.2%
distribute-rgt-neg-in47.2%
*-lft-identity47.2%
unpow247.2%
distribute-rgt-in47.2%
associate-/r*47.2%
distribute-neg-frac47.2%
distribute-neg-frac247.2%
Simplified47.2%
Taylor expanded in x around 0 62.5%
associate-*r/62.5%
neg-mul-162.5%
distribute-rgt-neg-in62.5%
Simplified62.5%
if -7.59999999999999974e-172 < x < 9.7999999999999995e-110Initial program 87.0%
*-commutative87.0%
Simplified87.0%
Taylor expanded in z around inf 81.2%
clear-num81.2%
inv-pow81.2%
Applied egg-rr81.2%
unpow-181.2%
+-commutative81.2%
Simplified81.2%
Taylor expanded in x around 0 64.8%
Final simplification74.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (+ 1.0 (/ -1.0 (* z t)))))
(t_2 (/ x (+ x 1.0)))
(t_3 (- 1.0 (/ (* y z) x))))
(if (<= x -1.7e-14)
t_2
(if (<= x -7.8e-82)
(- 1.0 (* z (/ y x)))
(if (<= x -1.5e-131)
t_1
(if (<= x -1.7e-159)
t_3
(if (<= x -4.9e-242)
t_1
(if (<= x 9e-110) (/ y t) (if (<= x 1.35e-33) t_3 t_2)))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 + (-1.0 / (z * t)));
double t_2 = x / (x + 1.0);
double t_3 = 1.0 - ((y * z) / x);
double tmp;
if (x <= -1.7e-14) {
tmp = t_2;
} else if (x <= -7.8e-82) {
tmp = 1.0 - (z * (y / x));
} else if (x <= -1.5e-131) {
tmp = t_1;
} else if (x <= -1.7e-159) {
tmp = t_3;
} else if (x <= -4.9e-242) {
tmp = t_1;
} else if (x <= 9e-110) {
tmp = y / t;
} else if (x <= 1.35e-33) {
tmp = t_3;
} 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) :: t_3
real(8) :: tmp
t_1 = x * (1.0d0 + ((-1.0d0) / (z * t)))
t_2 = x / (x + 1.0d0)
t_3 = 1.0d0 - ((y * z) / x)
if (x <= (-1.7d-14)) then
tmp = t_2
else if (x <= (-7.8d-82)) then
tmp = 1.0d0 - (z * (y / x))
else if (x <= (-1.5d-131)) then
tmp = t_1
else if (x <= (-1.7d-159)) then
tmp = t_3
else if (x <= (-4.9d-242)) then
tmp = t_1
else if (x <= 9d-110) then
tmp = y / t
else if (x <= 1.35d-33) then
tmp = t_3
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 = x * (1.0 + (-1.0 / (z * t)));
double t_2 = x / (x + 1.0);
double t_3 = 1.0 - ((y * z) / x);
double tmp;
if (x <= -1.7e-14) {
tmp = t_2;
} else if (x <= -7.8e-82) {
tmp = 1.0 - (z * (y / x));
} else if (x <= -1.5e-131) {
tmp = t_1;
} else if (x <= -1.7e-159) {
tmp = t_3;
} else if (x <= -4.9e-242) {
tmp = t_1;
} else if (x <= 9e-110) {
tmp = y / t;
} else if (x <= 1.35e-33) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (1.0 + (-1.0 / (z * t))) t_2 = x / (x + 1.0) t_3 = 1.0 - ((y * z) / x) tmp = 0 if x <= -1.7e-14: tmp = t_2 elif x <= -7.8e-82: tmp = 1.0 - (z * (y / x)) elif x <= -1.5e-131: tmp = t_1 elif x <= -1.7e-159: tmp = t_3 elif x <= -4.9e-242: tmp = t_1 elif x <= 9e-110: tmp = y / t elif x <= 1.35e-33: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(1.0 + Float64(-1.0 / Float64(z * t)))) t_2 = Float64(x / Float64(x + 1.0)) t_3 = Float64(1.0 - Float64(Float64(y * z) / x)) tmp = 0.0 if (x <= -1.7e-14) tmp = t_2; elseif (x <= -7.8e-82) tmp = Float64(1.0 - Float64(z * Float64(y / x))); elseif (x <= -1.5e-131) tmp = t_1; elseif (x <= -1.7e-159) tmp = t_3; elseif (x <= -4.9e-242) tmp = t_1; elseif (x <= 9e-110) tmp = Float64(y / t); elseif (x <= 1.35e-33) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (1.0 + (-1.0 / (z * t))); t_2 = x / (x + 1.0); t_3 = 1.0 - ((y * z) / x); tmp = 0.0; if (x <= -1.7e-14) tmp = t_2; elseif (x <= -7.8e-82) tmp = 1.0 - (z * (y / x)); elseif (x <= -1.5e-131) tmp = t_1; elseif (x <= -1.7e-159) tmp = t_3; elseif (x <= -4.9e-242) tmp = t_1; elseif (x <= 9e-110) tmp = y / t; elseif (x <= 1.35e-33) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(1.0 + N[(-1.0 / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(1.0 - N[(N[(y * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.7e-14], t$95$2, If[LessEqual[x, -7.8e-82], N[(1.0 - N[(z * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.5e-131], t$95$1, If[LessEqual[x, -1.7e-159], t$95$3, If[LessEqual[x, -4.9e-242], t$95$1, If[LessEqual[x, 9e-110], N[(y / t), $MachinePrecision], If[LessEqual[x, 1.35e-33], t$95$3, t$95$2]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 + \frac{-1}{z \cdot t}\right)\\
t_2 := \frac{x}{x + 1}\\
t_3 := 1 - \frac{y \cdot z}{x}\\
\mathbf{if}\;x \leq -1.7 \cdot 10^{-14}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -7.8 \cdot 10^{-82}:\\
\;\;\;\;1 - z \cdot \frac{y}{x}\\
\mathbf{elif}\;x \leq -1.5 \cdot 10^{-131}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -1.7 \cdot 10^{-159}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq -4.9 \cdot 10^{-242}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 9 \cdot 10^{-110}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{elif}\;x \leq 1.35 \cdot 10^{-33}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -1.70000000000000001e-14 or 1.35e-33 < x Initial program 83.7%
*-commutative83.7%
Simplified83.7%
Taylor expanded in t around inf 83.1%
+-commutative83.1%
Simplified83.1%
if -1.70000000000000001e-14 < x < -7.79999999999999947e-82Initial program 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in z around 0 63.5%
Taylor expanded in y around inf 64.1%
mul-1-neg64.1%
distribute-rgt-in64.1%
*-lft-identity64.1%
unpow264.1%
associate-*l/64.1%
*-commutative64.1%
distribute-rgt-neg-in64.1%
*-lft-identity64.1%
unpow264.1%
distribute-rgt-in64.1%
associate-/r*64.1%
distribute-neg-frac64.1%
distribute-neg-frac264.1%
Simplified64.1%
Taylor expanded in x around 0 64.1%
mul-1-neg64.1%
*-commutative64.1%
associate-*r/64.1%
distribute-rgt-neg-in64.1%
distribute-neg-frac264.1%
Simplified64.1%
if -7.79999999999999947e-82 < x < -1.49999999999999998e-131 or -1.69999999999999992e-159 < x < -4.90000000000000002e-242Initial program 89.0%
*-commutative89.0%
Simplified89.0%
Taylor expanded in y around 0 64.1%
Taylor expanded in x around 0 57.3%
if -1.49999999999999998e-131 < x < -1.69999999999999992e-159 or 9.0000000000000002e-110 < x < 1.35e-33Initial program 96.0%
*-commutative96.0%
Simplified96.0%
Taylor expanded in z around 0 47.0%
Taylor expanded in y around inf 62.5%
mul-1-neg62.5%
distribute-rgt-in62.5%
*-lft-identity62.5%
unpow262.5%
associate-*l/47.2%
*-commutative47.2%
distribute-rgt-neg-in47.2%
*-lft-identity47.2%
unpow247.2%
distribute-rgt-in47.2%
associate-/r*47.2%
distribute-neg-frac47.2%
distribute-neg-frac247.2%
Simplified47.2%
Taylor expanded in x around 0 62.5%
associate-*r/62.5%
neg-mul-162.5%
distribute-rgt-neg-in62.5%
Simplified62.5%
if -4.90000000000000002e-242 < x < 9.0000000000000002e-110Initial program 85.9%
*-commutative85.9%
Simplified85.9%
Taylor expanded in z around inf 82.1%
clear-num82.0%
inv-pow82.0%
Applied egg-rr82.0%
unpow-182.0%
+-commutative82.0%
Simplified82.0%
Taylor expanded in x around 0 70.1%
Final simplification74.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- 1.0 (/ (* y z) x)))
(t_2 (* x (+ 1.0 (/ -1.0 (* z t)))))
(t_3 (/ x (+ x 1.0))))
(if (<= x -4.8e-14)
t_3
(if (<= x -1.3e-82)
(+ 1.0 (* z (- y (/ y x))))
(if (<= x -1.35e-131)
t_2
(if (<= x -4.6e-159)
t_1
(if (<= x -4.9e-242)
t_2
(if (<= x 1.25e-109) (/ y t) (if (<= x 7.8e-39) t_1 t_3)))))))))
double code(double x, double y, double z, double t) {
double t_1 = 1.0 - ((y * z) / x);
double t_2 = x * (1.0 + (-1.0 / (z * t)));
double t_3 = x / (x + 1.0);
double tmp;
if (x <= -4.8e-14) {
tmp = t_3;
} else if (x <= -1.3e-82) {
tmp = 1.0 + (z * (y - (y / x)));
} else if (x <= -1.35e-131) {
tmp = t_2;
} else if (x <= -4.6e-159) {
tmp = t_1;
} else if (x <= -4.9e-242) {
tmp = t_2;
} else if (x <= 1.25e-109) {
tmp = y / t;
} else if (x <= 7.8e-39) {
tmp = t_1;
} else {
tmp = t_3;
}
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) :: t_3
real(8) :: tmp
t_1 = 1.0d0 - ((y * z) / x)
t_2 = x * (1.0d0 + ((-1.0d0) / (z * t)))
t_3 = x / (x + 1.0d0)
if (x <= (-4.8d-14)) then
tmp = t_3
else if (x <= (-1.3d-82)) then
tmp = 1.0d0 + (z * (y - (y / x)))
else if (x <= (-1.35d-131)) then
tmp = t_2
else if (x <= (-4.6d-159)) then
tmp = t_1
else if (x <= (-4.9d-242)) then
tmp = t_2
else if (x <= 1.25d-109) then
tmp = y / t
else if (x <= 7.8d-39) then
tmp = t_1
else
tmp = t_3
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);
double t_2 = x * (1.0 + (-1.0 / (z * t)));
double t_3 = x / (x + 1.0);
double tmp;
if (x <= -4.8e-14) {
tmp = t_3;
} else if (x <= -1.3e-82) {
tmp = 1.0 + (z * (y - (y / x)));
} else if (x <= -1.35e-131) {
tmp = t_2;
} else if (x <= -4.6e-159) {
tmp = t_1;
} else if (x <= -4.9e-242) {
tmp = t_2;
} else if (x <= 1.25e-109) {
tmp = y / t;
} else if (x <= 7.8e-39) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t): t_1 = 1.0 - ((y * z) / x) t_2 = x * (1.0 + (-1.0 / (z * t))) t_3 = x / (x + 1.0) tmp = 0 if x <= -4.8e-14: tmp = t_3 elif x <= -1.3e-82: tmp = 1.0 + (z * (y - (y / x))) elif x <= -1.35e-131: tmp = t_2 elif x <= -4.6e-159: tmp = t_1 elif x <= -4.9e-242: tmp = t_2 elif x <= 1.25e-109: tmp = y / t elif x <= 7.8e-39: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t) t_1 = Float64(1.0 - Float64(Float64(y * z) / x)) t_2 = Float64(x * Float64(1.0 + Float64(-1.0 / Float64(z * t)))) t_3 = Float64(x / Float64(x + 1.0)) tmp = 0.0 if (x <= -4.8e-14) tmp = t_3; elseif (x <= -1.3e-82) tmp = Float64(1.0 + Float64(z * Float64(y - Float64(y / x)))); elseif (x <= -1.35e-131) tmp = t_2; elseif (x <= -4.6e-159) tmp = t_1; elseif (x <= -4.9e-242) tmp = t_2; elseif (x <= 1.25e-109) tmp = Float64(y / t); elseif (x <= 7.8e-39) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 1.0 - ((y * z) / x); t_2 = x * (1.0 + (-1.0 / (z * t))); t_3 = x / (x + 1.0); tmp = 0.0; if (x <= -4.8e-14) tmp = t_3; elseif (x <= -1.3e-82) tmp = 1.0 + (z * (y - (y / x))); elseif (x <= -1.35e-131) tmp = t_2; elseif (x <= -4.6e-159) tmp = t_1; elseif (x <= -4.9e-242) tmp = t_2; elseif (x <= 1.25e-109) tmp = y / t; elseif (x <= 7.8e-39) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(1.0 - N[(N[(y * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 + N[(-1.0 / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.8e-14], t$95$3, If[LessEqual[x, -1.3e-82], N[(1.0 + N[(z * N[(y - N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.35e-131], t$95$2, If[LessEqual[x, -4.6e-159], t$95$1, If[LessEqual[x, -4.9e-242], t$95$2, If[LessEqual[x, 1.25e-109], N[(y / t), $MachinePrecision], If[LessEqual[x, 7.8e-39], t$95$1, t$95$3]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 - \frac{y \cdot z}{x}\\
t_2 := x \cdot \left(1 + \frac{-1}{z \cdot t}\right)\\
t_3 := \frac{x}{x + 1}\\
\mathbf{if}\;x \leq -4.8 \cdot 10^{-14}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq -1.3 \cdot 10^{-82}:\\
\;\;\;\;1 + z \cdot \left(y - \frac{y}{x}\right)\\
\mathbf{elif}\;x \leq -1.35 \cdot 10^{-131}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -4.6 \cdot 10^{-159}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -4.9 \cdot 10^{-242}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 1.25 \cdot 10^{-109}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{elif}\;x \leq 7.8 \cdot 10^{-39}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if x < -4.8e-14 or 7.80000000000000059e-39 < x Initial program 83.7%
*-commutative83.7%
Simplified83.7%
Taylor expanded in t around inf 83.1%
+-commutative83.1%
Simplified83.1%
if -4.8e-14 < x < -1.3e-82Initial program 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in z around 0 63.5%
Taylor expanded in y around inf 64.1%
mul-1-neg64.1%
distribute-rgt-in64.1%
*-lft-identity64.1%
unpow264.1%
associate-*l/64.1%
*-commutative64.1%
distribute-rgt-neg-in64.1%
*-lft-identity64.1%
unpow264.1%
distribute-rgt-in64.1%
associate-/r*64.1%
distribute-neg-frac64.1%
distribute-neg-frac264.1%
Simplified64.1%
Taylor expanded in x around 0 64.1%
mul-1-neg64.1%
unsub-neg64.1%
Simplified64.1%
if -1.3e-82 < x < -1.35000000000000011e-131 or -4.59999999999999957e-159 < x < -4.90000000000000002e-242Initial program 89.0%
*-commutative89.0%
Simplified89.0%
Taylor expanded in y around 0 64.1%
Taylor expanded in x around 0 57.3%
if -1.35000000000000011e-131 < x < -4.59999999999999957e-159 or 1.25000000000000005e-109 < x < 7.80000000000000059e-39Initial program 96.0%
*-commutative96.0%
Simplified96.0%
Taylor expanded in z around 0 47.0%
Taylor expanded in y around inf 62.5%
mul-1-neg62.5%
distribute-rgt-in62.5%
*-lft-identity62.5%
unpow262.5%
associate-*l/47.2%
*-commutative47.2%
distribute-rgt-neg-in47.2%
*-lft-identity47.2%
unpow247.2%
distribute-rgt-in47.2%
associate-/r*47.2%
distribute-neg-frac47.2%
distribute-neg-frac247.2%
Simplified47.2%
Taylor expanded in x around 0 62.5%
associate-*r/62.5%
neg-mul-162.5%
distribute-rgt-neg-in62.5%
Simplified62.5%
if -4.90000000000000002e-242 < x < 1.25000000000000005e-109Initial program 85.9%
*-commutative85.9%
Simplified85.9%
Taylor expanded in z around inf 82.1%
clear-num82.0%
inv-pow82.0%
Applied egg-rr82.0%
unpow-182.0%
+-commutative82.0%
Simplified82.0%
Taylor expanded in x around 0 70.1%
Final simplification74.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- 1.0 (/ (* y z) x))) (t_2 (+ (/ x (+ x 1.0)) (/ y t))))
(if (<= x -2.75e-18)
1.0
(if (<= x -1.35e-131)
t_2
(if (<= x -1.2e-140)
t_1
(if (<= x 1.05e-61)
t_2
(if (<= x 3e-35) t_1 (if (<= x 8.6e+58) t_2 1.0))))))))
double code(double x, double y, double z, double t) {
double t_1 = 1.0 - ((y * z) / x);
double t_2 = (x / (x + 1.0)) + (y / t);
double tmp;
if (x <= -2.75e-18) {
tmp = 1.0;
} else if (x <= -1.35e-131) {
tmp = t_2;
} else if (x <= -1.2e-140) {
tmp = t_1;
} else if (x <= 1.05e-61) {
tmp = t_2;
} else if (x <= 3e-35) {
tmp = t_1;
} else if (x <= 8.6e+58) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = 1.0d0 - ((y * z) / x)
t_2 = (x / (x + 1.0d0)) + (y / t)
if (x <= (-2.75d-18)) then
tmp = 1.0d0
else if (x <= (-1.35d-131)) then
tmp = t_2
else if (x <= (-1.2d-140)) then
tmp = t_1
else if (x <= 1.05d-61) then
tmp = t_2
else if (x <= 3d-35) then
tmp = t_1
else if (x <= 8.6d+58) then
tmp = t_2
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 = 1.0 - ((y * z) / x);
double t_2 = (x / (x + 1.0)) + (y / t);
double tmp;
if (x <= -2.75e-18) {
tmp = 1.0;
} else if (x <= -1.35e-131) {
tmp = t_2;
} else if (x <= -1.2e-140) {
tmp = t_1;
} else if (x <= 1.05e-61) {
tmp = t_2;
} else if (x <= 3e-35) {
tmp = t_1;
} else if (x <= 8.6e+58) {
tmp = t_2;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t): t_1 = 1.0 - ((y * z) / x) t_2 = (x / (x + 1.0)) + (y / t) tmp = 0 if x <= -2.75e-18: tmp = 1.0 elif x <= -1.35e-131: tmp = t_2 elif x <= -1.2e-140: tmp = t_1 elif x <= 1.05e-61: tmp = t_2 elif x <= 3e-35: tmp = t_1 elif x <= 8.6e+58: tmp = t_2 else: tmp = 1.0 return tmp
function code(x, y, z, t) t_1 = Float64(1.0 - Float64(Float64(y * z) / x)) t_2 = Float64(Float64(x / Float64(x + 1.0)) + Float64(y / t)) tmp = 0.0 if (x <= -2.75e-18) tmp = 1.0; elseif (x <= -1.35e-131) tmp = t_2; elseif (x <= -1.2e-140) tmp = t_1; elseif (x <= 1.05e-61) tmp = t_2; elseif (x <= 3e-35) tmp = t_1; elseif (x <= 8.6e+58) tmp = t_2; else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 1.0 - ((y * z) / x); t_2 = (x / (x + 1.0)) + (y / t); tmp = 0.0; if (x <= -2.75e-18) tmp = 1.0; elseif (x <= -1.35e-131) tmp = t_2; elseif (x <= -1.2e-140) tmp = t_1; elseif (x <= 1.05e-61) tmp = t_2; elseif (x <= 3e-35) tmp = t_1; elseif (x <= 8.6e+58) tmp = t_2; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(1.0 - N[(N[(y * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] + N[(y / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.75e-18], 1.0, If[LessEqual[x, -1.35e-131], t$95$2, If[LessEqual[x, -1.2e-140], t$95$1, If[LessEqual[x, 1.05e-61], t$95$2, If[LessEqual[x, 3e-35], t$95$1, If[LessEqual[x, 8.6e+58], t$95$2, 1.0]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 - \frac{y \cdot z}{x}\\
t_2 := \frac{x}{x + 1} + \frac{y}{t}\\
\mathbf{if}\;x \leq -2.75 \cdot 10^{-18}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq -1.35 \cdot 10^{-131}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -1.2 \cdot 10^{-140}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{-61}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 3 \cdot 10^{-35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 8.6 \cdot 10^{+58}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < -2.75e-18 or 8.59999999999999982e58 < x Initial program 83.4%
*-commutative83.4%
Simplified83.4%
Taylor expanded in z around inf 72.1%
clear-num72.0%
inv-pow72.0%
Applied egg-rr72.0%
unpow-172.0%
+-commutative72.0%
Simplified72.0%
Taylor expanded in x around inf 86.9%
if -2.75e-18 < x < -1.35000000000000011e-131 or -1.19999999999999993e-140 < x < 1.05e-61 or 2.99999999999999989e-35 < x < 8.59999999999999982e58Initial program 88.6%
*-commutative88.6%
Simplified88.6%
Taylor expanded in y around inf 77.0%
Taylor expanded in t around inf 77.3%
+-commutative77.3%
+-commutative77.3%
Simplified77.3%
Taylor expanded in x around 0 75.2%
if -1.35000000000000011e-131 < x < -1.19999999999999993e-140 or 1.05e-61 < x < 2.99999999999999989e-35Initial program 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in z around 0 70.3%
Taylor expanded in y around inf 85.6%
mul-1-neg85.6%
distribute-rgt-in85.6%
*-lft-identity85.6%
unpow285.6%
associate-*l/69.8%
*-commutative69.8%
distribute-rgt-neg-in69.8%
*-lft-identity69.8%
unpow269.8%
distribute-rgt-in69.8%
associate-/r*69.8%
distribute-neg-frac69.8%
distribute-neg-frac269.8%
Simplified69.8%
Taylor expanded in x around 0 85.6%
associate-*r/85.6%
neg-mul-185.6%
distribute-rgt-neg-in85.6%
Simplified85.6%
Final simplification81.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (+ x 1.0))) (t_2 (- 1.0 (* z (/ y x)))))
(if (<= x -2.65e-14)
t_1
(if (<= x -1.02e-81)
t_2
(if (<= x -7.6e-172)
(* x (/ 1.0 (+ x 1.0)))
(if (<= x 1.03e-109)
(/ y t)
(if (<= x 7.5e-25) t_2 (if (<= x 1.55e-19) (/ y t) t_1))))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (x + 1.0);
double t_2 = 1.0 - (z * (y / x));
double tmp;
if (x <= -2.65e-14) {
tmp = t_1;
} else if (x <= -1.02e-81) {
tmp = t_2;
} else if (x <= -7.6e-172) {
tmp = x * (1.0 / (x + 1.0));
} else if (x <= 1.03e-109) {
tmp = y / t;
} else if (x <= 7.5e-25) {
tmp = t_2;
} else if (x <= 1.55e-19) {
tmp = y / t;
} else {
tmp = t_1;
}
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 / (x + 1.0d0)
t_2 = 1.0d0 - (z * (y / x))
if (x <= (-2.65d-14)) then
tmp = t_1
else if (x <= (-1.02d-81)) then
tmp = t_2
else if (x <= (-7.6d-172)) then
tmp = x * (1.0d0 / (x + 1.0d0))
else if (x <= 1.03d-109) then
tmp = y / t
else if (x <= 7.5d-25) then
tmp = t_2
else if (x <= 1.55d-19) then
tmp = y / t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x / (x + 1.0);
double t_2 = 1.0 - (z * (y / x));
double tmp;
if (x <= -2.65e-14) {
tmp = t_1;
} else if (x <= -1.02e-81) {
tmp = t_2;
} else if (x <= -7.6e-172) {
tmp = x * (1.0 / (x + 1.0));
} else if (x <= 1.03e-109) {
tmp = y / t;
} else if (x <= 7.5e-25) {
tmp = t_2;
} else if (x <= 1.55e-19) {
tmp = y / t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (x + 1.0) t_2 = 1.0 - (z * (y / x)) tmp = 0 if x <= -2.65e-14: tmp = t_1 elif x <= -1.02e-81: tmp = t_2 elif x <= -7.6e-172: tmp = x * (1.0 / (x + 1.0)) elif x <= 1.03e-109: tmp = y / t elif x <= 7.5e-25: tmp = t_2 elif x <= 1.55e-19: tmp = y / t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(x + 1.0)) t_2 = Float64(1.0 - Float64(z * Float64(y / x))) tmp = 0.0 if (x <= -2.65e-14) tmp = t_1; elseif (x <= -1.02e-81) tmp = t_2; elseif (x <= -7.6e-172) tmp = Float64(x * Float64(1.0 / Float64(x + 1.0))); elseif (x <= 1.03e-109) tmp = Float64(y / t); elseif (x <= 7.5e-25) tmp = t_2; elseif (x <= 1.55e-19) tmp = Float64(y / t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (x + 1.0); t_2 = 1.0 - (z * (y / x)); tmp = 0.0; if (x <= -2.65e-14) tmp = t_1; elseif (x <= -1.02e-81) tmp = t_2; elseif (x <= -7.6e-172) tmp = x * (1.0 / (x + 1.0)); elseif (x <= 1.03e-109) tmp = y / t; elseif (x <= 7.5e-25) tmp = t_2; elseif (x <= 1.55e-19) tmp = y / t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 - N[(z * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.65e-14], t$95$1, If[LessEqual[x, -1.02e-81], t$95$2, If[LessEqual[x, -7.6e-172], N[(x * N[(1.0 / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.03e-109], N[(y / t), $MachinePrecision], If[LessEqual[x, 7.5e-25], t$95$2, If[LessEqual[x, 1.55e-19], N[(y / t), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + 1}\\
t_2 := 1 - z \cdot \frac{y}{x}\\
\mathbf{if}\;x \leq -2.65 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -1.02 \cdot 10^{-81}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -7.6 \cdot 10^{-172}:\\
\;\;\;\;x \cdot \frac{1}{x + 1}\\
\mathbf{elif}\;x \leq 1.03 \cdot 10^{-109}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{-25}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 1.55 \cdot 10^{-19}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.6500000000000001e-14 or 1.5499999999999999e-19 < x Initial program 83.4%
*-commutative83.4%
Simplified83.4%
Taylor expanded in t around inf 84.3%
+-commutative84.3%
Simplified84.3%
if -2.6500000000000001e-14 < x < -1.01999999999999998e-81 or 1.0300000000000001e-109 < x < 7.49999999999999989e-25Initial program 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in z around 0 55.9%
Taylor expanded in y around inf 63.8%
mul-1-neg63.8%
distribute-rgt-in63.8%
*-lft-identity63.8%
unpow263.8%
associate-*l/56.7%
*-commutative56.7%
distribute-rgt-neg-in56.7%
*-lft-identity56.7%
unpow256.7%
distribute-rgt-in56.7%
associate-/r*56.7%
distribute-neg-frac56.7%
distribute-neg-frac256.7%
Simplified56.7%
Taylor expanded in x around 0 63.8%
mul-1-neg63.8%
*-commutative63.8%
associate-*r/56.7%
distribute-rgt-neg-in56.7%
distribute-neg-frac256.7%
Simplified56.7%
if -1.01999999999999998e-81 < x < -7.59999999999999974e-172Initial program 87.4%
*-commutative87.4%
Simplified87.4%
Taylor expanded in t around inf 45.2%
+-commutative45.2%
Simplified45.2%
div-inv45.2%
Applied egg-rr45.2%
if -7.59999999999999974e-172 < x < 1.0300000000000001e-109 or 7.49999999999999989e-25 < x < 1.5499999999999999e-19Initial program 87.4%
*-commutative87.4%
Simplified87.4%
Taylor expanded in z around inf 80.4%
clear-num80.3%
inv-pow80.3%
Applied egg-rr80.3%
unpow-180.3%
+-commutative80.3%
Simplified80.3%
Taylor expanded in x around 0 64.4%
Final simplification72.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) (- (* z t) x))) (+ x 1.0)))
(t_2 (+ (/ x (+ x 1.0)) (/ y (* t (+ x 1.0))))))
(if (<= z -8.2e+120)
t_2
(if (<= z -2e-158)
t_1
(if (<= z 5.5e-239)
(/ (+ x (/ (- x (* y z)) x)) (+ x 1.0))
(if (<= z 3.3e+128) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = (x + ((y * z) / ((z * t) - x))) / (x + 1.0);
double t_2 = (x / (x + 1.0)) + (y / (t * (x + 1.0)));
double tmp;
if (z <= -8.2e+120) {
tmp = t_2;
} else if (z <= -2e-158) {
tmp = t_1;
} else if (z <= 5.5e-239) {
tmp = (x + ((x - (y * z)) / x)) / (x + 1.0);
} else if (z <= 3.3e+128) {
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 = (x + ((y * z) / ((z * t) - x))) / (x + 1.0d0)
t_2 = (x / (x + 1.0d0)) + (y / (t * (x + 1.0d0)))
if (z <= (-8.2d+120)) then
tmp = t_2
else if (z <= (-2d-158)) then
tmp = t_1
else if (z <= 5.5d-239) then
tmp = (x + ((x - (y * z)) / x)) / (x + 1.0d0)
else if (z <= 3.3d+128) 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 = (x + ((y * z) / ((z * t) - x))) / (x + 1.0);
double t_2 = (x / (x + 1.0)) + (y / (t * (x + 1.0)));
double tmp;
if (z <= -8.2e+120) {
tmp = t_2;
} else if (z <= -2e-158) {
tmp = t_1;
} else if (z <= 5.5e-239) {
tmp = (x + ((x - (y * z)) / x)) / (x + 1.0);
} else if (z <= 3.3e+128) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x + ((y * z) / ((z * t) - x))) / (x + 1.0) t_2 = (x / (x + 1.0)) + (y / (t * (x + 1.0))) tmp = 0 if z <= -8.2e+120: tmp = t_2 elif z <= -2e-158: tmp = t_1 elif z <= 5.5e-239: tmp = (x + ((x - (y * z)) / x)) / (x + 1.0) elif z <= 3.3e+128: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x + Float64(Float64(y * z) / Float64(Float64(z * t) - x))) / Float64(x + 1.0)) t_2 = Float64(Float64(x / Float64(x + 1.0)) + Float64(y / Float64(t * Float64(x + 1.0)))) tmp = 0.0 if (z <= -8.2e+120) tmp = t_2; elseif (z <= -2e-158) tmp = t_1; elseif (z <= 5.5e-239) tmp = Float64(Float64(x + Float64(Float64(x - Float64(y * z)) / x)) / Float64(x + 1.0)); elseif (z <= 3.3e+128) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x + ((y * z) / ((z * t) - x))) / (x + 1.0); t_2 = (x / (x + 1.0)) + (y / (t * (x + 1.0))); tmp = 0.0; if (z <= -8.2e+120) tmp = t_2; elseif (z <= -2e-158) tmp = t_1; elseif (z <= 5.5e-239) tmp = (x + ((x - (y * z)) / x)) / (x + 1.0); elseif (z <= 3.3e+128) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.2e+120], t$95$2, If[LessEqual[z, -2e-158], t$95$1, If[LessEqual[z, 5.5e-239], N[(N[(x + N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.3e+128], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{z \cdot t - x}}{x + 1}\\
t_2 := \frac{x}{x + 1} + \frac{y}{t \cdot \left(x + 1\right)}\\
\mathbf{if}\;z \leq -8.2 \cdot 10^{+120}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -2 \cdot 10^{-158}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-239}:\\
\;\;\;\;\frac{x + \frac{x - y \cdot z}{x}}{x + 1}\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{+128}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -8.2e120 or 3.3000000000000001e128 < z Initial program 67.9%
*-commutative67.9%
Simplified67.9%
Taylor expanded in y around inf 67.9%
Taylor expanded in t around inf 89.8%
+-commutative89.8%
+-commutative89.8%
Simplified89.8%
if -8.2e120 < z < -2.00000000000000013e-158 or 5.49999999999999978e-239 < z < 3.3000000000000001e128Initial program 96.5%
*-commutative96.5%
Simplified96.5%
Taylor expanded in y around inf 90.6%
if -2.00000000000000013e-158 < z < 5.49999999999999978e-239Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in z around 0 88.3%
neg-mul-188.3%
Simplified88.3%
Final simplification89.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (/ y t))))
(if (<= t -2.8e-126)
(/ 1.0 (/ (+ x 1.0) t_1))
(if (<= t 5.5e-192)
(/ (- x (* y (/ z x))) (+ x 1.0))
(if (or (<= t 4.4e-174) (not (<= t 5.5e-110)))
(/ t_1 (+ x 1.0))
(+ 1.0 (/ (* z (- t y)) x)))))))
double code(double x, double y, double z, double t) {
double t_1 = x + (y / t);
double tmp;
if (t <= -2.8e-126) {
tmp = 1.0 / ((x + 1.0) / t_1);
} else if (t <= 5.5e-192) {
tmp = (x - (y * (z / x))) / (x + 1.0);
} else if ((t <= 4.4e-174) || !(t <= 5.5e-110)) {
tmp = t_1 / (x + 1.0);
} else {
tmp = 1.0 + ((z * (t - y)) / 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) :: t_1
real(8) :: tmp
t_1 = x + (y / t)
if (t <= (-2.8d-126)) then
tmp = 1.0d0 / ((x + 1.0d0) / t_1)
else if (t <= 5.5d-192) then
tmp = (x - (y * (z / x))) / (x + 1.0d0)
else if ((t <= 4.4d-174) .or. (.not. (t <= 5.5d-110))) then
tmp = t_1 / (x + 1.0d0)
else
tmp = 1.0d0 + ((z * (t - y)) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x + (y / t);
double tmp;
if (t <= -2.8e-126) {
tmp = 1.0 / ((x + 1.0) / t_1);
} else if (t <= 5.5e-192) {
tmp = (x - (y * (z / x))) / (x + 1.0);
} else if ((t <= 4.4e-174) || !(t <= 5.5e-110)) {
tmp = t_1 / (x + 1.0);
} else {
tmp = 1.0 + ((z * (t - y)) / x);
}
return tmp;
}
def code(x, y, z, t): t_1 = x + (y / t) tmp = 0 if t <= -2.8e-126: tmp = 1.0 / ((x + 1.0) / t_1) elif t <= 5.5e-192: tmp = (x - (y * (z / x))) / (x + 1.0) elif (t <= 4.4e-174) or not (t <= 5.5e-110): tmp = t_1 / (x + 1.0) else: tmp = 1.0 + ((z * (t - y)) / x) return tmp
function code(x, y, z, t) t_1 = Float64(x + Float64(y / t)) tmp = 0.0 if (t <= -2.8e-126) tmp = Float64(1.0 / Float64(Float64(x + 1.0) / t_1)); elseif (t <= 5.5e-192) tmp = Float64(Float64(x - Float64(y * Float64(z / x))) / Float64(x + 1.0)); elseif ((t <= 4.4e-174) || !(t <= 5.5e-110)) tmp = Float64(t_1 / Float64(x + 1.0)); else tmp = Float64(1.0 + Float64(Float64(z * Float64(t - y)) / x)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x + (y / t); tmp = 0.0; if (t <= -2.8e-126) tmp = 1.0 / ((x + 1.0) / t_1); elseif (t <= 5.5e-192) tmp = (x - (y * (z / x))) / (x + 1.0); elseif ((t <= 4.4e-174) || ~((t <= 5.5e-110))) tmp = t_1 / (x + 1.0); else tmp = 1.0 + ((z * (t - y)) / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.8e-126], N[(1.0 / N[(N[(x + 1.0), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.5e-192], N[(N[(x - N[(y * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 4.4e-174], N[Not[LessEqual[t, 5.5e-110]], $MachinePrecision]], N[(t$95$1 / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(z * N[(t - y), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{t}\\
\mathbf{if}\;t \leq -2.8 \cdot 10^{-126}:\\
\;\;\;\;\frac{1}{\frac{x + 1}{t\_1}}\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{-192}:\\
\;\;\;\;\frac{x - y \cdot \frac{z}{x}}{x + 1}\\
\mathbf{elif}\;t \leq 4.4 \cdot 10^{-174} \lor \neg \left(t \leq 5.5 \cdot 10^{-110}\right):\\
\;\;\;\;\frac{t\_1}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{z \cdot \left(t - y\right)}{x}\\
\end{array}
\end{array}
if t < -2.79999999999999992e-126Initial program 81.4%
*-commutative81.4%
Simplified81.4%
Taylor expanded in z around inf 86.9%
clear-num86.9%
inv-pow86.9%
Applied egg-rr86.9%
unpow-186.9%
+-commutative86.9%
Simplified86.9%
if -2.79999999999999992e-126 < t < 5.49999999999999995e-192Initial program 90.9%
*-commutative90.9%
Simplified90.9%
Taylor expanded in y around inf 79.1%
Taylor expanded in t around 0 69.9%
mul-1-neg69.9%
unsub-neg69.9%
associate-/l*75.3%
+-commutative75.3%
Simplified75.3%
if 5.49999999999999995e-192 < t < 4.40000000000000043e-174 or 5.4999999999999998e-110 < t Initial program 86.8%
*-commutative86.8%
Simplified86.8%
Taylor expanded in z around inf 87.5%
if 4.40000000000000043e-174 < t < 5.4999999999999998e-110Initial program 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around 0 85.5%
Taylor expanded in x around 0 79.7%
Final simplification84.2%
(FPCore (x y z t) :precision binary64 (if (or (<= t -2.05e-85) (not (<= t 4.6e-102))) (+ (/ x (+ x 1.0)) (/ y (* t (+ x 1.0)))) (+ 1.0 (* z (/ (/ y x) (- -1.0 x))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -2.05e-85) || !(t <= 4.6e-102)) {
tmp = (x / (x + 1.0)) + (y / (t * (x + 1.0)));
} else {
tmp = 1.0 + (z * ((y / x) / (-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 ((t <= (-2.05d-85)) .or. (.not. (t <= 4.6d-102))) then
tmp = (x / (x + 1.0d0)) + (y / (t * (x + 1.0d0)))
else
tmp = 1.0d0 + (z * ((y / x) / ((-1.0d0) - x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -2.05e-85) || !(t <= 4.6e-102)) {
tmp = (x / (x + 1.0)) + (y / (t * (x + 1.0)));
} else {
tmp = 1.0 + (z * ((y / x) / (-1.0 - x)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -2.05e-85) or not (t <= 4.6e-102): tmp = (x / (x + 1.0)) + (y / (t * (x + 1.0))) else: tmp = 1.0 + (z * ((y / x) / (-1.0 - x))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -2.05e-85) || !(t <= 4.6e-102)) tmp = Float64(Float64(x / Float64(x + 1.0)) + Float64(y / Float64(t * Float64(x + 1.0)))); else tmp = Float64(1.0 + Float64(z * Float64(Float64(y / x) / Float64(-1.0 - x)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -2.05e-85) || ~((t <= 4.6e-102))) tmp = (x / (x + 1.0)) + (y / (t * (x + 1.0))); else tmp = 1.0 + (z * ((y / x) / (-1.0 - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -2.05e-85], N[Not[LessEqual[t, 4.6e-102]], $MachinePrecision]], N[(N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(z * N[(N[(y / x), $MachinePrecision] / N[(-1.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.05 \cdot 10^{-85} \lor \neg \left(t \leq 4.6 \cdot 10^{-102}\right):\\
\;\;\;\;\frac{x}{x + 1} + \frac{y}{t \cdot \left(x + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;1 + z \cdot \frac{\frac{y}{x}}{-1 - x}\\
\end{array}
\end{array}
if t < -2.04999999999999997e-85 or 4.59999999999999973e-102 < t Initial program 83.5%
*-commutative83.5%
Simplified83.5%
Taylor expanded in y around inf 77.9%
Taylor expanded in t around inf 88.9%
+-commutative88.9%
+-commutative88.9%
Simplified88.9%
if -2.04999999999999997e-85 < t < 4.59999999999999973e-102Initial program 93.0%
*-commutative93.0%
Simplified93.0%
Taylor expanded in z around 0 81.0%
Taylor expanded in y around inf 78.3%
mul-1-neg78.3%
distribute-rgt-in78.3%
*-lft-identity78.3%
unpow278.3%
associate-*l/80.9%
*-commutative80.9%
distribute-rgt-neg-in80.9%
*-lft-identity80.9%
unpow280.9%
distribute-rgt-in80.9%
associate-/r*80.9%
distribute-neg-frac80.9%
distribute-neg-frac280.9%
Simplified80.9%
Final simplification86.3%
(FPCore (x y z t) :precision binary64 (if (or (<= t -2.7e-84) (not (<= t 6.9e-105))) (+ (/ x (+ x 1.0)) (/ y (* t (+ x 1.0)))) (/ (- (+ x 1.0) (* y (/ z x))) (+ x 1.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -2.7e-84) || !(t <= 6.9e-105)) {
tmp = (x / (x + 1.0)) + (y / (t * (x + 1.0)));
} else {
tmp = ((x + 1.0) - (y * (z / 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 ((t <= (-2.7d-84)) .or. (.not. (t <= 6.9d-105))) then
tmp = (x / (x + 1.0d0)) + (y / (t * (x + 1.0d0)))
else
tmp = ((x + 1.0d0) - (y * (z / 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 ((t <= -2.7e-84) || !(t <= 6.9e-105)) {
tmp = (x / (x + 1.0)) + (y / (t * (x + 1.0)));
} else {
tmp = ((x + 1.0) - (y * (z / x))) / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -2.7e-84) or not (t <= 6.9e-105): tmp = (x / (x + 1.0)) + (y / (t * (x + 1.0))) else: tmp = ((x + 1.0) - (y * (z / x))) / (x + 1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -2.7e-84) || !(t <= 6.9e-105)) tmp = Float64(Float64(x / Float64(x + 1.0)) + Float64(y / Float64(t * Float64(x + 1.0)))); else tmp = Float64(Float64(Float64(x + 1.0) - Float64(y * Float64(z / x))) / Float64(x + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -2.7e-84) || ~((t <= 6.9e-105))) tmp = (x / (x + 1.0)) + (y / (t * (x + 1.0))); else tmp = ((x + 1.0) - (y * (z / x))) / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -2.7e-84], N[Not[LessEqual[t, 6.9e-105]], $MachinePrecision]], N[(N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x + 1.0), $MachinePrecision] - N[(y * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.7 \cdot 10^{-84} \lor \neg \left(t \leq 6.9 \cdot 10^{-105}\right):\\
\;\;\;\;\frac{x}{x + 1} + \frac{y}{t \cdot \left(x + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x + 1\right) - y \cdot \frac{z}{x}}{x + 1}\\
\end{array}
\end{array}
if t < -2.6999999999999999e-84 or 6.90000000000000028e-105 < t Initial program 83.5%
*-commutative83.5%
Simplified83.5%
Taylor expanded in y around inf 77.9%
Taylor expanded in t around inf 88.9%
+-commutative88.9%
+-commutative88.9%
Simplified88.9%
if -2.6999999999999999e-84 < t < 6.90000000000000028e-105Initial program 93.0%
*-commutative93.0%
Simplified93.0%
Taylor expanded in t around 0 78.3%
associate-+r+78.3%
mul-1-neg78.3%
unsub-neg78.3%
+-commutative78.3%
associate-/l*82.8%
+-commutative82.8%
Simplified82.8%
Final simplification86.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (/ y t))))
(if (<= t -1.3e-77)
(/ 1.0 (/ (+ x 1.0) t_1))
(if (<= t 1.08e-104)
(+ 1.0 (* z (/ (/ y x) (- -1.0 x))))
(/ t_1 (+ x 1.0))))))
double code(double x, double y, double z, double t) {
double t_1 = x + (y / t);
double tmp;
if (t <= -1.3e-77) {
tmp = 1.0 / ((x + 1.0) / t_1);
} else if (t <= 1.08e-104) {
tmp = 1.0 + (z * ((y / x) / (-1.0 - x)));
} else {
tmp = t_1 / (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 / t)
if (t <= (-1.3d-77)) then
tmp = 1.0d0 / ((x + 1.0d0) / t_1)
else if (t <= 1.08d-104) then
tmp = 1.0d0 + (z * ((y / x) / ((-1.0d0) - x)))
else
tmp = t_1 / (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 / t);
double tmp;
if (t <= -1.3e-77) {
tmp = 1.0 / ((x + 1.0) / t_1);
} else if (t <= 1.08e-104) {
tmp = 1.0 + (z * ((y / x) / (-1.0 - x)));
} else {
tmp = t_1 / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): t_1 = x + (y / t) tmp = 0 if t <= -1.3e-77: tmp = 1.0 / ((x + 1.0) / t_1) elif t <= 1.08e-104: tmp = 1.0 + (z * ((y / x) / (-1.0 - x))) else: tmp = t_1 / (x + 1.0) return tmp
function code(x, y, z, t) t_1 = Float64(x + Float64(y / t)) tmp = 0.0 if (t <= -1.3e-77) tmp = Float64(1.0 / Float64(Float64(x + 1.0) / t_1)); elseif (t <= 1.08e-104) tmp = Float64(1.0 + Float64(z * Float64(Float64(y / x) / Float64(-1.0 - x)))); else tmp = Float64(t_1 / Float64(x + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x + (y / t); tmp = 0.0; if (t <= -1.3e-77) tmp = 1.0 / ((x + 1.0) / t_1); elseif (t <= 1.08e-104) tmp = 1.0 + (z * ((y / x) / (-1.0 - x))); else tmp = t_1 / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.3e-77], N[(1.0 / N[(N[(x + 1.0), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.08e-104], N[(1.0 + N[(z * N[(N[(y / x), $MachinePrecision] / N[(-1.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{t}\\
\mathbf{if}\;t \leq -1.3 \cdot 10^{-77}:\\
\;\;\;\;\frac{1}{\frac{x + 1}{t\_1}}\\
\mathbf{elif}\;t \leq 1.08 \cdot 10^{-104}:\\
\;\;\;\;1 + z \cdot \frac{\frac{y}{x}}{-1 - x}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{x + 1}\\
\end{array}
\end{array}
if t < -1.3000000000000001e-77Initial program 81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in z around inf 89.2%
clear-num89.2%
inv-pow89.2%
Applied egg-rr89.2%
unpow-189.2%
+-commutative89.2%
Simplified89.2%
if -1.3000000000000001e-77 < t < 1.07999999999999997e-104Initial program 93.0%
*-commutative93.0%
Simplified93.0%
Taylor expanded in z around 0 81.0%
Taylor expanded in y around inf 78.3%
mul-1-neg78.3%
distribute-rgt-in78.3%
*-lft-identity78.3%
unpow278.3%
associate-*l/80.9%
*-commutative80.9%
distribute-rgt-neg-in80.9%
*-lft-identity80.9%
unpow280.9%
distribute-rgt-in80.9%
associate-/r*80.9%
distribute-neg-frac80.9%
distribute-neg-frac280.9%
Simplified80.9%
if 1.07999999999999997e-104 < t Initial program 85.7%
*-commutative85.7%
Simplified85.7%
Taylor expanded in z around inf 87.5%
Final simplification85.9%
(FPCore (x y z t) :precision binary64 (if (or (<= t -2.05e-126) (not (<= t 5.4e-110))) (/ (+ x (/ y t)) (+ x 1.0)) (- 1.0 (/ (* y z) x))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -2.05e-126) || !(t <= 5.4e-110)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = 1.0 - ((y * z) / 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 ((t <= (-2.05d-126)) .or. (.not. (t <= 5.4d-110))) then
tmp = (x + (y / t)) / (x + 1.0d0)
else
tmp = 1.0d0 - ((y * z) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -2.05e-126) || !(t <= 5.4e-110)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = 1.0 - ((y * z) / x);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -2.05e-126) or not (t <= 5.4e-110): tmp = (x + (y / t)) / (x + 1.0) else: tmp = 1.0 - ((y * z) / x) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -2.05e-126) || !(t <= 5.4e-110)) tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); else tmp = Float64(1.0 - Float64(Float64(y * z) / x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -2.05e-126) || ~((t <= 5.4e-110))) tmp = (x + (y / t)) / (x + 1.0); else tmp = 1.0 - ((y * z) / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -2.05e-126], N[Not[LessEqual[t, 5.4e-110]], $MachinePrecision]], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(N[(y * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.05 \cdot 10^{-126} \lor \neg \left(t \leq 5.4 \cdot 10^{-110}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{y \cdot z}{x}\\
\end{array}
\end{array}
if t < -2.0499999999999999e-126 or 5.3999999999999996e-110 < t Initial program 83.1%
*-commutative83.1%
Simplified83.1%
Taylor expanded in z around inf 86.7%
if -2.0499999999999999e-126 < t < 5.3999999999999996e-110Initial program 94.8%
*-commutative94.8%
Simplified94.8%
Taylor expanded in z around 0 81.6%
Taylor expanded in y around inf 81.1%
mul-1-neg81.1%
distribute-rgt-in81.1%
*-lft-identity81.1%
unpow281.1%
associate-*l/81.5%
*-commutative81.5%
distribute-rgt-neg-in81.5%
*-lft-identity81.5%
unpow281.5%
distribute-rgt-in81.5%
associate-/r*81.5%
distribute-neg-frac81.5%
distribute-neg-frac281.5%
Simplified81.5%
Taylor expanded in x around 0 72.4%
associate-*r/72.4%
neg-mul-172.4%
distribute-rgt-neg-in72.4%
Simplified72.4%
Final simplification82.5%
(FPCore (x y z t) :precision binary64 (if (or (<= t -3.9e-128) (not (<= t 1.3e-107))) (/ (+ x (/ y t)) (+ x 1.0)) (+ 1.0 (/ (* z (- t y)) x))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -3.9e-128) || !(t <= 1.3e-107)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = 1.0 + ((z * (t - y)) / 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 ((t <= (-3.9d-128)) .or. (.not. (t <= 1.3d-107))) then
tmp = (x + (y / t)) / (x + 1.0d0)
else
tmp = 1.0d0 + ((z * (t - y)) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -3.9e-128) || !(t <= 1.3e-107)) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = 1.0 + ((z * (t - y)) / x);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -3.9e-128) or not (t <= 1.3e-107): tmp = (x + (y / t)) / (x + 1.0) else: tmp = 1.0 + ((z * (t - y)) / x) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -3.9e-128) || !(t <= 1.3e-107)) tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); else tmp = Float64(1.0 + Float64(Float64(z * Float64(t - y)) / x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -3.9e-128) || ~((t <= 1.3e-107))) tmp = (x + (y / t)) / (x + 1.0); else tmp = 1.0 + ((z * (t - y)) / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -3.9e-128], N[Not[LessEqual[t, 1.3e-107]], $MachinePrecision]], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(z * N[(t - y), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.9 \cdot 10^{-128} \lor \neg \left(t \leq 1.3 \cdot 10^{-107}\right):\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{z \cdot \left(t - y\right)}{x}\\
\end{array}
\end{array}
if t < -3.89999999999999997e-128 or 1.3e-107 < t Initial program 83.1%
*-commutative83.1%
Simplified83.1%
Taylor expanded in z around inf 86.7%
if -3.89999999999999997e-128 < t < 1.3e-107Initial program 94.8%
*-commutative94.8%
Simplified94.8%
Taylor expanded in z around 0 81.6%
Taylor expanded in x around 0 72.5%
Final simplification82.5%
(FPCore (x y z t) :precision binary64 (if (or (<= x -5e-171) (not (<= x 8e-59))) (/ x (+ x 1.0)) (/ y t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -5e-171) || !(x <= 8e-59)) {
tmp = x / (x + 1.0);
} else {
tmp = y / 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) :: tmp
if ((x <= (-5d-171)) .or. (.not. (x <= 8d-59))) then
tmp = x / (x + 1.0d0)
else
tmp = y / t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -5e-171) || !(x <= 8e-59)) {
tmp = x / (x + 1.0);
} else {
tmp = y / t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -5e-171) or not (x <= 8e-59): tmp = x / (x + 1.0) else: tmp = y / t return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -5e-171) || !(x <= 8e-59)) tmp = Float64(x / Float64(x + 1.0)); else tmp = Float64(y / t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -5e-171) || ~((x <= 8e-59))) tmp = x / (x + 1.0); else tmp = y / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -5e-171], N[Not[LessEqual[x, 8e-59]], $MachinePrecision]], N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(y / t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5 \cdot 10^{-171} \lor \neg \left(x \leq 8 \cdot 10^{-59}\right):\\
\;\;\;\;\frac{x}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{t}\\
\end{array}
\end{array}
if x < -4.99999999999999992e-171 or 8.0000000000000002e-59 < x Initial program 85.7%
*-commutative85.7%
Simplified85.7%
Taylor expanded in t around inf 72.2%
+-commutative72.2%
Simplified72.2%
if -4.99999999999999992e-171 < x < 8.0000000000000002e-59Initial program 88.6%
*-commutative88.6%
Simplified88.6%
Taylor expanded in z around inf 78.8%
clear-num78.7%
inv-pow78.7%
Applied egg-rr78.7%
unpow-178.7%
+-commutative78.7%
Simplified78.7%
Taylor expanded in x around 0 60.7%
Final simplification68.7%
(FPCore (x y z t) :precision binary64 (if (<= x -7e-26) 1.0 (if (<= x 3.8e-54) (/ y t) 1.0)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -7e-26) {
tmp = 1.0;
} else if (x <= 3.8e-54) {
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 <= (-7d-26)) then
tmp = 1.0d0
else if (x <= 3.8d-54) 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 <= -7e-26) {
tmp = 1.0;
} else if (x <= 3.8e-54) {
tmp = y / t;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -7e-26: tmp = 1.0 elif x <= 3.8e-54: tmp = y / t else: tmp = 1.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -7e-26) tmp = 1.0; elseif (x <= 3.8e-54) 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 <= -7e-26) tmp = 1.0; elseif (x <= 3.8e-54) tmp = y / t; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -7e-26], 1.0, If[LessEqual[x, 3.8e-54], N[(y / t), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7 \cdot 10^{-26}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{-54}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < -6.9999999999999997e-26 or 3.8000000000000002e-54 < x Initial program 84.5%
*-commutative84.5%
Simplified84.5%
Taylor expanded in z around inf 69.6%
clear-num69.6%
inv-pow69.6%
Applied egg-rr69.6%
unpow-169.6%
+-commutative69.6%
Simplified69.6%
Taylor expanded in x around inf 78.3%
if -6.9999999999999997e-26 < x < 3.8000000000000002e-54Initial program 89.3%
*-commutative89.3%
Simplified89.3%
Taylor expanded in z around inf 73.6%
clear-num73.6%
inv-pow73.6%
Applied egg-rr73.6%
unpow-173.6%
+-commutative73.6%
Simplified73.6%
Taylor expanded in x around 0 50.4%
Final simplification66.2%
(FPCore (x y z t) :precision binary64 (/ -1.0 x))
double code(double x, double y, double z, double t) {
return -1.0 / x;
}
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) / x
end function
public static double code(double x, double y, double z, double t) {
return -1.0 / x;
}
def code(x, y, z, t): return -1.0 / x
function code(x, y, z, t) return Float64(-1.0 / x) end
function tmp = code(x, y, z, t) tmp = -1.0 / x; end
code[x_, y_, z_, t_] := N[(-1.0 / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{x}
\end{array}
Initial program 86.6%
*-commutative86.6%
Simplified86.6%
Taylor expanded in t around inf 56.4%
+-commutative56.4%
Simplified56.4%
Taylor expanded in x around inf 43.8%
Taylor expanded in x around 0 3.2%
Final simplification3.2%
(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 86.6%
*-commutative86.6%
Simplified86.6%
Taylor expanded in z around inf 71.4%
clear-num71.3%
inv-pow71.3%
Applied egg-rr71.3%
unpow-171.3%
+-commutative71.3%
Simplified71.3%
Taylor expanded in x around inf 50.0%
Final simplification50.0%
(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 2024039
(FPCore (x y z t)
:name "Diagrams.Trail:splitAtParam from diagrams-lib-1.3.0.3, A"
:precision binary64
:herbie-target
(/ (+ x (- (/ y (- t (/ x z))) (/ x (- (* t z) x)))) (+ x 1.0))
(/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))