
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
real(8) function code(x, y, z, t, a)
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
code = x + (((y - z) * (t - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
real(8) function code(x, y, z, t, a)
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
code = x + (((y - z) * (t - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (or (<= z -7e+215) (not (<= z 1.38e+129))) (+ (+ t (* (/ y z) (- x t))) (/ a (/ z (- t x)))) (- x (/ (- x t) (* (- a z) (/ 1.0 (- y z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -7e+215) || !(z <= 1.38e+129)) {
tmp = (t + ((y / z) * (x - t))) + (a / (z / (t - x)));
} else {
tmp = x - ((x - t) / ((a - z) * (1.0 / (y - z))));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if ((z <= (-7d+215)) .or. (.not. (z <= 1.38d+129))) then
tmp = (t + ((y / z) * (x - t))) + (a / (z / (t - x)))
else
tmp = x - ((x - t) / ((a - z) * (1.0d0 / (y - z))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -7e+215) || !(z <= 1.38e+129)) {
tmp = (t + ((y / z) * (x - t))) + (a / (z / (t - x)));
} else {
tmp = x - ((x - t) / ((a - z) * (1.0 / (y - z))));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -7e+215) or not (z <= 1.38e+129): tmp = (t + ((y / z) * (x - t))) + (a / (z / (t - x))) else: tmp = x - ((x - t) / ((a - z) * (1.0 / (y - z)))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -7e+215) || !(z <= 1.38e+129)) tmp = Float64(Float64(t + Float64(Float64(y / z) * Float64(x - t))) + Float64(a / Float64(z / Float64(t - x)))); else tmp = Float64(x - Float64(Float64(x - t) / Float64(Float64(a - z) * Float64(1.0 / Float64(y - z))))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -7e+215) || ~((z <= 1.38e+129))) tmp = (t + ((y / z) * (x - t))) + (a / (z / (t - x))); else tmp = x - ((x - t) / ((a - z) * (1.0 / (y - z)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -7e+215], N[Not[LessEqual[z, 1.38e+129]], $MachinePrecision]], N[(N[(t + N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a / N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(x - t), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] * N[(1.0 / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{+215} \lor \neg \left(z \leq 1.38 \cdot 10^{+129}\right):\\
\;\;\;\;\left(t + \frac{y}{z} \cdot \left(x - t\right)\right) + \frac{a}{\frac{z}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{x - t}{\left(a - z\right) \cdot \frac{1}{y - z}}\\
\end{array}
\end{array}
if z < -6.99999999999999954e215 or 1.3800000000000001e129 < z Initial program 18.9%
associate-*l/58.1%
Simplified58.1%
*-commutative58.1%
clear-num58.0%
un-div-inv58.1%
Applied egg-rr58.1%
Taylor expanded in z around inf 69.5%
sub-neg69.5%
+-commutative69.5%
mul-1-neg69.5%
unsub-neg69.5%
associate-/l*75.8%
associate-/r/80.6%
mul-1-neg80.6%
remove-double-neg80.6%
associate-/l*91.9%
Simplified91.9%
if -6.99999999999999954e215 < z < 1.3800000000000001e129Initial program 80.7%
associate-*l/89.7%
Simplified89.7%
*-commutative89.7%
clear-num89.6%
un-div-inv89.9%
Applied egg-rr89.9%
div-inv89.9%
Applied egg-rr89.9%
Final simplification90.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- t x) (- y z)) (- a z)))))
(if (or (<= t_1 -1e-277) (not (<= t_1 0.0)))
(+ x (* (- t x) (/ (- y z) (- a z))))
(+ t (/ (* (- t x) (- a y)) z)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((t - x) * (y - z)) / (a - z));
double tmp;
if ((t_1 <= -1e-277) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) * ((y - z) / (a - z)));
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = x + (((t - x) * (y - z)) / (a - z))
if ((t_1 <= (-1d-277)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((t - x) * ((y - z) / (a - z)))
else
tmp = t + (((t - x) * (a - y)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((t - x) * (y - z)) / (a - z));
double tmp;
if ((t_1 <= -1e-277) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) * ((y - z) / (a - z)));
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((t - x) * (y - z)) / (a - z)) tmp = 0 if (t_1 <= -1e-277) or not (t_1 <= 0.0): tmp = x + ((t - x) * ((y - z) / (a - z))) else: tmp = t + (((t - x) * (a - y)) / z) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(t - x) * Float64(y - z)) / Float64(a - z))) tmp = 0.0 if ((t_1 <= -1e-277) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(Float64(t - x) * Float64(Float64(y - z) / Float64(a - z)))); else tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((t - x) * (y - z)) / (a - z)); tmp = 0.0; if ((t_1 <= -1e-277) || ~((t_1 <= 0.0))) tmp = x + ((t - x) * ((y - z) / (a - z))); else tmp = t + (((t - x) * (a - y)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(t - x), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e-277], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{-277} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -9.99999999999999969e-278 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 71.5%
associate-*l/88.9%
Simplified88.9%
if -9.99999999999999969e-278 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.8%
associate-*l/4.8%
Simplified4.8%
Taylor expanded in z around -inf 100.0%
+-commutative100.0%
sub-neg100.0%
mul-1-neg100.0%
+-commutative100.0%
mul-1-neg100.0%
unsub-neg100.0%
+-commutative100.0%
mul-1-neg100.0%
sub-neg100.0%
distribute-rgt-out--100.0%
Simplified100.0%
Final simplification89.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- t x) (- y z)) (- a z)))))
(if (<= t_1 -1e-277)
(+ x (* (- t x) (/ (- y z) (- a z))))
(if (<= t_1 0.0)
(+ t (/ (* (- t x) (- a y)) z))
(+ x (/ (- t x) (/ (- a z) (- y z))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((t - x) * (y - z)) / (a - z));
double tmp;
if (t_1 <= -1e-277) {
tmp = x + ((t - x) * ((y - z) / (a - z)));
} else if (t_1 <= 0.0) {
tmp = t + (((t - x) * (a - y)) / z);
} else {
tmp = x + ((t - x) / ((a - z) / (y - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = x + (((t - x) * (y - z)) / (a - z))
if (t_1 <= (-1d-277)) then
tmp = x + ((t - x) * ((y - z) / (a - z)))
else if (t_1 <= 0.0d0) then
tmp = t + (((t - x) * (a - y)) / z)
else
tmp = x + ((t - x) / ((a - z) / (y - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((t - x) * (y - z)) / (a - z));
double tmp;
if (t_1 <= -1e-277) {
tmp = x + ((t - x) * ((y - z) / (a - z)));
} else if (t_1 <= 0.0) {
tmp = t + (((t - x) * (a - y)) / z);
} else {
tmp = x + ((t - x) / ((a - z) / (y - z)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((t - x) * (y - z)) / (a - z)) tmp = 0 if t_1 <= -1e-277: tmp = x + ((t - x) * ((y - z) / (a - z))) elif t_1 <= 0.0: tmp = t + (((t - x) * (a - y)) / z) else: tmp = x + ((t - x) / ((a - z) / (y - z))) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(t - x) * Float64(y - z)) / Float64(a - z))) tmp = 0.0 if (t_1 <= -1e-277) tmp = Float64(x + Float64(Float64(t - x) * Float64(Float64(y - z) / Float64(a - z)))); elseif (t_1 <= 0.0) tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); else tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((t - x) * (y - z)) / (a - z)); tmp = 0.0; if (t_1 <= -1e-277) tmp = x + ((t - x) * ((y - z) / (a - z))); elseif (t_1 <= 0.0) tmp = t + (((t - x) * (a - y)) / z); else tmp = x + ((t - x) / ((a - z) / (y - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(t - x), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-277], N[(x + N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{-277}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a - z}\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -9.99999999999999969e-278Initial program 70.1%
associate-*l/90.1%
Simplified90.1%
if -9.99999999999999969e-278 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.8%
associate-*l/4.8%
Simplified4.8%
Taylor expanded in z around -inf 100.0%
+-commutative100.0%
sub-neg100.0%
mul-1-neg100.0%
+-commutative100.0%
mul-1-neg100.0%
unsub-neg100.0%
+-commutative100.0%
mul-1-neg100.0%
sub-neg100.0%
distribute-rgt-out--100.0%
Simplified100.0%
if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 72.6%
associate-*l/87.8%
Simplified87.8%
*-commutative87.8%
clear-num87.7%
un-div-inv88.1%
Applied egg-rr88.1%
Final simplification89.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- t x) (- y z)) (- a z)))))
(if (<= t_1 -1e-277)
(- x (/ (- x t) (* (- a z) (/ 1.0 (- y z)))))
(if (<= t_1 0.0)
(+ t (/ (* (- t x) (- a y)) z))
(+ x (/ (- t x) (/ (- a z) (- y z))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((t - x) * (y - z)) / (a - z));
double tmp;
if (t_1 <= -1e-277) {
tmp = x - ((x - t) / ((a - z) * (1.0 / (y - z))));
} else if (t_1 <= 0.0) {
tmp = t + (((t - x) * (a - y)) / z);
} else {
tmp = x + ((t - x) / ((a - z) / (y - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = x + (((t - x) * (y - z)) / (a - z))
if (t_1 <= (-1d-277)) then
tmp = x - ((x - t) / ((a - z) * (1.0d0 / (y - z))))
else if (t_1 <= 0.0d0) then
tmp = t + (((t - x) * (a - y)) / z)
else
tmp = x + ((t - x) / ((a - z) / (y - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((t - x) * (y - z)) / (a - z));
double tmp;
if (t_1 <= -1e-277) {
tmp = x - ((x - t) / ((a - z) * (1.0 / (y - z))));
} else if (t_1 <= 0.0) {
tmp = t + (((t - x) * (a - y)) / z);
} else {
tmp = x + ((t - x) / ((a - z) / (y - z)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((t - x) * (y - z)) / (a - z)) tmp = 0 if t_1 <= -1e-277: tmp = x - ((x - t) / ((a - z) * (1.0 / (y - z)))) elif t_1 <= 0.0: tmp = t + (((t - x) * (a - y)) / z) else: tmp = x + ((t - x) / ((a - z) / (y - z))) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(t - x) * Float64(y - z)) / Float64(a - z))) tmp = 0.0 if (t_1 <= -1e-277) tmp = Float64(x - Float64(Float64(x - t) / Float64(Float64(a - z) * Float64(1.0 / Float64(y - z))))); elseif (t_1 <= 0.0) tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); else tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((t - x) * (y - z)) / (a - z)); tmp = 0.0; if (t_1 <= -1e-277) tmp = x - ((x - t) / ((a - z) * (1.0 / (y - z)))); elseif (t_1 <= 0.0) tmp = t + (((t - x) * (a - y)) / z); else tmp = x + ((t - x) / ((a - z) / (y - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(t - x), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-277], N[(x - N[(N[(x - t), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] * N[(1.0 / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{-277}:\\
\;\;\;\;x - \frac{x - t}{\left(a - z\right) \cdot \frac{1}{y - z}}\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -9.99999999999999969e-278Initial program 70.1%
associate-*l/90.1%
Simplified90.1%
*-commutative90.1%
clear-num90.0%
un-div-inv90.1%
Applied egg-rr90.1%
div-inv90.1%
Applied egg-rr90.1%
if -9.99999999999999969e-278 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.8%
associate-*l/4.8%
Simplified4.8%
Taylor expanded in z around -inf 100.0%
+-commutative100.0%
sub-neg100.0%
mul-1-neg100.0%
+-commutative100.0%
mul-1-neg100.0%
unsub-neg100.0%
+-commutative100.0%
mul-1-neg100.0%
sub-neg100.0%
distribute-rgt-out--100.0%
Simplified100.0%
if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 72.6%
associate-*l/87.8%
Simplified87.8%
*-commutative87.8%
clear-num87.7%
un-div-inv88.1%
Applied egg-rr88.1%
Final simplification89.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- t x) (- a z)))) (t_2 (- x (/ (- x t) (/ a y)))))
(if (<= z -7e+124)
(+ t (/ a (/ z (- t x))))
(if (<= z -1.55e-29)
t_1
(if (<= z -1.4e-115)
t_2
(if (<= z -1.9e-147)
t_1
(if (<= z 3e-282)
(+ x (/ (* y (- t x)) a))
(if (<= z 3.3e-53)
t_2
(if (<= z 9e+44) t_1 (* t (/ (- y z) (- a z))))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((t - x) / (a - z));
double t_2 = x - ((x - t) / (a / y));
double tmp;
if (z <= -7e+124) {
tmp = t + (a / (z / (t - x)));
} else if (z <= -1.55e-29) {
tmp = t_1;
} else if (z <= -1.4e-115) {
tmp = t_2;
} else if (z <= -1.9e-147) {
tmp = t_1;
} else if (z <= 3e-282) {
tmp = x + ((y * (t - x)) / a);
} else if (z <= 3.3e-53) {
tmp = t_2;
} else if (z <= 9e+44) {
tmp = t_1;
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y * ((t - x) / (a - z))
t_2 = x - ((x - t) / (a / y))
if (z <= (-7d+124)) then
tmp = t + (a / (z / (t - x)))
else if (z <= (-1.55d-29)) then
tmp = t_1
else if (z <= (-1.4d-115)) then
tmp = t_2
else if (z <= (-1.9d-147)) then
tmp = t_1
else if (z <= 3d-282) then
tmp = x + ((y * (t - x)) / a)
else if (z <= 3.3d-53) then
tmp = t_2
else if (z <= 9d+44) then
tmp = t_1
else
tmp = t * ((y - z) / (a - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((t - x) / (a - z));
double t_2 = x - ((x - t) / (a / y));
double tmp;
if (z <= -7e+124) {
tmp = t + (a / (z / (t - x)));
} else if (z <= -1.55e-29) {
tmp = t_1;
} else if (z <= -1.4e-115) {
tmp = t_2;
} else if (z <= -1.9e-147) {
tmp = t_1;
} else if (z <= 3e-282) {
tmp = x + ((y * (t - x)) / a);
} else if (z <= 3.3e-53) {
tmp = t_2;
} else if (z <= 9e+44) {
tmp = t_1;
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((t - x) / (a - z)) t_2 = x - ((x - t) / (a / y)) tmp = 0 if z <= -7e+124: tmp = t + (a / (z / (t - x))) elif z <= -1.55e-29: tmp = t_1 elif z <= -1.4e-115: tmp = t_2 elif z <= -1.9e-147: tmp = t_1 elif z <= 3e-282: tmp = x + ((y * (t - x)) / a) elif z <= 3.3e-53: tmp = t_2 elif z <= 9e+44: tmp = t_1 else: tmp = t * ((y - z) / (a - z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(t - x) / Float64(a - z))) t_2 = Float64(x - Float64(Float64(x - t) / Float64(a / y))) tmp = 0.0 if (z <= -7e+124) tmp = Float64(t + Float64(a / Float64(z / Float64(t - x)))); elseif (z <= -1.55e-29) tmp = t_1; elseif (z <= -1.4e-115) tmp = t_2; elseif (z <= -1.9e-147) tmp = t_1; elseif (z <= 3e-282) tmp = Float64(x + Float64(Float64(y * Float64(t - x)) / a)); elseif (z <= 3.3e-53) tmp = t_2; elseif (z <= 9e+44) tmp = t_1; else tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((t - x) / (a - z)); t_2 = x - ((x - t) / (a / y)); tmp = 0.0; if (z <= -7e+124) tmp = t + (a / (z / (t - x))); elseif (z <= -1.55e-29) tmp = t_1; elseif (z <= -1.4e-115) tmp = t_2; elseif (z <= -1.9e-147) tmp = t_1; elseif (z <= 3e-282) tmp = x + ((y * (t - x)) / a); elseif (z <= 3.3e-53) tmp = t_2; elseif (z <= 9e+44) tmp = t_1; else tmp = t * ((y - z) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(N[(x - t), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7e+124], N[(t + N[(a / N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.55e-29], t$95$1, If[LessEqual[z, -1.4e-115], t$95$2, If[LessEqual[z, -1.9e-147], t$95$1, If[LessEqual[z, 3e-282], N[(x + N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.3e-53], t$95$2, If[LessEqual[z, 9e+44], t$95$1, N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{t - x}{a - z}\\
t_2 := x - \frac{x - t}{\frac{a}{y}}\\
\mathbf{if}\;z \leq -7 \cdot 10^{+124}:\\
\;\;\;\;t + \frac{a}{\frac{z}{t - x}}\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{-29}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.4 \cdot 10^{-115}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{-147}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3 \cdot 10^{-282}:\\
\;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{-53}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 9 \cdot 10^{+44}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if z < -7.0000000000000002e124Initial program 37.2%
associate-*l/69.3%
Simplified69.3%
Taylor expanded in z around -inf 58.8%
+-commutative58.8%
sub-neg58.8%
mul-1-neg58.8%
+-commutative58.8%
mul-1-neg58.8%
unsub-neg58.8%
+-commutative58.8%
mul-1-neg58.8%
sub-neg58.8%
distribute-rgt-out--58.8%
Simplified58.8%
Taylor expanded in y around 0 59.4%
sub-neg59.4%
mul-1-neg59.4%
remove-double-neg59.4%
associate-/l*66.0%
Simplified66.0%
if -7.0000000000000002e124 < z < -1.55000000000000013e-29 or -1.39999999999999994e-115 < z < -1.90000000000000014e-147 or 3.30000000000000004e-53 < z < 9e44Initial program 74.3%
associate-*l/86.3%
Simplified86.3%
Taylor expanded in y around inf 66.7%
div-sub66.7%
*-commutative66.7%
Simplified66.7%
if -1.55000000000000013e-29 < z < -1.39999999999999994e-115 or 3.0000000000000001e-282 < z < 3.30000000000000004e-53Initial program 85.2%
associate-*l/95.8%
Simplified95.8%
*-commutative95.8%
clear-num95.6%
un-div-inv95.7%
Applied egg-rr95.7%
Taylor expanded in z around 0 79.2%
if -1.90000000000000014e-147 < z < 3.0000000000000001e-282Initial program 98.8%
associate-*l/90.9%
Simplified90.9%
*-commutative90.9%
clear-num90.8%
un-div-inv91.8%
Applied egg-rr91.8%
Taylor expanded in z around 0 89.6%
if 9e44 < z Initial program 30.2%
associate-*l/65.4%
Simplified65.4%
Taylor expanded in x around 0 35.5%
associate-*r/69.0%
Simplified69.0%
Final simplification74.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6.8e-16)
t
(if (<= z -6.4e-110)
x
(if (<= z 5.2e-279)
(/ (* t y) a)
(if (<= z 2.4e-150)
x
(if (<= z 7.5e-99)
(/ y (/ a t))
(if (<= z 2.1e-53) x (if (<= z 185000000.0) (/ (* y x) z) t))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.8e-16) {
tmp = t;
} else if (z <= -6.4e-110) {
tmp = x;
} else if (z <= 5.2e-279) {
tmp = (t * y) / a;
} else if (z <= 2.4e-150) {
tmp = x;
} else if (z <= 7.5e-99) {
tmp = y / (a / t);
} else if (z <= 2.1e-53) {
tmp = x;
} else if (z <= 185000000.0) {
tmp = (y * x) / z;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if (z <= (-6.8d-16)) then
tmp = t
else if (z <= (-6.4d-110)) then
tmp = x
else if (z <= 5.2d-279) then
tmp = (t * y) / a
else if (z <= 2.4d-150) then
tmp = x
else if (z <= 7.5d-99) then
tmp = y / (a / t)
else if (z <= 2.1d-53) then
tmp = x
else if (z <= 185000000.0d0) then
tmp = (y * x) / z
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.8e-16) {
tmp = t;
} else if (z <= -6.4e-110) {
tmp = x;
} else if (z <= 5.2e-279) {
tmp = (t * y) / a;
} else if (z <= 2.4e-150) {
tmp = x;
} else if (z <= 7.5e-99) {
tmp = y / (a / t);
} else if (z <= 2.1e-53) {
tmp = x;
} else if (z <= 185000000.0) {
tmp = (y * x) / z;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.8e-16: tmp = t elif z <= -6.4e-110: tmp = x elif z <= 5.2e-279: tmp = (t * y) / a elif z <= 2.4e-150: tmp = x elif z <= 7.5e-99: tmp = y / (a / t) elif z <= 2.1e-53: tmp = x elif z <= 185000000.0: tmp = (y * x) / z else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.8e-16) tmp = t; elseif (z <= -6.4e-110) tmp = x; elseif (z <= 5.2e-279) tmp = Float64(Float64(t * y) / a); elseif (z <= 2.4e-150) tmp = x; elseif (z <= 7.5e-99) tmp = Float64(y / Float64(a / t)); elseif (z <= 2.1e-53) tmp = x; elseif (z <= 185000000.0) tmp = Float64(Float64(y * x) / z); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.8e-16) tmp = t; elseif (z <= -6.4e-110) tmp = x; elseif (z <= 5.2e-279) tmp = (t * y) / a; elseif (z <= 2.4e-150) tmp = x; elseif (z <= 7.5e-99) tmp = y / (a / t); elseif (z <= 2.1e-53) tmp = x; elseif (z <= 185000000.0) tmp = (y * x) / z; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.8e-16], t, If[LessEqual[z, -6.4e-110], x, If[LessEqual[z, 5.2e-279], N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 2.4e-150], x, If[LessEqual[z, 7.5e-99], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e-53], x, If[LessEqual[z, 185000000.0], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], t]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{-16}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -6.4 \cdot 10^{-110}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-279}:\\
\;\;\;\;\frac{t \cdot y}{a}\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-150}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{-99}:\\
\;\;\;\;\frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-53}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 185000000:\\
\;\;\;\;\frac{y \cdot x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -6.8e-16 or 1.85e8 < z Initial program 40.9%
associate-*l/70.8%
Simplified70.8%
Taylor expanded in z around inf 44.9%
if -6.8e-16 < z < -6.40000000000000056e-110 or 5.2000000000000004e-279 < z < 2.4e-150 or 7.4999999999999999e-99 < z < 2.09999999999999977e-53Initial program 84.9%
associate-*l/96.7%
Simplified96.7%
Taylor expanded in a around inf 54.3%
if -6.40000000000000056e-110 < z < 5.2000000000000004e-279Initial program 97.2%
associate-*l/90.6%
Simplified90.6%
Taylor expanded in x around 0 48.3%
Taylor expanded in z around 0 38.1%
if 2.4e-150 < z < 7.4999999999999999e-99Initial program 86.5%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in x around 0 45.3%
Taylor expanded in z around 0 45.2%
associate-/l*58.5%
Simplified58.5%
if 2.09999999999999977e-53 < z < 1.85e8Initial program 86.2%
associate-*l/86.3%
Simplified86.3%
Taylor expanded in a around 0 58.2%
+-commutative58.2%
mul-1-neg58.2%
unsub-neg58.2%
associate-/l*58.1%
Simplified58.1%
Taylor expanded in x around -inf 39.8%
Final simplification45.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* t y) a)))
(t_2 (* y (/ (- t x) (- a z))))
(t_3 (* t (/ (- y z) (- a z)))))
(if (<= y -9.2e-58)
t_2
(if (<= y -9e-250)
t_1
(if (<= y 3e-283)
t_3
(if (<= y 1.05e-206) t_1 (if (<= y 2.12e+55) t_3 t_2)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t * y) / a);
double t_2 = y * ((t - x) / (a - z));
double t_3 = t * ((y - z) / (a - z));
double tmp;
if (y <= -9.2e-58) {
tmp = t_2;
} else if (y <= -9e-250) {
tmp = t_1;
} else if (y <= 3e-283) {
tmp = t_3;
} else if (y <= 1.05e-206) {
tmp = t_1;
} else if (y <= 2.12e+55) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = x + ((t * y) / a)
t_2 = y * ((t - x) / (a - z))
t_3 = t * ((y - z) / (a - z))
if (y <= (-9.2d-58)) then
tmp = t_2
else if (y <= (-9d-250)) then
tmp = t_1
else if (y <= 3d-283) then
tmp = t_3
else if (y <= 1.05d-206) then
tmp = t_1
else if (y <= 2.12d+55) 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 a) {
double t_1 = x + ((t * y) / a);
double t_2 = y * ((t - x) / (a - z));
double t_3 = t * ((y - z) / (a - z));
double tmp;
if (y <= -9.2e-58) {
tmp = t_2;
} else if (y <= -9e-250) {
tmp = t_1;
} else if (y <= 3e-283) {
tmp = t_3;
} else if (y <= 1.05e-206) {
tmp = t_1;
} else if (y <= 2.12e+55) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((t * y) / a) t_2 = y * ((t - x) / (a - z)) t_3 = t * ((y - z) / (a - z)) tmp = 0 if y <= -9.2e-58: tmp = t_2 elif y <= -9e-250: tmp = t_1 elif y <= 3e-283: tmp = t_3 elif y <= 1.05e-206: tmp = t_1 elif y <= 2.12e+55: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(t * y) / a)) t_2 = Float64(y * Float64(Float64(t - x) / Float64(a - z))) t_3 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) tmp = 0.0 if (y <= -9.2e-58) tmp = t_2; elseif (y <= -9e-250) tmp = t_1; elseif (y <= 3e-283) tmp = t_3; elseif (y <= 1.05e-206) tmp = t_1; elseif (y <= 2.12e+55) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((t * y) / a); t_2 = y * ((t - x) / (a - z)); t_3 = t * ((y - z) / (a - z)); tmp = 0.0; if (y <= -9.2e-58) tmp = t_2; elseif (y <= -9e-250) tmp = t_1; elseif (y <= 3e-283) tmp = t_3; elseif (y <= 1.05e-206) tmp = t_1; elseif (y <= 2.12e+55) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9.2e-58], t$95$2, If[LessEqual[y, -9e-250], t$95$1, If[LessEqual[y, 3e-283], t$95$3, If[LessEqual[y, 1.05e-206], t$95$1, If[LessEqual[y, 2.12e+55], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{t \cdot y}{a}\\
t_2 := y \cdot \frac{t - x}{a - z}\\
t_3 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;y \leq -9.2 \cdot 10^{-58}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -9 \cdot 10^{-250}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3 \cdot 10^{-283}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{-206}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.12 \cdot 10^{+55}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -9.1999999999999995e-58 or 2.12000000000000007e55 < y Initial program 68.0%
associate-*l/88.7%
Simplified88.7%
Taylor expanded in y around inf 74.6%
div-sub75.3%
*-commutative75.3%
Simplified75.3%
if -9.1999999999999995e-58 < y < -8.99999999999999987e-250 or 2.99999999999999996e-283 < y < 1.05000000000000005e-206Initial program 71.5%
associate-*l/76.9%
Simplified76.9%
*-commutative76.9%
clear-num76.8%
un-div-inv76.8%
Applied egg-rr76.8%
Taylor expanded in z around 0 59.0%
Taylor expanded in t around inf 57.3%
if -8.99999999999999987e-250 < y < 2.99999999999999996e-283 or 1.05000000000000005e-206 < y < 2.12000000000000007e55Initial program 56.4%
associate-*l/71.4%
Simplified71.4%
Taylor expanded in x around 0 48.9%
associate-*r/67.2%
Simplified67.2%
Final simplification69.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* t y) a))) (t_2 (* t (- 1.0 (/ y z)))))
(if (<= z -4.6e-16)
t_2
(if (<= z 1.6e-306)
t_1
(if (<= z 9.5e-151)
(* x (- 1.0 (/ y a)))
(if (<= z 1.4e-14)
t_1
(if (<= z 2700000000.0) (/ (* y x) z) t_2)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t * y) / a);
double t_2 = t * (1.0 - (y / z));
double tmp;
if (z <= -4.6e-16) {
tmp = t_2;
} else if (z <= 1.6e-306) {
tmp = t_1;
} else if (z <= 9.5e-151) {
tmp = x * (1.0 - (y / a));
} else if (z <= 1.4e-14) {
tmp = t_1;
} else if (z <= 2700000000.0) {
tmp = (y * x) / z;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((t * y) / a)
t_2 = t * (1.0d0 - (y / z))
if (z <= (-4.6d-16)) then
tmp = t_2
else if (z <= 1.6d-306) then
tmp = t_1
else if (z <= 9.5d-151) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 1.4d-14) then
tmp = t_1
else if (z <= 2700000000.0d0) then
tmp = (y * x) / z
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 t_1 = x + ((t * y) / a);
double t_2 = t * (1.0 - (y / z));
double tmp;
if (z <= -4.6e-16) {
tmp = t_2;
} else if (z <= 1.6e-306) {
tmp = t_1;
} else if (z <= 9.5e-151) {
tmp = x * (1.0 - (y / a));
} else if (z <= 1.4e-14) {
tmp = t_1;
} else if (z <= 2700000000.0) {
tmp = (y * x) / z;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((t * y) / a) t_2 = t * (1.0 - (y / z)) tmp = 0 if z <= -4.6e-16: tmp = t_2 elif z <= 1.6e-306: tmp = t_1 elif z <= 9.5e-151: tmp = x * (1.0 - (y / a)) elif z <= 1.4e-14: tmp = t_1 elif z <= 2700000000.0: tmp = (y * x) / z else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(t * y) / a)) t_2 = Float64(t * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -4.6e-16) tmp = t_2; elseif (z <= 1.6e-306) tmp = t_1; elseif (z <= 9.5e-151) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 1.4e-14) tmp = t_1; elseif (z <= 2700000000.0) tmp = Float64(Float64(y * x) / z); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((t * y) / a); t_2 = t * (1.0 - (y / z)); tmp = 0.0; if (z <= -4.6e-16) tmp = t_2; elseif (z <= 1.6e-306) tmp = t_1; elseif (z <= 9.5e-151) tmp = x * (1.0 - (y / a)); elseif (z <= 1.4e-14) tmp = t_1; elseif (z <= 2700000000.0) tmp = (y * x) / z; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.6e-16], t$95$2, If[LessEqual[z, 1.6e-306], t$95$1, If[LessEqual[z, 9.5e-151], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4e-14], t$95$1, If[LessEqual[z, 2700000000.0], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{t \cdot y}{a}\\
t_2 := t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -4.6 \cdot 10^{-16}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-306}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{-151}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-14}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2700000000:\\
\;\;\;\;\frac{y \cdot x}{z}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -4.5999999999999998e-16 or 2.7e9 < z Initial program 40.9%
associate-*l/70.8%
Simplified70.8%
Taylor expanded in a around 0 29.3%
+-commutative29.3%
mul-1-neg29.3%
unsub-neg29.3%
associate-/l*47.3%
Simplified47.3%
Taylor expanded in t around inf 55.6%
if -4.5999999999999998e-16 < z < 1.59999999999999985e-306 or 9.4999999999999996e-151 < z < 1.4e-14Initial program 89.5%
associate-*l/92.2%
Simplified92.2%
*-commutative92.2%
clear-num92.1%
un-div-inv92.6%
Applied egg-rr92.6%
Taylor expanded in z around 0 68.3%
Taylor expanded in t around inf 63.6%
if 1.59999999999999985e-306 < z < 9.4999999999999996e-151Initial program 96.0%
associate-*l/99.8%
Simplified99.8%
*-commutative99.8%
clear-num99.6%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in z around 0 88.4%
Taylor expanded in x around inf 80.9%
*-commutative80.9%
mul-1-neg80.9%
unsub-neg80.9%
Simplified80.9%
if 1.4e-14 < z < 2.7e9Initial program 80.9%
associate-*l/81.2%
Simplified81.2%
Taylor expanded in a around 0 80.9%
+-commutative80.9%
mul-1-neg80.9%
unsub-neg80.9%
associate-/l*80.9%
Simplified80.9%
Taylor expanded in x around -inf 85.7%
Final simplification61.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* t y) a))) (t_2 (* t (- 1.0 (/ y z)))))
(if (<= z -2.35e-14)
t_2
(if (<= z 6.2e-307)
t_1
(if (<= z 1.25e-151)
(* x (- 1.0 (/ y a)))
(if (<= z 2.9e-14)
t_1
(if (<= z 18000.0) (* x (/ (- y a) z)) t_2)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t * y) / a);
double t_2 = t * (1.0 - (y / z));
double tmp;
if (z <= -2.35e-14) {
tmp = t_2;
} else if (z <= 6.2e-307) {
tmp = t_1;
} else if (z <= 1.25e-151) {
tmp = x * (1.0 - (y / a));
} else if (z <= 2.9e-14) {
tmp = t_1;
} else if (z <= 18000.0) {
tmp = x * ((y - a) / z);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((t * y) / a)
t_2 = t * (1.0d0 - (y / z))
if (z <= (-2.35d-14)) then
tmp = t_2
else if (z <= 6.2d-307) then
tmp = t_1
else if (z <= 1.25d-151) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 2.9d-14) then
tmp = t_1
else if (z <= 18000.0d0) then
tmp = x * ((y - a) / z)
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 t_1 = x + ((t * y) / a);
double t_2 = t * (1.0 - (y / z));
double tmp;
if (z <= -2.35e-14) {
tmp = t_2;
} else if (z <= 6.2e-307) {
tmp = t_1;
} else if (z <= 1.25e-151) {
tmp = x * (1.0 - (y / a));
} else if (z <= 2.9e-14) {
tmp = t_1;
} else if (z <= 18000.0) {
tmp = x * ((y - a) / z);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((t * y) / a) t_2 = t * (1.0 - (y / z)) tmp = 0 if z <= -2.35e-14: tmp = t_2 elif z <= 6.2e-307: tmp = t_1 elif z <= 1.25e-151: tmp = x * (1.0 - (y / a)) elif z <= 2.9e-14: tmp = t_1 elif z <= 18000.0: tmp = x * ((y - a) / z) else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(t * y) / a)) t_2 = Float64(t * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -2.35e-14) tmp = t_2; elseif (z <= 6.2e-307) tmp = t_1; elseif (z <= 1.25e-151) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 2.9e-14) tmp = t_1; elseif (z <= 18000.0) tmp = Float64(x * Float64(Float64(y - a) / z)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((t * y) / a); t_2 = t * (1.0 - (y / z)); tmp = 0.0; if (z <= -2.35e-14) tmp = t_2; elseif (z <= 6.2e-307) tmp = t_1; elseif (z <= 1.25e-151) tmp = x * (1.0 - (y / a)); elseif (z <= 2.9e-14) tmp = t_1; elseif (z <= 18000.0) tmp = x * ((y - a) / z); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.35e-14], t$95$2, If[LessEqual[z, 6.2e-307], t$95$1, If[LessEqual[z, 1.25e-151], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.9e-14], t$95$1, If[LessEqual[z, 18000.0], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{t \cdot y}{a}\\
t_2 := t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -2.35 \cdot 10^{-14}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-307}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-151}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{-14}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 18000:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -2.3500000000000001e-14 or 18000 < z Initial program 40.9%
associate-*l/70.8%
Simplified70.8%
Taylor expanded in a around 0 29.3%
+-commutative29.3%
mul-1-neg29.3%
unsub-neg29.3%
associate-/l*47.3%
Simplified47.3%
Taylor expanded in t around inf 55.6%
if -2.3500000000000001e-14 < z < 6.1999999999999996e-307 or 1.25000000000000001e-151 < z < 2.9000000000000003e-14Initial program 89.5%
associate-*l/92.2%
Simplified92.2%
*-commutative92.2%
clear-num92.1%
un-div-inv92.6%
Applied egg-rr92.6%
Taylor expanded in z around 0 68.3%
Taylor expanded in t around inf 63.6%
if 6.1999999999999996e-307 < z < 1.25000000000000001e-151Initial program 96.0%
associate-*l/99.8%
Simplified99.8%
*-commutative99.8%
clear-num99.6%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in z around 0 88.4%
Taylor expanded in x around inf 80.9%
*-commutative80.9%
mul-1-neg80.9%
unsub-neg80.9%
Simplified80.9%
if 2.9000000000000003e-14 < z < 18000Initial program 80.9%
associate-*l/81.2%
Simplified81.2%
Taylor expanded in z around -inf 99.7%
+-commutative99.7%
sub-neg99.7%
mul-1-neg99.7%
+-commutative99.7%
mul-1-neg99.7%
unsub-neg99.7%
+-commutative99.7%
mul-1-neg99.7%
sub-neg99.7%
distribute-rgt-out--99.7%
Simplified99.7%
Taylor expanded in x around -inf 86.0%
div-sub86.0%
associate-*r*86.0%
mul-1-neg86.0%
Simplified86.0%
Final simplification61.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- t x) (- a z)))))
(if (<= z -1.4e+130)
(+ t (/ a (/ z (- t x))))
(if (<= z -4.2e-33)
t_1
(if (<= z 1.45e-48)
(+ x (/ y (/ a (- t x))))
(if (<= z 1.8e+30) t_1 (* t (/ (- y z) (- a z)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((t - x) / (a - z));
double tmp;
if (z <= -1.4e+130) {
tmp = t + (a / (z / (t - x)));
} else if (z <= -4.2e-33) {
tmp = t_1;
} else if (z <= 1.45e-48) {
tmp = x + (y / (a / (t - x)));
} else if (z <= 1.8e+30) {
tmp = t_1;
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = y * ((t - x) / (a - z))
if (z <= (-1.4d+130)) then
tmp = t + (a / (z / (t - x)))
else if (z <= (-4.2d-33)) then
tmp = t_1
else if (z <= 1.45d-48) then
tmp = x + (y / (a / (t - x)))
else if (z <= 1.8d+30) then
tmp = t_1
else
tmp = t * ((y - z) / (a - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((t - x) / (a - z));
double tmp;
if (z <= -1.4e+130) {
tmp = t + (a / (z / (t - x)));
} else if (z <= -4.2e-33) {
tmp = t_1;
} else if (z <= 1.45e-48) {
tmp = x + (y / (a / (t - x)));
} else if (z <= 1.8e+30) {
tmp = t_1;
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((t - x) / (a - z)) tmp = 0 if z <= -1.4e+130: tmp = t + (a / (z / (t - x))) elif z <= -4.2e-33: tmp = t_1 elif z <= 1.45e-48: tmp = x + (y / (a / (t - x))) elif z <= 1.8e+30: tmp = t_1 else: tmp = t * ((y - z) / (a - z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(t - x) / Float64(a - z))) tmp = 0.0 if (z <= -1.4e+130) tmp = Float64(t + Float64(a / Float64(z / Float64(t - x)))); elseif (z <= -4.2e-33) tmp = t_1; elseif (z <= 1.45e-48) tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); elseif (z <= 1.8e+30) tmp = t_1; else tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((t - x) / (a - z)); tmp = 0.0; if (z <= -1.4e+130) tmp = t + (a / (z / (t - x))); elseif (z <= -4.2e-33) tmp = t_1; elseif (z <= 1.45e-48) tmp = x + (y / (a / (t - x))); elseif (z <= 1.8e+30) tmp = t_1; else tmp = t * ((y - z) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.4e+130], N[(t + N[(a / N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.2e-33], t$95$1, If[LessEqual[z, 1.45e-48], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.8e+30], t$95$1, N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;z \leq -1.4 \cdot 10^{+130}:\\
\;\;\;\;t + \frac{a}{\frac{z}{t - x}}\\
\mathbf{elif}\;z \leq -4.2 \cdot 10^{-33}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-48}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+30}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if z < -1.3999999999999999e130Initial program 37.2%
associate-*l/69.3%
Simplified69.3%
Taylor expanded in z around -inf 58.8%
+-commutative58.8%
sub-neg58.8%
mul-1-neg58.8%
+-commutative58.8%
mul-1-neg58.8%
unsub-neg58.8%
+-commutative58.8%
mul-1-neg58.8%
sub-neg58.8%
distribute-rgt-out--58.8%
Simplified58.8%
Taylor expanded in y around 0 59.4%
sub-neg59.4%
mul-1-neg59.4%
remove-double-neg59.4%
associate-/l*66.0%
Simplified66.0%
if -1.3999999999999999e130 < z < -4.2e-33 or 1.4500000000000001e-48 < z < 1.8000000000000001e30Initial program 70.5%
associate-*l/84.3%
Simplified84.3%
Taylor expanded in y around inf 65.9%
div-sub65.9%
*-commutative65.9%
Simplified65.9%
if -4.2e-33 < z < 1.4500000000000001e-48Initial program 91.6%
associate-*l/94.0%
Simplified94.0%
Taylor expanded in z around 0 74.9%
+-commutative74.9%
associate-/l*76.9%
Simplified76.9%
if 1.8000000000000001e30 < z Initial program 30.2%
associate-*l/65.4%
Simplified65.4%
Taylor expanded in x around 0 35.5%
associate-*r/69.0%
Simplified69.0%
Final simplification71.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- t x) (- a z)))))
(if (<= z -2.8e+122)
(+ t (/ a (/ z (- t x))))
(if (<= z -2.5e-30)
t_1
(if (<= z 1.3e-52)
(- x (/ (- x t) (/ a y)))
(if (<= z 7.5e+43) t_1 (* t (/ (- y z) (- a z)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((t - x) / (a - z));
double tmp;
if (z <= -2.8e+122) {
tmp = t + (a / (z / (t - x)));
} else if (z <= -2.5e-30) {
tmp = t_1;
} else if (z <= 1.3e-52) {
tmp = x - ((x - t) / (a / y));
} else if (z <= 7.5e+43) {
tmp = t_1;
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = y * ((t - x) / (a - z))
if (z <= (-2.8d+122)) then
tmp = t + (a / (z / (t - x)))
else if (z <= (-2.5d-30)) then
tmp = t_1
else if (z <= 1.3d-52) then
tmp = x - ((x - t) / (a / y))
else if (z <= 7.5d+43) then
tmp = t_1
else
tmp = t * ((y - z) / (a - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((t - x) / (a - z));
double tmp;
if (z <= -2.8e+122) {
tmp = t + (a / (z / (t - x)));
} else if (z <= -2.5e-30) {
tmp = t_1;
} else if (z <= 1.3e-52) {
tmp = x - ((x - t) / (a / y));
} else if (z <= 7.5e+43) {
tmp = t_1;
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((t - x) / (a - z)) tmp = 0 if z <= -2.8e+122: tmp = t + (a / (z / (t - x))) elif z <= -2.5e-30: tmp = t_1 elif z <= 1.3e-52: tmp = x - ((x - t) / (a / y)) elif z <= 7.5e+43: tmp = t_1 else: tmp = t * ((y - z) / (a - z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(t - x) / Float64(a - z))) tmp = 0.0 if (z <= -2.8e+122) tmp = Float64(t + Float64(a / Float64(z / Float64(t - x)))); elseif (z <= -2.5e-30) tmp = t_1; elseif (z <= 1.3e-52) tmp = Float64(x - Float64(Float64(x - t) / Float64(a / y))); elseif (z <= 7.5e+43) tmp = t_1; else tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((t - x) / (a - z)); tmp = 0.0; if (z <= -2.8e+122) tmp = t + (a / (z / (t - x))); elseif (z <= -2.5e-30) tmp = t_1; elseif (z <= 1.3e-52) tmp = x - ((x - t) / (a / y)); elseif (z <= 7.5e+43) tmp = t_1; else tmp = t * ((y - z) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.8e+122], N[(t + N[(a / N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.5e-30], t$95$1, If[LessEqual[z, 1.3e-52], N[(x - N[(N[(x - t), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e+43], t$95$1, N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;z \leq -2.8 \cdot 10^{+122}:\\
\;\;\;\;t + \frac{a}{\frac{z}{t - x}}\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{-30}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-52}:\\
\;\;\;\;x - \frac{x - t}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{+43}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if z < -2.8e122Initial program 37.2%
associate-*l/69.3%
Simplified69.3%
Taylor expanded in z around -inf 58.8%
+-commutative58.8%
sub-neg58.8%
mul-1-neg58.8%
+-commutative58.8%
mul-1-neg58.8%
unsub-neg58.8%
+-commutative58.8%
mul-1-neg58.8%
sub-neg58.8%
distribute-rgt-out--58.8%
Simplified58.8%
Taylor expanded in y around 0 59.4%
sub-neg59.4%
mul-1-neg59.4%
remove-double-neg59.4%
associate-/l*66.0%
Simplified66.0%
if -2.8e122 < z < -2.49999999999999986e-30 or 1.2999999999999999e-52 < z < 7.49999999999999967e43Initial program 70.5%
associate-*l/84.3%
Simplified84.3%
Taylor expanded in y around inf 65.9%
div-sub65.9%
*-commutative65.9%
Simplified65.9%
if -2.49999999999999986e-30 < z < 1.2999999999999999e-52Initial program 91.6%
associate-*l/94.0%
Simplified94.0%
*-commutative94.0%
clear-num93.9%
un-div-inv94.4%
Applied egg-rr94.4%
Taylor expanded in z around 0 78.4%
if 7.49999999999999967e43 < z Initial program 30.2%
associate-*l/65.4%
Simplified65.4%
Taylor expanded in x around 0 35.5%
associate-*r/69.0%
Simplified69.0%
Final simplification72.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ y a))))
(if (<= z -1.95e-14)
t
(if (<= z -4.9e-71)
x
(if (<= z 6.5e-279)
t_1
(if (<= z 2.45e-149)
x
(if (<= z 3e-96) t_1 (if (<= z 3e-18) x t))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (y / a);
double tmp;
if (z <= -1.95e-14) {
tmp = t;
} else if (z <= -4.9e-71) {
tmp = x;
} else if (z <= 6.5e-279) {
tmp = t_1;
} else if (z <= 2.45e-149) {
tmp = x;
} else if (z <= 3e-96) {
tmp = t_1;
} else if (z <= 3e-18) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = t * (y / a)
if (z <= (-1.95d-14)) then
tmp = t
else if (z <= (-4.9d-71)) then
tmp = x
else if (z <= 6.5d-279) then
tmp = t_1
else if (z <= 2.45d-149) then
tmp = x
else if (z <= 3d-96) then
tmp = t_1
else if (z <= 3d-18) then
tmp = x
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * (y / a);
double tmp;
if (z <= -1.95e-14) {
tmp = t;
} else if (z <= -4.9e-71) {
tmp = x;
} else if (z <= 6.5e-279) {
tmp = t_1;
} else if (z <= 2.45e-149) {
tmp = x;
} else if (z <= 3e-96) {
tmp = t_1;
} else if (z <= 3e-18) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (y / a) tmp = 0 if z <= -1.95e-14: tmp = t elif z <= -4.9e-71: tmp = x elif z <= 6.5e-279: tmp = t_1 elif z <= 2.45e-149: tmp = x elif z <= 3e-96: tmp = t_1 elif z <= 3e-18: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(y / a)) tmp = 0.0 if (z <= -1.95e-14) tmp = t; elseif (z <= -4.9e-71) tmp = x; elseif (z <= 6.5e-279) tmp = t_1; elseif (z <= 2.45e-149) tmp = x; elseif (z <= 3e-96) tmp = t_1; elseif (z <= 3e-18) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (y / a); tmp = 0.0; if (z <= -1.95e-14) tmp = t; elseif (z <= -4.9e-71) tmp = x; elseif (z <= 6.5e-279) tmp = t_1; elseif (z <= 2.45e-149) tmp = x; elseif (z <= 3e-96) tmp = t_1; elseif (z <= 3e-18) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.95e-14], t, If[LessEqual[z, -4.9e-71], x, If[LessEqual[z, 6.5e-279], t$95$1, If[LessEqual[z, 2.45e-149], x, If[LessEqual[z, 3e-96], t$95$1, If[LessEqual[z, 3e-18], x, t]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{a}\\
\mathbf{if}\;z \leq -1.95 \cdot 10^{-14}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -4.9 \cdot 10^{-71}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-279}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{-149}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3 \cdot 10^{-96}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3 \cdot 10^{-18}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.9499999999999999e-14 or 2.99999999999999983e-18 < z Initial program 42.8%
associate-*l/71.4%
Simplified71.4%
Taylor expanded in z around inf 43.1%
if -1.9499999999999999e-14 < z < -4.8999999999999997e-71 or 6.4999999999999997e-279 < z < 2.4500000000000002e-149 or 3e-96 < z < 2.99999999999999983e-18Initial program 86.3%
associate-*l/95.8%
Simplified95.8%
Taylor expanded in a around inf 49.3%
if -4.8999999999999997e-71 < z < 6.4999999999999997e-279 or 2.4500000000000002e-149 < z < 3e-96Initial program 93.5%
associate-*l/92.4%
Simplified92.4%
Taylor expanded in x around 0 46.1%
Taylor expanded in z around 0 37.4%
associate-/l*41.0%
Simplified41.0%
associate-/r/39.9%
Applied egg-rr39.9%
Final simplification43.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ y (/ a t))))
(if (<= z -3.4e-15)
t
(if (<= z -6.8e-108)
x
(if (<= z 8e-282)
t_1
(if (<= z 1.7e-149)
x
(if (<= z 4e-102) t_1 (if (<= z 2.9e-15) x t))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y / (a / t);
double tmp;
if (z <= -3.4e-15) {
tmp = t;
} else if (z <= -6.8e-108) {
tmp = x;
} else if (z <= 8e-282) {
tmp = t_1;
} else if (z <= 1.7e-149) {
tmp = x;
} else if (z <= 4e-102) {
tmp = t_1;
} else if (z <= 2.9e-15) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = y / (a / t)
if (z <= (-3.4d-15)) then
tmp = t
else if (z <= (-6.8d-108)) then
tmp = x
else if (z <= 8d-282) then
tmp = t_1
else if (z <= 1.7d-149) then
tmp = x
else if (z <= 4d-102) then
tmp = t_1
else if (z <= 2.9d-15) then
tmp = x
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y / (a / t);
double tmp;
if (z <= -3.4e-15) {
tmp = t;
} else if (z <= -6.8e-108) {
tmp = x;
} else if (z <= 8e-282) {
tmp = t_1;
} else if (z <= 1.7e-149) {
tmp = x;
} else if (z <= 4e-102) {
tmp = t_1;
} else if (z <= 2.9e-15) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y / (a / t) tmp = 0 if z <= -3.4e-15: tmp = t elif z <= -6.8e-108: tmp = x elif z <= 8e-282: tmp = t_1 elif z <= 1.7e-149: tmp = x elif z <= 4e-102: tmp = t_1 elif z <= 2.9e-15: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) t_1 = Float64(y / Float64(a / t)) tmp = 0.0 if (z <= -3.4e-15) tmp = t; elseif (z <= -6.8e-108) tmp = x; elseif (z <= 8e-282) tmp = t_1; elseif (z <= 1.7e-149) tmp = x; elseif (z <= 4e-102) tmp = t_1; elseif (z <= 2.9e-15) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y / (a / t); tmp = 0.0; if (z <= -3.4e-15) tmp = t; elseif (z <= -6.8e-108) tmp = x; elseif (z <= 8e-282) tmp = t_1; elseif (z <= 1.7e-149) tmp = x; elseif (z <= 4e-102) tmp = t_1; elseif (z <= 2.9e-15) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.4e-15], t, If[LessEqual[z, -6.8e-108], x, If[LessEqual[z, 8e-282], t$95$1, If[LessEqual[z, 1.7e-149], x, If[LessEqual[z, 4e-102], t$95$1, If[LessEqual[z, 2.9e-15], x, t]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{\frac{a}{t}}\\
\mathbf{if}\;z \leq -3.4 \cdot 10^{-15}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -6.8 \cdot 10^{-108}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 8 \cdot 10^{-282}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-149}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-102}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{-15}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.4e-15 or 2.90000000000000019e-15 < z Initial program 42.8%
associate-*l/71.4%
Simplified71.4%
Taylor expanded in z around inf 43.1%
if -3.4e-15 < z < -6.80000000000000004e-108 or 8.0000000000000001e-282 < z < 1.6999999999999999e-149 or 3.99999999999999973e-102 < z < 2.90000000000000019e-15Initial program 85.3%
associate-*l/95.4%
Simplified95.4%
Taylor expanded in a around inf 48.6%
if -6.80000000000000004e-108 < z < 8.0000000000000001e-282 or 1.6999999999999999e-149 < z < 3.99999999999999973e-102Initial program 95.1%
associate-*l/92.4%
Simplified92.4%
Taylor expanded in x around 0 47.7%
Taylor expanded in z around 0 39.5%
associate-/l*42.1%
Simplified42.1%
Final simplification44.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.25e-14)
t
(if (<= z -6e-110)
x
(if (<= z 1.55e-277)
(/ (* t y) a)
(if (<= z 1.4e-150)
x
(if (<= z 1.8e-99) (/ y (/ a t)) (if (<= z 2.15e-15) x t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.25e-14) {
tmp = t;
} else if (z <= -6e-110) {
tmp = x;
} else if (z <= 1.55e-277) {
tmp = (t * y) / a;
} else if (z <= 1.4e-150) {
tmp = x;
} else if (z <= 1.8e-99) {
tmp = y / (a / t);
} else if (z <= 2.15e-15) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if (z <= (-2.25d-14)) then
tmp = t
else if (z <= (-6d-110)) then
tmp = x
else if (z <= 1.55d-277) then
tmp = (t * y) / a
else if (z <= 1.4d-150) then
tmp = x
else if (z <= 1.8d-99) then
tmp = y / (a / t)
else if (z <= 2.15d-15) then
tmp = x
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.25e-14) {
tmp = t;
} else if (z <= -6e-110) {
tmp = x;
} else if (z <= 1.55e-277) {
tmp = (t * y) / a;
} else if (z <= 1.4e-150) {
tmp = x;
} else if (z <= 1.8e-99) {
tmp = y / (a / t);
} else if (z <= 2.15e-15) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.25e-14: tmp = t elif z <= -6e-110: tmp = x elif z <= 1.55e-277: tmp = (t * y) / a elif z <= 1.4e-150: tmp = x elif z <= 1.8e-99: tmp = y / (a / t) elif z <= 2.15e-15: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.25e-14) tmp = t; elseif (z <= -6e-110) tmp = x; elseif (z <= 1.55e-277) tmp = Float64(Float64(t * y) / a); elseif (z <= 1.4e-150) tmp = x; elseif (z <= 1.8e-99) tmp = Float64(y / Float64(a / t)); elseif (z <= 2.15e-15) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.25e-14) tmp = t; elseif (z <= -6e-110) tmp = x; elseif (z <= 1.55e-277) tmp = (t * y) / a; elseif (z <= 1.4e-150) tmp = x; elseif (z <= 1.8e-99) tmp = y / (a / t); elseif (z <= 2.15e-15) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.25e-14], t, If[LessEqual[z, -6e-110], x, If[LessEqual[z, 1.55e-277], N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 1.4e-150], x, If[LessEqual[z, 1.8e-99], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.15e-15], x, t]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.25 \cdot 10^{-14}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -6 \cdot 10^{-110}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-277}:\\
\;\;\;\;\frac{t \cdot y}{a}\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-150}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-99}:\\
\;\;\;\;\frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{-15}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -2.2499999999999999e-14 or 2.1499999999999998e-15 < z Initial program 42.8%
associate-*l/71.4%
Simplified71.4%
Taylor expanded in z around inf 43.1%
if -2.2499999999999999e-14 < z < -5.99999999999999972e-110 or 1.5499999999999999e-277 < z < 1.39999999999999998e-150 or 1.8e-99 < z < 2.1499999999999998e-15Initial program 85.3%
associate-*l/95.4%
Simplified95.4%
Taylor expanded in a around inf 48.6%
if -5.99999999999999972e-110 < z < 1.5499999999999999e-277Initial program 97.2%
associate-*l/90.6%
Simplified90.6%
Taylor expanded in x around 0 48.3%
Taylor expanded in z around 0 38.1%
if 1.39999999999999998e-150 < z < 1.8e-99Initial program 86.5%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in x around 0 45.3%
Taylor expanded in z around 0 45.2%
associate-/l*58.5%
Simplified58.5%
Final simplification44.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y a)))))
(if (<= z -6.6e+97)
t
(if (<= z 1.2e-46)
t_1
(if (<= z 14500.0) (/ (* y x) z) (if (<= z 4.2e+50) t_1 t))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double tmp;
if (z <= -6.6e+97) {
tmp = t;
} else if (z <= 1.2e-46) {
tmp = t_1;
} else if (z <= 14500.0) {
tmp = (y * x) / z;
} else if (z <= 4.2e+50) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = x * (1.0d0 - (y / a))
if (z <= (-6.6d+97)) then
tmp = t
else if (z <= 1.2d-46) then
tmp = t_1
else if (z <= 14500.0d0) then
tmp = (y * x) / z
else if (z <= 4.2d+50) then
tmp = t_1
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double tmp;
if (z <= -6.6e+97) {
tmp = t;
} else if (z <= 1.2e-46) {
tmp = t_1;
} else if (z <= 14500.0) {
tmp = (y * x) / z;
} else if (z <= 4.2e+50) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (1.0 - (y / a)) tmp = 0 if z <= -6.6e+97: tmp = t elif z <= 1.2e-46: tmp = t_1 elif z <= 14500.0: tmp = (y * x) / z elif z <= 4.2e+50: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(1.0 - Float64(y / a))) tmp = 0.0 if (z <= -6.6e+97) tmp = t; elseif (z <= 1.2e-46) tmp = t_1; elseif (z <= 14500.0) tmp = Float64(Float64(y * x) / z); elseif (z <= 4.2e+50) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (1.0 - (y / a)); tmp = 0.0; if (z <= -6.6e+97) tmp = t; elseif (z <= 1.2e-46) tmp = t_1; elseif (z <= 14500.0) tmp = (y * x) / z; elseif (z <= 4.2e+50) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.6e+97], t, If[LessEqual[z, 1.2e-46], t$95$1, If[LessEqual[z, 14500.0], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 4.2e+50], t$95$1, t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;z \leq -6.6 \cdot 10^{+97}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-46}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 14500:\\
\;\;\;\;\frac{y \cdot x}{z}\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{+50}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -6.6000000000000003e97 or 4.1999999999999999e50 < z Initial program 33.2%
associate-*l/65.8%
Simplified65.8%
Taylor expanded in z around inf 51.3%
if -6.6000000000000003e97 < z < 1.20000000000000007e-46 or 14500 < z < 4.1999999999999999e50Initial program 86.8%
associate-*l/93.1%
Simplified93.1%
*-commutative93.1%
clear-num93.0%
un-div-inv93.4%
Applied egg-rr93.4%
Taylor expanded in z around 0 64.4%
Taylor expanded in x around inf 52.2%
*-commutative52.2%
mul-1-neg52.2%
unsub-neg52.2%
Simplified52.2%
if 1.20000000000000007e-46 < z < 14500Initial program 86.2%
associate-*l/86.3%
Simplified86.3%
Taylor expanded in a around 0 58.2%
+-commutative58.2%
mul-1-neg58.2%
unsub-neg58.2%
associate-/l*58.1%
Simplified58.1%
Taylor expanded in x around -inf 39.8%
Final simplification51.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y a)))))
(if (<= x -1.1e+183)
t_1
(if (<= x 7.2e-24)
(* t (/ (- y z) (- a z)))
(if (<= x 2.05e+157) t_1 (* x (/ (- y a) z)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double tmp;
if (x <= -1.1e+183) {
tmp = t_1;
} else if (x <= 7.2e-24) {
tmp = t * ((y - z) / (a - z));
} else if (x <= 2.05e+157) {
tmp = t_1;
} else {
tmp = x * ((y - a) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = x * (1.0d0 - (y / a))
if (x <= (-1.1d+183)) then
tmp = t_1
else if (x <= 7.2d-24) then
tmp = t * ((y - z) / (a - z))
else if (x <= 2.05d+157) then
tmp = t_1
else
tmp = x * ((y - a) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double tmp;
if (x <= -1.1e+183) {
tmp = t_1;
} else if (x <= 7.2e-24) {
tmp = t * ((y - z) / (a - z));
} else if (x <= 2.05e+157) {
tmp = t_1;
} else {
tmp = x * ((y - a) / z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (1.0 - (y / a)) tmp = 0 if x <= -1.1e+183: tmp = t_1 elif x <= 7.2e-24: tmp = t * ((y - z) / (a - z)) elif x <= 2.05e+157: tmp = t_1 else: tmp = x * ((y - a) / z) return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(1.0 - Float64(y / a))) tmp = 0.0 if (x <= -1.1e+183) tmp = t_1; elseif (x <= 7.2e-24) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); elseif (x <= 2.05e+157) tmp = t_1; else tmp = Float64(x * Float64(Float64(y - a) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (1.0 - (y / a)); tmp = 0.0; if (x <= -1.1e+183) tmp = t_1; elseif (x <= 7.2e-24) tmp = t * ((y - z) / (a - z)); elseif (x <= 2.05e+157) tmp = t_1; else tmp = x * ((y - a) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.1e+183], t$95$1, If[LessEqual[x, 7.2e-24], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.05e+157], t$95$1, N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;x \leq -1.1 \cdot 10^{+183}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 7.2 \cdot 10^{-24}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{elif}\;x \leq 2.05 \cdot 10^{+157}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\
\end{array}
\end{array}
if x < -1.09999999999999995e183 or 7.2000000000000002e-24 < x < 2.05000000000000008e157Initial program 59.7%
associate-*l/80.1%
Simplified80.1%
*-commutative80.1%
clear-num80.0%
un-div-inv80.1%
Applied egg-rr80.1%
Taylor expanded in z around 0 51.8%
Taylor expanded in x around inf 60.4%
*-commutative60.4%
mul-1-neg60.4%
unsub-neg60.4%
Simplified60.4%
if -1.09999999999999995e183 < x < 7.2000000000000002e-24Initial program 71.7%
associate-*l/86.4%
Simplified86.4%
Taylor expanded in x around 0 52.2%
associate-*r/68.0%
Simplified68.0%
if 2.05000000000000008e157 < x Initial program 52.1%
associate-*l/66.2%
Simplified66.2%
Taylor expanded in z around -inf 51.9%
+-commutative51.9%
sub-neg51.9%
mul-1-neg51.9%
+-commutative51.9%
mul-1-neg51.9%
unsub-neg51.9%
+-commutative51.9%
mul-1-neg51.9%
sub-neg51.9%
distribute-rgt-out--51.9%
Simplified51.9%
Taylor expanded in x around -inf 60.8%
div-sub60.8%
associate-*r*60.8%
mul-1-neg60.8%
Simplified60.8%
Final simplification65.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -7.6e-15) (not (<= z 5e-14))) (+ t (* (/ y z) (- x t))) (- x (/ (- x t) (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -7.6e-15) || !(z <= 5e-14)) {
tmp = t + ((y / z) * (x - t));
} else {
tmp = x - ((x - t) / (a / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if ((z <= (-7.6d-15)) .or. (.not. (z <= 5d-14))) then
tmp = t + ((y / z) * (x - t))
else
tmp = x - ((x - t) / (a / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -7.6e-15) || !(z <= 5e-14)) {
tmp = t + ((y / z) * (x - t));
} else {
tmp = x - ((x - t) / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -7.6e-15) or not (z <= 5e-14): tmp = t + ((y / z) * (x - t)) else: tmp = x - ((x - t) / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -7.6e-15) || !(z <= 5e-14)) tmp = Float64(t + Float64(Float64(y / z) * Float64(x - t))); else tmp = Float64(x - Float64(Float64(x - t) / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -7.6e-15) || ~((z <= 5e-14))) tmp = t + ((y / z) * (x - t)); else tmp = x - ((x - t) / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -7.6e-15], N[Not[LessEqual[z, 5e-14]], $MachinePrecision]], N[(t + N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(x - t), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.6 \cdot 10^{-15} \lor \neg \left(z \leq 5 \cdot 10^{-14}\right):\\
\;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{x - t}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -7.6000000000000004e-15 or 5.0000000000000002e-14 < z Initial program 42.4%
+-commutative42.4%
associate-*r/67.2%
fma-def67.6%
Simplified67.6%
Taylor expanded in a around 0 49.4%
mul-1-neg49.4%
Simplified49.4%
Taylor expanded in z around -inf 62.9%
+-commutative62.9%
mul-1-neg62.9%
unsub-neg62.9%
associate-/l*72.9%
associate-/r/75.2%
Simplified75.2%
if -7.6000000000000004e-15 < z < 5.0000000000000002e-14Initial program 90.8%
associate-*l/93.8%
Simplified93.8%
*-commutative93.8%
clear-num93.6%
un-div-inv94.0%
Applied egg-rr94.0%
Taylor expanded in z around 0 76.4%
Final simplification75.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.2e+26) (not (<= z 2.4e-50))) (* t (- 1.0 (/ y z))) (* x (- 1.0 (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.2e+26) || !(z <= 2.4e-50)) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x * (1.0 - (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if ((z <= (-2.2d+26)) .or. (.not. (z <= 2.4d-50))) then
tmp = t * (1.0d0 - (y / z))
else
tmp = x * (1.0d0 - (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.2e+26) || !(z <= 2.4e-50)) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x * (1.0 - (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.2e+26) or not (z <= 2.4e-50): tmp = t * (1.0 - (y / z)) else: tmp = x * (1.0 - (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.2e+26) || !(z <= 2.4e-50)) tmp = Float64(t * Float64(1.0 - Float64(y / z))); else tmp = Float64(x * Float64(1.0 - Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.2e+26) || ~((z <= 2.4e-50))) tmp = t * (1.0 - (y / z)); else tmp = x * (1.0 - (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.2e+26], N[Not[LessEqual[z, 2.4e-50]], $MachinePrecision]], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{+26} \lor \neg \left(z \leq 2.4 \cdot 10^{-50}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\end{array}
\end{array}
if z < -2.20000000000000007e26 or 2.40000000000000002e-50 < z Initial program 45.0%
associate-*l/72.2%
Simplified72.2%
Taylor expanded in a around 0 31.8%
+-commutative31.8%
mul-1-neg31.8%
unsub-neg31.8%
associate-/l*48.9%
Simplified48.9%
Taylor expanded in t around inf 54.7%
if -2.20000000000000007e26 < z < 2.40000000000000002e-50Initial program 88.5%
associate-*l/92.9%
Simplified92.9%
*-commutative92.9%
clear-num92.8%
un-div-inv93.2%
Applied egg-rr93.2%
Taylor expanded in z around 0 69.2%
Taylor expanded in x around inf 55.4%
*-commutative55.4%
mul-1-neg55.4%
unsub-neg55.4%
Simplified55.4%
Final simplification55.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -7.9e-16) t (if (<= z 1.22e-24) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.9e-16) {
tmp = t;
} else if (z <= 1.22e-24) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if (z <= (-7.9d-16)) then
tmp = t
else if (z <= 1.22d-24) then
tmp = x
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.9e-16) {
tmp = t;
} else if (z <= 1.22e-24) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -7.9e-16: tmp = t elif z <= 1.22e-24: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7.9e-16) tmp = t; elseif (z <= 1.22e-24) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -7.9e-16) tmp = t; elseif (z <= 1.22e-24) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7.9e-16], t, If[LessEqual[z, 1.22e-24], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.9 \cdot 10^{-16}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.22 \cdot 10^{-24}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -7.9000000000000002e-16 or 1.22000000000000004e-24 < z Initial program 42.8%
associate-*l/71.4%
Simplified71.4%
Taylor expanded in z around inf 43.1%
if -7.9000000000000002e-16 < z < 1.22000000000000004e-24Initial program 90.8%
associate-*l/93.7%
Simplified93.7%
Taylor expanded in a around inf 34.3%
Final simplification38.8%
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
return t;
}
real(8) function code(x, y, z, t, a)
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
code = t
end function
public static double code(double x, double y, double z, double t, double a) {
return t;
}
def code(x, y, z, t, a): return t
function code(x, y, z, t, a) return t end
function tmp = code(x, y, z, t, a) tmp = t; end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 66.2%
associate-*l/82.3%
Simplified82.3%
Taylor expanded in z around inf 24.8%
Final simplification24.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (/ y z) (- t x)))))
(if (< z -1.2536131056095036e+188)
t_1
(if (< z 4.446702369113811e+64)
(+ x (/ (- y z) (/ (- a z) (- t x))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = t - ((y / z) * (t - x))
if (z < (-1.2536131056095036d+188)) then
tmp = t_1
else if (z < 4.446702369113811d+64) then
tmp = x + ((y - z) / ((a - z) / (t - x)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - ((y / z) * (t - x)) tmp = 0 if z < -1.2536131056095036e+188: tmp = t_1 elif z < 4.446702369113811e+64: tmp = x + ((y - z) / ((a - z) / (t - x))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x))) tmp = 0.0 if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - ((y / z) * (t - x)); tmp = 0.0; if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = x + ((y - z) / ((a - z) / (t - x))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
herbie shell --seed 2023208
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
:precision binary64
:herbie-target
(if (< z -1.2536131056095036e+188) (- t (* (/ y z) (- t x))) (if (< z 4.446702369113811e+64) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x)))))
(+ x (/ (* (- y z) (- t x)) (- a z))))