
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -3.1e+99)
t_1
(if (or (<= z -6000000000000.0) (not (<= z 850.0)))
(+
t_1
(/ (+ (* x (/ y (- b y))) (* y (/ (- a t) (pow (- b y) 2.0)))) z))
(+
(/ x (+ (/ (* z (+ b y)) y) 1.0))
(/ (* z (- t a)) (+ y (* z (- b y)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -3.1e+99) {
tmp = t_1;
} else if ((z <= -6000000000000.0) || !(z <= 850.0)) {
tmp = t_1 + (((x * (y / (b - y))) + (y * ((a - t) / pow((b - y), 2.0)))) / z);
} else {
tmp = (x / (((z * (b + y)) / y) + 1.0)) + ((z * (t - a)) / (y + (z * (b - y))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-3.1d+99)) then
tmp = t_1
else if ((z <= (-6000000000000.0d0)) .or. (.not. (z <= 850.0d0))) then
tmp = t_1 + (((x * (y / (b - y))) + (y * ((a - t) / ((b - y) ** 2.0d0)))) / z)
else
tmp = (x / (((z * (b + y)) / y) + 1.0d0)) + ((z * (t - a)) / (y + (z * (b - y))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -3.1e+99) {
tmp = t_1;
} else if ((z <= -6000000000000.0) || !(z <= 850.0)) {
tmp = t_1 + (((x * (y / (b - y))) + (y * ((a - t) / Math.pow((b - y), 2.0)))) / z);
} else {
tmp = (x / (((z * (b + y)) / y) + 1.0)) + ((z * (t - a)) / (y + (z * (b - y))));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -3.1e+99: tmp = t_1 elif (z <= -6000000000000.0) or not (z <= 850.0): tmp = t_1 + (((x * (y / (b - y))) + (y * ((a - t) / math.pow((b - y), 2.0)))) / z) else: tmp = (x / (((z * (b + y)) / y) + 1.0)) + ((z * (t - a)) / (y + (z * (b - y)))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -3.1e+99) tmp = t_1; elseif ((z <= -6000000000000.0) || !(z <= 850.0)) tmp = Float64(t_1 + Float64(Float64(Float64(x * Float64(y / Float64(b - y))) + Float64(y * Float64(Float64(a - t) / (Float64(b - y) ^ 2.0)))) / z)); else tmp = Float64(Float64(x / Float64(Float64(Float64(z * Float64(b + y)) / y) + 1.0)) + Float64(Float64(z * Float64(t - a)) / Float64(y + Float64(z * Float64(b - y))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -3.1e+99) tmp = t_1; elseif ((z <= -6000000000000.0) || ~((z <= 850.0))) tmp = t_1 + (((x * (y / (b - y))) + (y * ((a - t) / ((b - y) ^ 2.0)))) / z); else tmp = (x / (((z * (b + y)) / y) + 1.0)) + ((z * (t - a)) / (y + (z * (b - y)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.1e+99], t$95$1, If[Or[LessEqual[z, -6000000000000.0], N[Not[LessEqual[z, 850.0]], $MachinePrecision]], N[(t$95$1 + N[(N[(N[(x * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(N[(a - t), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(N[(N[(z * N[(b + y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -3.1 \cdot 10^{+99}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -6000000000000 \lor \neg \left(z \leq 850\right):\\
\;\;\;\;t\_1 + \frac{x \cdot \frac{y}{b - y} + y \cdot \frac{a - t}{{\left(b - y\right)}^{2}}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z \cdot \left(b + y\right)}{y} + 1} + \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -3.1000000000000001e99Initial program 37.1%
Taylor expanded in z around inf 92.2%
if -3.1000000000000001e99 < z < -6e12 or 850 < z Initial program 46.5%
Taylor expanded in z around -inf 66.0%
associate--l+66.0%
mul-1-neg66.0%
distribute-lft-out--66.0%
associate-/l*76.2%
associate-/l*90.9%
div-sub90.9%
Simplified90.9%
if -6e12 < z < 850Initial program 82.4%
Taylor expanded in x around 0 82.4%
associate-/l*99.7%
sub-neg99.7%
distribute-lft-out99.7%
+-commutative99.7%
distribute-lft-out99.7%
sub-neg99.7%
fma-define99.7%
sub-neg99.7%
add-sqr-sqrt42.5%
sqrt-unprod73.2%
sqr-neg73.2%
sqrt-unprod56.5%
add-sqr-sqrt98.8%
Applied egg-rr98.8%
clear-num98.7%
un-div-inv98.8%
+-commutative98.8%
Applied egg-rr98.8%
Taylor expanded in z around inf 98.8%
Final simplification95.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (* z (- t a)))
(t_3 (/ (+ t_2 (* y x)) t_1)))
(if (<= t_3 (- INFINITY))
(+ x (/ t_2 t_1))
(if (or (<= t_3 -2e-278) (and (not (<= t_3 0.0)) (<= t_3 1e+308)))
t_3
(/ (- t a) (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = z * (t - a);
double t_3 = (t_2 + (y * x)) / t_1;
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = x + (t_2 / t_1);
} else if ((t_3 <= -2e-278) || (!(t_3 <= 0.0) && (t_3 <= 1e+308))) {
tmp = t_3;
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = z * (t - a);
double t_3 = (t_2 + (y * x)) / t_1;
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = x + (t_2 / t_1);
} else if ((t_3 <= -2e-278) || (!(t_3 <= 0.0) && (t_3 <= 1e+308))) {
tmp = t_3;
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = z * (t - a) t_3 = (t_2 + (y * x)) / t_1 tmp = 0 if t_3 <= -math.inf: tmp = x + (t_2 / t_1) elif (t_3 <= -2e-278) or (not (t_3 <= 0.0) and (t_3 <= 1e+308)): tmp = t_3 else: tmp = (t - a) / (b - y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(z * Float64(t - a)) t_3 = Float64(Float64(t_2 + Float64(y * x)) / t_1) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = Float64(x + Float64(t_2 / t_1)); elseif ((t_3 <= -2e-278) || (!(t_3 <= 0.0) && (t_3 <= 1e+308))) tmp = t_3; else tmp = Float64(Float64(t - a) / Float64(b - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = z * (t - a); t_3 = (t_2 + (y * x)) / t_1; tmp = 0.0; if (t_3 <= -Inf) tmp = x + (t_2 / t_1); elseif ((t_3 <= -2e-278) || (~((t_3 <= 0.0)) && (t_3 <= 1e+308))) tmp = t_3; else tmp = (t - a) / (b - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$2 + N[(y * x), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(x + N[(t$95$2 / t$95$1), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$3, -2e-278], And[N[Not[LessEqual[t$95$3, 0.0]], $MachinePrecision], LessEqual[t$95$3, 1e+308]]], t$95$3, N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := z \cdot \left(t - a\right)\\
t_3 := \frac{t\_2 + y \cdot x}{t\_1}\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;x + \frac{t\_2}{t\_1}\\
\mathbf{elif}\;t\_3 \leq -2 \cdot 10^{-278} \lor \neg \left(t\_3 \leq 0\right) \land t\_3 \leq 10^{+308}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b - y}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0Initial program 24.1%
Taylor expanded in x around 0 24.1%
Taylor expanded in z around 0 64.0%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -1.99999999999999988e-278 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1e308Initial program 99.6%
if -1.99999999999999988e-278 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or 1e308 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 11.4%
Taylor expanded in z around inf 67.1%
Final simplification85.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))) (t_2 (+ y (* z (- b y)))))
(if (<= z -4.5e+85)
t_1
(if (<= z -1.4e+62)
(+ (* (/ y (- b y)) (/ x z)) (* t (/ z t_2)))
(if (<= z -1.6e+15)
t_1
(if (<= z 470.0)
(+ (/ x (+ (/ (* z (+ b y)) y) 1.0)) (/ (* z (- t a)) t_2))
(+ t_1 (/ (* y x) t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double t_2 = y + (z * (b - y));
double tmp;
if (z <= -4.5e+85) {
tmp = t_1;
} else if (z <= -1.4e+62) {
tmp = ((y / (b - y)) * (x / z)) + (t * (z / t_2));
} else if (z <= -1.6e+15) {
tmp = t_1;
} else if (z <= 470.0) {
tmp = (x / (((z * (b + y)) / y) + 1.0)) + ((z * (t - a)) / t_2);
} else {
tmp = t_1 + ((y * x) / t_2);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (t - a) / (b - y)
t_2 = y + (z * (b - y))
if (z <= (-4.5d+85)) then
tmp = t_1
else if (z <= (-1.4d+62)) then
tmp = ((y / (b - y)) * (x / z)) + (t * (z / t_2))
else if (z <= (-1.6d+15)) then
tmp = t_1
else if (z <= 470.0d0) then
tmp = (x / (((z * (b + y)) / y) + 1.0d0)) + ((z * (t - a)) / t_2)
else
tmp = t_1 + ((y * x) / t_2)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double t_2 = y + (z * (b - y));
double tmp;
if (z <= -4.5e+85) {
tmp = t_1;
} else if (z <= -1.4e+62) {
tmp = ((y / (b - y)) * (x / z)) + (t * (z / t_2));
} else if (z <= -1.6e+15) {
tmp = t_1;
} else if (z <= 470.0) {
tmp = (x / (((z * (b + y)) / y) + 1.0)) + ((z * (t - a)) / t_2);
} else {
tmp = t_1 + ((y * x) / t_2);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) t_2 = y + (z * (b - y)) tmp = 0 if z <= -4.5e+85: tmp = t_1 elif z <= -1.4e+62: tmp = ((y / (b - y)) * (x / z)) + (t * (z / t_2)) elif z <= -1.6e+15: tmp = t_1 elif z <= 470.0: tmp = (x / (((z * (b + y)) / y) + 1.0)) + ((z * (t - a)) / t_2) else: tmp = t_1 + ((y * x) / t_2) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) t_2 = Float64(y + Float64(z * Float64(b - y))) tmp = 0.0 if (z <= -4.5e+85) tmp = t_1; elseif (z <= -1.4e+62) tmp = Float64(Float64(Float64(y / Float64(b - y)) * Float64(x / z)) + Float64(t * Float64(z / t_2))); elseif (z <= -1.6e+15) tmp = t_1; elseif (z <= 470.0) tmp = Float64(Float64(x / Float64(Float64(Float64(z * Float64(b + y)) / y) + 1.0)) + Float64(Float64(z * Float64(t - a)) / t_2)); else tmp = Float64(t_1 + Float64(Float64(y * x) / t_2)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); t_2 = y + (z * (b - y)); tmp = 0.0; if (z <= -4.5e+85) tmp = t_1; elseif (z <= -1.4e+62) tmp = ((y / (b - y)) * (x / z)) + (t * (z / t_2)); elseif (z <= -1.6e+15) tmp = t_1; elseif (z <= 470.0) tmp = (x / (((z * (b + y)) / y) + 1.0)) + ((z * (t - a)) / t_2); else tmp = t_1 + ((y * x) / t_2); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.5e+85], t$95$1, If[LessEqual[z, -1.4e+62], N[(N[(N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + N[(t * N[(z / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.6e+15], t$95$1, If[LessEqual[z, 470.0], N[(N[(x / N[(N[(N[(z * N[(b + y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(N[(y * x), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
t_2 := y + z \cdot \left(b - y\right)\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{+85}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.4 \cdot 10^{+62}:\\
\;\;\;\;\frac{y}{b - y} \cdot \frac{x}{z} + t \cdot \frac{z}{t\_2}\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{+15}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 470:\\
\;\;\;\;\frac{x}{\frac{z \cdot \left(b + y\right)}{y} + 1} + \frac{z \cdot \left(t - a\right)}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;t\_1 + \frac{y \cdot x}{t\_2}\\
\end{array}
\end{array}
if z < -4.50000000000000007e85 or -1.40000000000000007e62 < z < -1.6e15Initial program 43.0%
Taylor expanded in z around inf 92.3%
if -4.50000000000000007e85 < z < -1.40000000000000007e62Initial program 26.8%
Taylor expanded in x around 0 26.8%
Taylor expanded in t around inf 26.8%
associate-/l*39.0%
Simplified39.0%
Taylor expanded in z around inf 39.0%
times-frac100.0%
Simplified100.0%
if -1.6e15 < z < 470Initial program 82.4%
Taylor expanded in x around 0 82.4%
associate-/l*99.7%
sub-neg99.7%
distribute-lft-out99.7%
+-commutative99.7%
distribute-lft-out99.7%
sub-neg99.7%
fma-define99.7%
sub-neg99.7%
add-sqr-sqrt42.5%
sqrt-unprod73.2%
sqr-neg73.2%
sqrt-unprod56.5%
add-sqr-sqrt98.8%
Applied egg-rr98.8%
clear-num98.7%
un-div-inv98.8%
+-commutative98.8%
Applied egg-rr98.8%
Taylor expanded in z around inf 98.8%
if 470 < z Initial program 45.7%
Taylor expanded in x around 0 45.7%
Taylor expanded in z around inf 83.9%
Final simplification93.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a)))
(t_2 (+ y (* z (- b y))))
(t_3 (/ (- t a) (- b y))))
(if (<= z -3.8e+74)
t_3
(if (<= z -1.7e+62)
(- (/ (- t) y) (/ (+ x (/ t y)) z))
(if (<= z -1.6e+15)
t_3
(if (<= z -8.4e-91)
(/ (+ t_1 (* y x)) t_2)
(if (<= z 0.022) (+ x (/ t_1 t_2)) (+ t_3 (/ (* y x) t_2)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = y + (z * (b - y));
double t_3 = (t - a) / (b - y);
double tmp;
if (z <= -3.8e+74) {
tmp = t_3;
} else if (z <= -1.7e+62) {
tmp = (-t / y) - ((x + (t / y)) / z);
} else if (z <= -1.6e+15) {
tmp = t_3;
} else if (z <= -8.4e-91) {
tmp = (t_1 + (y * x)) / t_2;
} else if (z <= 0.022) {
tmp = x + (t_1 / t_2);
} else {
tmp = t_3 + ((y * x) / t_2);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = z * (t - a)
t_2 = y + (z * (b - y))
t_3 = (t - a) / (b - y)
if (z <= (-3.8d+74)) then
tmp = t_3
else if (z <= (-1.7d+62)) then
tmp = (-t / y) - ((x + (t / y)) / z)
else if (z <= (-1.6d+15)) then
tmp = t_3
else if (z <= (-8.4d-91)) then
tmp = (t_1 + (y * x)) / t_2
else if (z <= 0.022d0) then
tmp = x + (t_1 / t_2)
else
tmp = t_3 + ((y * x) / t_2)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = y + (z * (b - y));
double t_3 = (t - a) / (b - y);
double tmp;
if (z <= -3.8e+74) {
tmp = t_3;
} else if (z <= -1.7e+62) {
tmp = (-t / y) - ((x + (t / y)) / z);
} else if (z <= -1.6e+15) {
tmp = t_3;
} else if (z <= -8.4e-91) {
tmp = (t_1 + (y * x)) / t_2;
} else if (z <= 0.022) {
tmp = x + (t_1 / t_2);
} else {
tmp = t_3 + ((y * x) / t_2);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = y + (z * (b - y)) t_3 = (t - a) / (b - y) tmp = 0 if z <= -3.8e+74: tmp = t_3 elif z <= -1.7e+62: tmp = (-t / y) - ((x + (t / y)) / z) elif z <= -1.6e+15: tmp = t_3 elif z <= -8.4e-91: tmp = (t_1 + (y * x)) / t_2 elif z <= 0.022: tmp = x + (t_1 / t_2) else: tmp = t_3 + ((y * x) / t_2) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(y + Float64(z * Float64(b - y))) t_3 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -3.8e+74) tmp = t_3; elseif (z <= -1.7e+62) tmp = Float64(Float64(Float64(-t) / y) - Float64(Float64(x + Float64(t / y)) / z)); elseif (z <= -1.6e+15) tmp = t_3; elseif (z <= -8.4e-91) tmp = Float64(Float64(t_1 + Float64(y * x)) / t_2); elseif (z <= 0.022) tmp = Float64(x + Float64(t_1 / t_2)); else tmp = Float64(t_3 + Float64(Float64(y * x) / t_2)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (t - a); t_2 = y + (z * (b - y)); t_3 = (t - a) / (b - y); tmp = 0.0; if (z <= -3.8e+74) tmp = t_3; elseif (z <= -1.7e+62) tmp = (-t / y) - ((x + (t / y)) / z); elseif (z <= -1.6e+15) tmp = t_3; elseif (z <= -8.4e-91) tmp = (t_1 + (y * x)) / t_2; elseif (z <= 0.022) tmp = x + (t_1 / t_2); else tmp = t_3 + ((y * x) / t_2); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.8e+74], t$95$3, If[LessEqual[z, -1.7e+62], N[(N[((-t) / y), $MachinePrecision] - N[(N[(x + N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.6e+15], t$95$3, If[LessEqual[z, -8.4e-91], N[(N[(t$95$1 + N[(y * x), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[z, 0.022], N[(x + N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision], N[(t$95$3 + N[(N[(y * x), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := y + z \cdot \left(b - y\right)\\
t_3 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{+74}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{+62}:\\
\;\;\;\;\frac{-t}{y} - \frac{x + \frac{t}{y}}{z}\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{+15}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq -8.4 \cdot 10^{-91}:\\
\;\;\;\;\frac{t\_1 + y \cdot x}{t\_2}\\
\mathbf{elif}\;z \leq 0.022:\\
\;\;\;\;x + \frac{t\_1}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;t\_3 + \frac{y \cdot x}{t\_2}\\
\end{array}
\end{array}
if z < -3.7999999999999998e74 or -1.70000000000000007e62 < z < -1.6e15Initial program 43.4%
Taylor expanded in z around inf 90.9%
if -3.7999999999999998e74 < z < -1.70000000000000007e62Initial program 18.1%
Taylor expanded in a around 0 18.1%
Taylor expanded in b around 0 18.1%
mul-1-neg18.1%
distribute-lft-neg-out18.1%
*-commutative18.1%
Simplified18.1%
Taylor expanded in z around -inf 100.0%
mul-1-neg100.0%
unsub-neg100.0%
associate-*r/100.0%
neg-mul-1100.0%
cancel-sign-sub-inv100.0%
metadata-eval100.0%
*-lft-identity100.0%
Simplified100.0%
if -1.6e15 < z < -8.3999999999999997e-91Initial program 84.1%
if -8.3999999999999997e-91 < z < 0.021999999999999999Initial program 82.0%
Taylor expanded in x around 0 82.0%
Taylor expanded in z around 0 89.8%
if 0.021999999999999999 < z Initial program 45.7%
Taylor expanded in x around 0 45.7%
Taylor expanded in z around inf 83.9%
Final simplification88.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a)))
(t_2 (/ (- t a) (- b y)))
(t_3 (+ y (* z (- b y)))))
(if (<= z -5.2e+85)
t_2
(if (<= z -6.2e+60)
(+ (* (/ y (- b y)) (/ x z)) (* t (/ z t_3)))
(if (<= z -1.6e+15)
t_2
(if (<= z -7.8e-91)
(/ (+ t_1 (* y x)) t_3)
(if (<= z 0.09) (+ x (/ t_1 t_3)) (+ t_2 (/ (* y x) t_3)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = (t - a) / (b - y);
double t_3 = y + (z * (b - y));
double tmp;
if (z <= -5.2e+85) {
tmp = t_2;
} else if (z <= -6.2e+60) {
tmp = ((y / (b - y)) * (x / z)) + (t * (z / t_3));
} else if (z <= -1.6e+15) {
tmp = t_2;
} else if (z <= -7.8e-91) {
tmp = (t_1 + (y * x)) / t_3;
} else if (z <= 0.09) {
tmp = x + (t_1 / t_3);
} else {
tmp = t_2 + ((y * x) / t_3);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = z * (t - a)
t_2 = (t - a) / (b - y)
t_3 = y + (z * (b - y))
if (z <= (-5.2d+85)) then
tmp = t_2
else if (z <= (-6.2d+60)) then
tmp = ((y / (b - y)) * (x / z)) + (t * (z / t_3))
else if (z <= (-1.6d+15)) then
tmp = t_2
else if (z <= (-7.8d-91)) then
tmp = (t_1 + (y * x)) / t_3
else if (z <= 0.09d0) then
tmp = x + (t_1 / t_3)
else
tmp = t_2 + ((y * x) / t_3)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = (t - a) / (b - y);
double t_3 = y + (z * (b - y));
double tmp;
if (z <= -5.2e+85) {
tmp = t_2;
} else if (z <= -6.2e+60) {
tmp = ((y / (b - y)) * (x / z)) + (t * (z / t_3));
} else if (z <= -1.6e+15) {
tmp = t_2;
} else if (z <= -7.8e-91) {
tmp = (t_1 + (y * x)) / t_3;
} else if (z <= 0.09) {
tmp = x + (t_1 / t_3);
} else {
tmp = t_2 + ((y * x) / t_3);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = (t - a) / (b - y) t_3 = y + (z * (b - y)) tmp = 0 if z <= -5.2e+85: tmp = t_2 elif z <= -6.2e+60: tmp = ((y / (b - y)) * (x / z)) + (t * (z / t_3)) elif z <= -1.6e+15: tmp = t_2 elif z <= -7.8e-91: tmp = (t_1 + (y * x)) / t_3 elif z <= 0.09: tmp = x + (t_1 / t_3) else: tmp = t_2 + ((y * x) / t_3) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(Float64(t - a) / Float64(b - y)) t_3 = Float64(y + Float64(z * Float64(b - y))) tmp = 0.0 if (z <= -5.2e+85) tmp = t_2; elseif (z <= -6.2e+60) tmp = Float64(Float64(Float64(y / Float64(b - y)) * Float64(x / z)) + Float64(t * Float64(z / t_3))); elseif (z <= -1.6e+15) tmp = t_2; elseif (z <= -7.8e-91) tmp = Float64(Float64(t_1 + Float64(y * x)) / t_3); elseif (z <= 0.09) tmp = Float64(x + Float64(t_1 / t_3)); else tmp = Float64(t_2 + Float64(Float64(y * x) / t_3)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (t - a); t_2 = (t - a) / (b - y); t_3 = y + (z * (b - y)); tmp = 0.0; if (z <= -5.2e+85) tmp = t_2; elseif (z <= -6.2e+60) tmp = ((y / (b - y)) * (x / z)) + (t * (z / t_3)); elseif (z <= -1.6e+15) tmp = t_2; elseif (z <= -7.8e-91) tmp = (t_1 + (y * x)) / t_3; elseif (z <= 0.09) tmp = x + (t_1 / t_3); else tmp = t_2 + ((y * x) / t_3); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.2e+85], t$95$2, If[LessEqual[z, -6.2e+60], N[(N[(N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + N[(t * N[(z / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.6e+15], t$95$2, If[LessEqual[z, -7.8e-91], N[(N[(t$95$1 + N[(y * x), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision], If[LessEqual[z, 0.09], N[(x + N[(t$95$1 / t$95$3), $MachinePrecision]), $MachinePrecision], N[(t$95$2 + N[(N[(y * x), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := \frac{t - a}{b - y}\\
t_3 := y + z \cdot \left(b - y\right)\\
\mathbf{if}\;z \leq -5.2 \cdot 10^{+85}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{+60}:\\
\;\;\;\;\frac{y}{b - y} \cdot \frac{x}{z} + t \cdot \frac{z}{t\_3}\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{+15}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -7.8 \cdot 10^{-91}:\\
\;\;\;\;\frac{t\_1 + y \cdot x}{t\_3}\\
\mathbf{elif}\;z \leq 0.09:\\
\;\;\;\;x + \frac{t\_1}{t\_3}\\
\mathbf{else}:\\
\;\;\;\;t\_2 + \frac{y \cdot x}{t\_3}\\
\end{array}
\end{array}
if z < -5.20000000000000021e85 or -6.2000000000000001e60 < z < -1.6e15Initial program 43.0%
Taylor expanded in z around inf 92.3%
if -5.20000000000000021e85 < z < -6.2000000000000001e60Initial program 26.8%
Taylor expanded in x around 0 26.8%
Taylor expanded in t around inf 26.8%
associate-/l*39.0%
Simplified39.0%
Taylor expanded in z around inf 39.0%
times-frac100.0%
Simplified100.0%
if -1.6e15 < z < -7.79999999999999987e-91Initial program 84.1%
if -7.79999999999999987e-91 < z < 0.089999999999999997Initial program 82.0%
Taylor expanded in x around 0 82.0%
Taylor expanded in z around 0 89.8%
if 0.089999999999999997 < z Initial program 45.7%
Taylor expanded in x around 0 45.7%
Taylor expanded in z around inf 83.9%
Final simplification88.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (/ (- t a) (+ y (* z (- b y)))))) (t_2 (/ (- t a) (- b y))))
(if (<= z -3.8e+74)
t_2
(if (<= z -1.7e+62)
(- (/ (- t) y) (/ (+ x (/ t y)) z))
(if (<= z -1.05e+15)
t_2
(if (<= z -1.7e-88)
t_1
(if (<= z 7e-101)
(/ (+ (* y x) (* z t)) (+ y (* z b)))
(if (<= z 2.7e+15) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * ((t - a) / (y + (z * (b - y))));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -3.8e+74) {
tmp = t_2;
} else if (z <= -1.7e+62) {
tmp = (-t / y) - ((x + (t / y)) / z);
} else if (z <= -1.05e+15) {
tmp = t_2;
} else if (z <= -1.7e-88) {
tmp = t_1;
} else if (z <= 7e-101) {
tmp = ((y * x) + (z * t)) / (y + (z * b));
} else if (z <= 2.7e+15) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = z * ((t - a) / (y + (z * (b - y))))
t_2 = (t - a) / (b - y)
if (z <= (-3.8d+74)) then
tmp = t_2
else if (z <= (-1.7d+62)) then
tmp = (-t / y) - ((x + (t / y)) / z)
else if (z <= (-1.05d+15)) then
tmp = t_2
else if (z <= (-1.7d-88)) then
tmp = t_1
else if (z <= 7d-101) then
tmp = ((y * x) + (z * t)) / (y + (z * b))
else if (z <= 2.7d+15) 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 a, double b) {
double t_1 = z * ((t - a) / (y + (z * (b - y))));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -3.8e+74) {
tmp = t_2;
} else if (z <= -1.7e+62) {
tmp = (-t / y) - ((x + (t / y)) / z);
} else if (z <= -1.05e+15) {
tmp = t_2;
} else if (z <= -1.7e-88) {
tmp = t_1;
} else if (z <= 7e-101) {
tmp = ((y * x) + (z * t)) / (y + (z * b));
} else if (z <= 2.7e+15) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * ((t - a) / (y + (z * (b - y)))) t_2 = (t - a) / (b - y) tmp = 0 if z <= -3.8e+74: tmp = t_2 elif z <= -1.7e+62: tmp = (-t / y) - ((x + (t / y)) / z) elif z <= -1.05e+15: tmp = t_2 elif z <= -1.7e-88: tmp = t_1 elif z <= 7e-101: tmp = ((y * x) + (z * t)) / (y + (z * b)) elif z <= 2.7e+15: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(Float64(t - a) / Float64(y + Float64(z * Float64(b - y))))) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -3.8e+74) tmp = t_2; elseif (z <= -1.7e+62) tmp = Float64(Float64(Float64(-t) / y) - Float64(Float64(x + Float64(t / y)) / z)); elseif (z <= -1.05e+15) tmp = t_2; elseif (z <= -1.7e-88) tmp = t_1; elseif (z <= 7e-101) tmp = Float64(Float64(Float64(y * x) + Float64(z * t)) / Float64(y + Float64(z * b))); elseif (z <= 2.7e+15) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * ((t - a) / (y + (z * (b - y)))); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -3.8e+74) tmp = t_2; elseif (z <= -1.7e+62) tmp = (-t / y) - ((x + (t / y)) / z); elseif (z <= -1.05e+15) tmp = t_2; elseif (z <= -1.7e-88) tmp = t_1; elseif (z <= 7e-101) tmp = ((y * x) + (z * t)) / (y + (z * b)); elseif (z <= 2.7e+15) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(N[(t - a), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.8e+74], t$95$2, If[LessEqual[z, -1.7e+62], N[(N[((-t) / y), $MachinePrecision] - N[(N[(x + N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.05e+15], t$95$2, If[LessEqual[z, -1.7e-88], t$95$1, If[LessEqual[z, 7e-101], N[(N[(N[(y * x), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.7e+15], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{t - a}{y + z \cdot \left(b - y\right)}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{+74}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{+62}:\\
\;\;\;\;\frac{-t}{y} - \frac{x + \frac{t}{y}}{z}\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{+15}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-88}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-101}:\\
\;\;\;\;\frac{y \cdot x + z \cdot t}{y + z \cdot b}\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+15}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -3.7999999999999998e74 or -1.70000000000000007e62 < z < -1.05e15 or 2.7e15 < z Initial program 41.3%
Taylor expanded in z around inf 84.1%
if -3.7999999999999998e74 < z < -1.70000000000000007e62Initial program 18.1%
Taylor expanded in a around 0 18.1%
Taylor expanded in b around 0 18.1%
mul-1-neg18.1%
distribute-lft-neg-out18.1%
*-commutative18.1%
Simplified18.1%
Taylor expanded in z around -inf 100.0%
mul-1-neg100.0%
unsub-neg100.0%
associate-*r/100.0%
neg-mul-1100.0%
cancel-sign-sub-inv100.0%
metadata-eval100.0%
*-lft-identity100.0%
Simplified100.0%
if -1.05e15 < z < -1.69999999999999987e-88 or 6.99999999999999989e-101 < z < 2.7e15Initial program 81.4%
sub-neg81.4%
distribute-lft-in81.4%
Applied egg-rr81.4%
Taylor expanded in x around 0 63.6%
associate-/l*63.5%
+-commutative63.5%
associate-*r*63.5%
distribute-rgt-in63.5%
mul-1-neg63.5%
sub-neg63.5%
Simplified63.5%
if -1.69999999999999987e-88 < z < 6.99999999999999989e-101Initial program 84.3%
Taylor expanded in a around 0 72.1%
Taylor expanded in b around inf 72.1%
*-commutative72.1%
Simplified72.1%
Final simplification76.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a))) (t_2 (/ (- t a) (- b y))))
(if (<= z -3.8e+74)
t_2
(if (<= z -1.55e+62)
(- (/ (- t) y) (/ (+ x (/ t y)) z))
(if (<= z -8500.0)
t_2
(if (<= z -7.8e-91)
(/ (+ t_1 (* y x)) (+ y (* z b)))
(if (<= z 185000000.0) (+ x (/ t_1 (+ y (* z (- b y))))) t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -3.8e+74) {
tmp = t_2;
} else if (z <= -1.55e+62) {
tmp = (-t / y) - ((x + (t / y)) / z);
} else if (z <= -8500.0) {
tmp = t_2;
} else if (z <= -7.8e-91) {
tmp = (t_1 + (y * x)) / (y + (z * b));
} else if (z <= 185000000.0) {
tmp = x + (t_1 / (y + (z * (b - y))));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = z * (t - a)
t_2 = (t - a) / (b - y)
if (z <= (-3.8d+74)) then
tmp = t_2
else if (z <= (-1.55d+62)) then
tmp = (-t / y) - ((x + (t / y)) / z)
else if (z <= (-8500.0d0)) then
tmp = t_2
else if (z <= (-7.8d-91)) then
tmp = (t_1 + (y * x)) / (y + (z * b))
else if (z <= 185000000.0d0) then
tmp = x + (t_1 / (y + (z * (b - y))))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -3.8e+74) {
tmp = t_2;
} else if (z <= -1.55e+62) {
tmp = (-t / y) - ((x + (t / y)) / z);
} else if (z <= -8500.0) {
tmp = t_2;
} else if (z <= -7.8e-91) {
tmp = (t_1 + (y * x)) / (y + (z * b));
} else if (z <= 185000000.0) {
tmp = x + (t_1 / (y + (z * (b - y))));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = (t - a) / (b - y) tmp = 0 if z <= -3.8e+74: tmp = t_2 elif z <= -1.55e+62: tmp = (-t / y) - ((x + (t / y)) / z) elif z <= -8500.0: tmp = t_2 elif z <= -7.8e-91: tmp = (t_1 + (y * x)) / (y + (z * b)) elif z <= 185000000.0: tmp = x + (t_1 / (y + (z * (b - y)))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -3.8e+74) tmp = t_2; elseif (z <= -1.55e+62) tmp = Float64(Float64(Float64(-t) / y) - Float64(Float64(x + Float64(t / y)) / z)); elseif (z <= -8500.0) tmp = t_2; elseif (z <= -7.8e-91) tmp = Float64(Float64(t_1 + Float64(y * x)) / Float64(y + Float64(z * b))); elseif (z <= 185000000.0) tmp = Float64(x + Float64(t_1 / Float64(y + Float64(z * Float64(b - y))))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (t - a); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -3.8e+74) tmp = t_2; elseif (z <= -1.55e+62) tmp = (-t / y) - ((x + (t / y)) / z); elseif (z <= -8500.0) tmp = t_2; elseif (z <= -7.8e-91) tmp = (t_1 + (y * x)) / (y + (z * b)); elseif (z <= 185000000.0) tmp = x + (t_1 / (y + (z * (b - y)))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.8e+74], t$95$2, If[LessEqual[z, -1.55e+62], N[(N[((-t) / y), $MachinePrecision] - N[(N[(x + N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -8500.0], t$95$2, If[LessEqual[z, -7.8e-91], N[(N[(t$95$1 + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 185000000.0], N[(x + N[(t$95$1 / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{+74}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{+62}:\\
\;\;\;\;\frac{-t}{y} - \frac{x + \frac{t}{y}}{z}\\
\mathbf{elif}\;z \leq -8500:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -7.8 \cdot 10^{-91}:\\
\;\;\;\;\frac{t\_1 + y \cdot x}{y + z \cdot b}\\
\mathbf{elif}\;z \leq 185000000:\\
\;\;\;\;x + \frac{t\_1}{y + z \cdot \left(b - y\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -3.7999999999999998e74 or -1.55000000000000007e62 < z < -8500 or 1.85e8 < z Initial program 43.7%
Taylor expanded in z around inf 83.1%
if -3.7999999999999998e74 < z < -1.55000000000000007e62Initial program 18.1%
Taylor expanded in a around 0 18.1%
Taylor expanded in b around 0 18.1%
mul-1-neg18.1%
distribute-lft-neg-out18.1%
*-commutative18.1%
Simplified18.1%
Taylor expanded in z around -inf 100.0%
mul-1-neg100.0%
unsub-neg100.0%
associate-*r/100.0%
neg-mul-1100.0%
cancel-sign-sub-inv100.0%
metadata-eval100.0%
*-lft-identity100.0%
Simplified100.0%
if -8500 < z < -7.79999999999999987e-91Initial program 82.7%
Taylor expanded in b around inf 81.3%
*-commutative48.1%
Simplified81.3%
if -7.79999999999999987e-91 < z < 1.85e8Initial program 82.6%
Taylor expanded in x around 0 82.6%
Taylor expanded in z around 0 88.4%
Final simplification85.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -3.8e+74)
t_1
(if (<= z -1.7e+62)
(- (/ (- t) y) (/ (+ x (/ t y)) z))
(if (or (<= z -1150000000.0) (not (<= z 160000000.0)))
t_1
(+ x (/ (* z (- t a)) (+ y (* z (- b y))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -3.8e+74) {
tmp = t_1;
} else if (z <= -1.7e+62) {
tmp = (-t / y) - ((x + (t / y)) / z);
} else if ((z <= -1150000000.0) || !(z <= 160000000.0)) {
tmp = t_1;
} else {
tmp = x + ((z * (t - a)) / (y + (z * (b - y))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-3.8d+74)) then
tmp = t_1
else if (z <= (-1.7d+62)) then
tmp = (-t / y) - ((x + (t / y)) / z)
else if ((z <= (-1150000000.0d0)) .or. (.not. (z <= 160000000.0d0))) then
tmp = t_1
else
tmp = x + ((z * (t - a)) / (y + (z * (b - y))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -3.8e+74) {
tmp = t_1;
} else if (z <= -1.7e+62) {
tmp = (-t / y) - ((x + (t / y)) / z);
} else if ((z <= -1150000000.0) || !(z <= 160000000.0)) {
tmp = t_1;
} else {
tmp = x + ((z * (t - a)) / (y + (z * (b - y))));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -3.8e+74: tmp = t_1 elif z <= -1.7e+62: tmp = (-t / y) - ((x + (t / y)) / z) elif (z <= -1150000000.0) or not (z <= 160000000.0): tmp = t_1 else: tmp = x + ((z * (t - a)) / (y + (z * (b - y)))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -3.8e+74) tmp = t_1; elseif (z <= -1.7e+62) tmp = Float64(Float64(Float64(-t) / y) - Float64(Float64(x + Float64(t / y)) / z)); elseif ((z <= -1150000000.0) || !(z <= 160000000.0)) tmp = t_1; else tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / Float64(y + Float64(z * Float64(b - y))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -3.8e+74) tmp = t_1; elseif (z <= -1.7e+62) tmp = (-t / y) - ((x + (t / y)) / z); elseif ((z <= -1150000000.0) || ~((z <= 160000000.0))) tmp = t_1; else tmp = x + ((z * (t - a)) / (y + (z * (b - y)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.8e+74], t$95$1, If[LessEqual[z, -1.7e+62], N[(N[((-t) / y), $MachinePrecision] - N[(N[(x + N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -1150000000.0], N[Not[LessEqual[z, 160000000.0]], $MachinePrecision]], t$95$1, N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{+74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{+62}:\\
\;\;\;\;\frac{-t}{y} - \frac{x + \frac{t}{y}}{z}\\
\mathbf{elif}\;z \leq -1150000000 \lor \neg \left(z \leq 160000000\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -3.7999999999999998e74 or -1.70000000000000007e62 < z < -1.15e9 or 1.6e8 < z Initial program 42.7%
Taylor expanded in z around inf 83.7%
if -3.7999999999999998e74 < z < -1.70000000000000007e62Initial program 18.1%
Taylor expanded in a around 0 18.1%
Taylor expanded in b around 0 18.1%
mul-1-neg18.1%
distribute-lft-neg-out18.1%
*-commutative18.1%
Simplified18.1%
Taylor expanded in z around -inf 100.0%
mul-1-neg100.0%
unsub-neg100.0%
associate-*r/100.0%
neg-mul-1100.0%
cancel-sign-sub-inv100.0%
metadata-eval100.0%
*-lft-identity100.0%
Simplified100.0%
if -1.15e9 < z < 1.6e8Initial program 82.9%
Taylor expanded in x around 0 82.9%
Taylor expanded in z around 0 83.2%
Final simplification83.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ t y))) (t_2 (/ (- t a) (- b y))))
(if (<= z -3.9e+74)
t_2
(if (<= z -1.7e+62)
(- (/ (- t) y) (/ t_1 z))
(if (<= z -1.3e+15)
t_2
(if (<= z -1e-153)
(* z (/ (- t a) (+ y (* z (- b y)))))
(if (<= z 0.0005) (+ x (* z t_1)) t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (t / y);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -3.9e+74) {
tmp = t_2;
} else if (z <= -1.7e+62) {
tmp = (-t / y) - (t_1 / z);
} else if (z <= -1.3e+15) {
tmp = t_2;
} else if (z <= -1e-153) {
tmp = z * ((t - a) / (y + (z * (b - y))));
} else if (z <= 0.0005) {
tmp = x + (z * t_1);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (t / y)
t_2 = (t - a) / (b - y)
if (z <= (-3.9d+74)) then
tmp = t_2
else if (z <= (-1.7d+62)) then
tmp = (-t / y) - (t_1 / z)
else if (z <= (-1.3d+15)) then
tmp = t_2
else if (z <= (-1d-153)) then
tmp = z * ((t - a) / (y + (z * (b - y))))
else if (z <= 0.0005d0) then
tmp = x + (z * 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 a, double b) {
double t_1 = x + (t / y);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -3.9e+74) {
tmp = t_2;
} else if (z <= -1.7e+62) {
tmp = (-t / y) - (t_1 / z);
} else if (z <= -1.3e+15) {
tmp = t_2;
} else if (z <= -1e-153) {
tmp = z * ((t - a) / (y + (z * (b - y))));
} else if (z <= 0.0005) {
tmp = x + (z * t_1);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (t / y) t_2 = (t - a) / (b - y) tmp = 0 if z <= -3.9e+74: tmp = t_2 elif z <= -1.7e+62: tmp = (-t / y) - (t_1 / z) elif z <= -1.3e+15: tmp = t_2 elif z <= -1e-153: tmp = z * ((t - a) / (y + (z * (b - y)))) elif z <= 0.0005: tmp = x + (z * t_1) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(t / y)) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -3.9e+74) tmp = t_2; elseif (z <= -1.7e+62) tmp = Float64(Float64(Float64(-t) / y) - Float64(t_1 / z)); elseif (z <= -1.3e+15) tmp = t_2; elseif (z <= -1e-153) tmp = Float64(z * Float64(Float64(t - a) / Float64(y + Float64(z * Float64(b - y))))); elseif (z <= 0.0005) tmp = Float64(x + Float64(z * t_1)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (t / y); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -3.9e+74) tmp = t_2; elseif (z <= -1.7e+62) tmp = (-t / y) - (t_1 / z); elseif (z <= -1.3e+15) tmp = t_2; elseif (z <= -1e-153) tmp = z * ((t - a) / (y + (z * (b - y)))); elseif (z <= 0.0005) tmp = x + (z * t_1); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(t / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.9e+74], t$95$2, If[LessEqual[z, -1.7e+62], N[(N[((-t) / y), $MachinePrecision] - N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.3e+15], t$95$2, If[LessEqual[z, -1e-153], N[(z * N[(N[(t - a), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.0005], N[(x + N[(z * t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{t}{y}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -3.9 \cdot 10^{+74}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{+62}:\\
\;\;\;\;\frac{-t}{y} - \frac{t\_1}{z}\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{+15}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1 \cdot 10^{-153}:\\
\;\;\;\;z \cdot \frac{t - a}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq 0.0005:\\
\;\;\;\;x + z \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -3.90000000000000008e74 or -1.70000000000000007e62 < z < -1.3e15 or 5.0000000000000001e-4 < z Initial program 44.6%
Taylor expanded in z around inf 82.3%
if -3.90000000000000008e74 < z < -1.70000000000000007e62Initial program 18.1%
Taylor expanded in a around 0 18.1%
Taylor expanded in b around 0 18.1%
mul-1-neg18.1%
distribute-lft-neg-out18.1%
*-commutative18.1%
Simplified18.1%
Taylor expanded in z around -inf 100.0%
mul-1-neg100.0%
unsub-neg100.0%
associate-*r/100.0%
neg-mul-1100.0%
cancel-sign-sub-inv100.0%
metadata-eval100.0%
*-lft-identity100.0%
Simplified100.0%
if -1.3e15 < z < -1.00000000000000004e-153Initial program 84.5%
sub-neg84.5%
distribute-lft-in84.5%
Applied egg-rr84.5%
Taylor expanded in x around 0 66.8%
associate-/l*59.2%
+-commutative59.2%
associate-*r*59.2%
distribute-rgt-in59.2%
mul-1-neg59.2%
sub-neg59.2%
Simplified59.2%
if -1.00000000000000004e-153 < z < 5.0000000000000001e-4Initial program 81.5%
Taylor expanded in a around 0 64.0%
Taylor expanded in b around 0 56.1%
mul-1-neg56.1%
distribute-lft-neg-out56.1%
*-commutative56.1%
Simplified56.1%
Taylor expanded in z around 0 63.6%
mul-1-neg63.6%
Simplified63.6%
Final simplification72.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ t y))) (t_2 (/ (- t a) (- b y))))
(if (<= z -3.8e+74)
t_2
(if (<= z -1.7e+62)
(- (/ (- t) y) (/ t_1 z))
(if (or (<= z -9.5e-153) (not (<= z 0.0005))) t_2 (+ x (* z t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (t / y);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -3.8e+74) {
tmp = t_2;
} else if (z <= -1.7e+62) {
tmp = (-t / y) - (t_1 / z);
} else if ((z <= -9.5e-153) || !(z <= 0.0005)) {
tmp = t_2;
} else {
tmp = x + (z * t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (t / y)
t_2 = (t - a) / (b - y)
if (z <= (-3.8d+74)) then
tmp = t_2
else if (z <= (-1.7d+62)) then
tmp = (-t / y) - (t_1 / z)
else if ((z <= (-9.5d-153)) .or. (.not. (z <= 0.0005d0))) then
tmp = t_2
else
tmp = x + (z * t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (t / y);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -3.8e+74) {
tmp = t_2;
} else if (z <= -1.7e+62) {
tmp = (-t / y) - (t_1 / z);
} else if ((z <= -9.5e-153) || !(z <= 0.0005)) {
tmp = t_2;
} else {
tmp = x + (z * t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (t / y) t_2 = (t - a) / (b - y) tmp = 0 if z <= -3.8e+74: tmp = t_2 elif z <= -1.7e+62: tmp = (-t / y) - (t_1 / z) elif (z <= -9.5e-153) or not (z <= 0.0005): tmp = t_2 else: tmp = x + (z * t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(t / y)) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -3.8e+74) tmp = t_2; elseif (z <= -1.7e+62) tmp = Float64(Float64(Float64(-t) / y) - Float64(t_1 / z)); elseif ((z <= -9.5e-153) || !(z <= 0.0005)) tmp = t_2; else tmp = Float64(x + Float64(z * t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (t / y); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -3.8e+74) tmp = t_2; elseif (z <= -1.7e+62) tmp = (-t / y) - (t_1 / z); elseif ((z <= -9.5e-153) || ~((z <= 0.0005))) tmp = t_2; else tmp = x + (z * t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(t / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.8e+74], t$95$2, If[LessEqual[z, -1.7e+62], N[(N[((-t) / y), $MachinePrecision] - N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -9.5e-153], N[Not[LessEqual[z, 0.0005]], $MachinePrecision]], t$95$2, N[(x + N[(z * t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{t}{y}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{+74}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{+62}:\\
\;\;\;\;\frac{-t}{y} - \frac{t\_1}{z}\\
\mathbf{elif}\;z \leq -9.5 \cdot 10^{-153} \lor \neg \left(z \leq 0.0005\right):\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot t\_1\\
\end{array}
\end{array}
if z < -3.7999999999999998e74 or -1.70000000000000007e62 < z < -9.50000000000000031e-153 or 5.0000000000000001e-4 < z Initial program 54.0%
Taylor expanded in z around inf 74.1%
if -3.7999999999999998e74 < z < -1.70000000000000007e62Initial program 18.1%
Taylor expanded in a around 0 18.1%
Taylor expanded in b around 0 18.1%
mul-1-neg18.1%
distribute-lft-neg-out18.1%
*-commutative18.1%
Simplified18.1%
Taylor expanded in z around -inf 100.0%
mul-1-neg100.0%
unsub-neg100.0%
associate-*r/100.0%
neg-mul-1100.0%
cancel-sign-sub-inv100.0%
metadata-eval100.0%
*-lft-identity100.0%
Simplified100.0%
if -9.50000000000000031e-153 < z < 5.0000000000000001e-4Initial program 81.5%
Taylor expanded in a around 0 64.0%
Taylor expanded in b around 0 56.1%
mul-1-neg56.1%
distribute-lft-neg-out56.1%
*-commutative56.1%
Simplified56.1%
Taylor expanded in z around 0 63.6%
mul-1-neg63.6%
Simplified63.6%
Final simplification70.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -9.5e-153) (not (<= z 6.2e-5))) (/ (- t a) (- b y)) (+ x (* z (+ x (/ t y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -9.5e-153) || !(z <= 6.2e-5)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + (z * (x + (t / y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-9.5d-153)) .or. (.not. (z <= 6.2d-5))) then
tmp = (t - a) / (b - y)
else
tmp = x + (z * (x + (t / y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -9.5e-153) || !(z <= 6.2e-5)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + (z * (x + (t / y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -9.5e-153) or not (z <= 6.2e-5): tmp = (t - a) / (b - y) else: tmp = x + (z * (x + (t / y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -9.5e-153) || !(z <= 6.2e-5)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(z * Float64(x + Float64(t / y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -9.5e-153) || ~((z <= 6.2e-5))) tmp = (t - a) / (b - y); else tmp = x + (z * (x + (t / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -9.5e-153], N[Not[LessEqual[z, 6.2e-5]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(x + N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{-153} \lor \neg \left(z \leq 6.2 \cdot 10^{-5}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(x + \frac{t}{y}\right)\\
\end{array}
\end{array}
if z < -9.50000000000000031e-153 or 6.20000000000000027e-5 < z Initial program 52.7%
Taylor expanded in z around inf 72.1%
if -9.50000000000000031e-153 < z < 6.20000000000000027e-5Initial program 81.5%
Taylor expanded in a around 0 64.0%
Taylor expanded in b around 0 56.1%
mul-1-neg56.1%
distribute-lft-neg-out56.1%
*-commutative56.1%
Simplified56.1%
Taylor expanded in z around 0 63.6%
mul-1-neg63.6%
Simplified63.6%
Final simplification69.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1e-153) (not (<= z 41000.0))) (/ (- t a) (- b y)) (/ x (- 1.0 z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1e-153) || !(z <= 41000.0)) {
tmp = (t - a) / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1d-153)) .or. (.not. (z <= 41000.0d0))) then
tmp = (t - a) / (b - y)
else
tmp = x / (1.0d0 - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1e-153) || !(z <= 41000.0)) {
tmp = (t - a) / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1e-153) or not (z <= 41000.0): tmp = (t - a) / (b - y) else: tmp = x / (1.0 - z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1e-153) || !(z <= 41000.0)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x / Float64(1.0 - z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1e-153) || ~((z <= 41000.0))) tmp = (t - a) / (b - y); else tmp = x / (1.0 - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1e-153], N[Not[LessEqual[z, 41000.0]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{-153} \lor \neg \left(z \leq 41000\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - z}\\
\end{array}
\end{array}
if z < -1.00000000000000004e-153 or 41000 < z Initial program 52.1%
Taylor expanded in z around inf 72.9%
if -1.00000000000000004e-153 < z < 41000Initial program 81.9%
Taylor expanded in y around inf 56.8%
mul-1-neg56.8%
unsub-neg56.8%
Simplified56.8%
Final simplification67.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1e-154) (not (<= z 0.000106))) (/ t (- b y)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1e-154) || !(z <= 0.000106)) {
tmp = t / (b - y);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1d-154)) .or. (.not. (z <= 0.000106d0))) then
tmp = t / (b - y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1e-154) || !(z <= 0.000106)) {
tmp = t / (b - y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1e-154) or not (z <= 0.000106): tmp = t / (b - y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1e-154) || !(z <= 0.000106)) tmp = Float64(t / Float64(b - y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1e-154) || ~((z <= 0.000106))) tmp = t / (b - y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1e-154], N[Not[LessEqual[z, 0.000106]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{-154} \lor \neg \left(z \leq 0.000106\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -9.9999999999999997e-155 or 1.06e-4 < z Initial program 52.7%
Taylor expanded in a around 0 37.5%
Taylor expanded in z around inf 42.9%
if -9.9999999999999997e-155 < z < 1.06e-4Initial program 81.5%
Taylor expanded in z around 0 56.8%
Final simplification47.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.35e+58) (not (<= y 5.5e-11))) (/ x (- 1.0 z)) (/ t (- b y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.35e+58) || !(y <= 5.5e-11)) {
tmp = x / (1.0 - z);
} else {
tmp = t / (b - y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.35d+58)) .or. (.not. (y <= 5.5d-11))) then
tmp = x / (1.0d0 - z)
else
tmp = t / (b - y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.35e+58) || !(y <= 5.5e-11)) {
tmp = x / (1.0 - z);
} else {
tmp = t / (b - y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.35e+58) or not (y <= 5.5e-11): tmp = x / (1.0 - z) else: tmp = t / (b - y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.35e+58) || !(y <= 5.5e-11)) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(t / Float64(b - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.35e+58) || ~((y <= 5.5e-11))) tmp = x / (1.0 - z); else tmp = t / (b - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.35e+58], N[Not[LessEqual[y, 5.5e-11]], $MachinePrecision]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.35 \cdot 10^{+58} \lor \neg \left(y \leq 5.5 \cdot 10^{-11}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b - y}\\
\end{array}
\end{array}
if y < -1.3500000000000001e58 or 5.49999999999999975e-11 < y Initial program 49.9%
Taylor expanded in y around inf 56.3%
mul-1-neg56.3%
unsub-neg56.3%
Simplified56.3%
if -1.3500000000000001e58 < y < 5.49999999999999975e-11Initial program 75.5%
Taylor expanded in a around 0 51.7%
Taylor expanded in z around inf 43.8%
Final simplification49.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -7.4e+56) (not (<= y 1.85e+64))) (/ x (- 1.0 z)) (/ (- t a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -7.4e+56) || !(y <= 1.85e+64)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-7.4d+56)) .or. (.not. (y <= 1.85d+64))) then
tmp = x / (1.0d0 - z)
else
tmp = (t - a) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -7.4e+56) || !(y <= 1.85e+64)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -7.4e+56) or not (y <= 1.85e+64): tmp = x / (1.0 - z) else: tmp = (t - a) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -7.4e+56) || !(y <= 1.85e+64)) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(Float64(t - a) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -7.4e+56) || ~((y <= 1.85e+64))) tmp = x / (1.0 - z); else tmp = (t - a) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -7.4e+56], N[Not[LessEqual[y, 1.85e+64]], $MachinePrecision]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.4 \cdot 10^{+56} \lor \neg \left(y \leq 1.85 \cdot 10^{+64}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -7.39999999999999994e56 or 1.84999999999999992e64 < y Initial program 48.8%
Taylor expanded in y around inf 59.4%
mul-1-neg59.4%
unsub-neg59.4%
Simplified59.4%
if -7.39999999999999994e56 < y < 1.84999999999999992e64Initial program 73.6%
Taylor expanded in y around 0 56.8%
Final simplification57.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -9.5e-153) (not (<= z 1.5e-7))) (/ t b) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -9.5e-153) || !(z <= 1.5e-7)) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-9.5d-153)) .or. (.not. (z <= 1.5d-7))) then
tmp = t / b
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -9.5e-153) || !(z <= 1.5e-7)) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -9.5e-153) or not (z <= 1.5e-7): tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -9.5e-153) || !(z <= 1.5e-7)) tmp = Float64(t / b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -9.5e-153) || ~((z <= 1.5e-7))) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -9.5e-153], N[Not[LessEqual[z, 1.5e-7]], $MachinePrecision]], N[(t / b), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{-153} \lor \neg \left(z \leq 1.5 \cdot 10^{-7}\right):\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -9.50000000000000031e-153 or 1.4999999999999999e-7 < z Initial program 53.2%
Taylor expanded in a around 0 37.7%
Taylor expanded in y around 0 32.2%
if -9.50000000000000031e-153 < z < 1.4999999999999999e-7Initial program 81.1%
Taylor expanded in z around 0 58.0%
Final simplification41.3%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 63.0%
Taylor expanded in z around 0 25.1%
Final simplification25.1%
(FPCore (x y z t a b) :precision binary64 (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z)))))
double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
def code(x, y, z, t, a, b): return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(z * t) + Float64(y * x)) / Float64(y + Float64(z * Float64(b - y)))) - Float64(a / Float64(Float64(b - y) + Float64(y / z)))) end
function tmp = code(x, y, z, t, a, b) tmp = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(z * t), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a / N[(N[(b - y), $MachinePrecision] + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{z \cdot t + y \cdot x}{y + z \cdot \left(b - y\right)} - \frac{a}{\left(b - y\right) + \frac{y}{z}}
\end{array}
herbie shell --seed 2024053
(FPCore (x y z t a b)
:name "Development.Shake.Progress:decay from shake-0.15.5"
:precision binary64
:alt
(- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z))))
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))