
(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 21 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 (<= t -2.35e+73)
(fma (- y z) (* t (+ (/ 1.0 (- a z)) (/ (/ x t) (- z a)))) x)
(if (<= t 1.6e+25)
(*
x
(-
(+ 1.0 (/ z (- a z)))
(fma -1.0 (* (/ t x) (/ (- y z) (- a z))) (/ y (- a z)))))
(+ x (/ (- t x) (/ (- a z) (- y z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.35e+73) {
tmp = fma((y - z), (t * ((1.0 / (a - z)) + ((x / t) / (z - a)))), x);
} else if (t <= 1.6e+25) {
tmp = x * ((1.0 + (z / (a - z))) - fma(-1.0, ((t / x) * ((y - z) / (a - z))), (y / (a - z))));
} else {
tmp = x + ((t - x) / ((a - z) / (y - z)));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.35e+73) tmp = fma(Float64(y - z), Float64(t * Float64(Float64(1.0 / Float64(a - z)) + Float64(Float64(x / t) / Float64(z - a)))), x); elseif (t <= 1.6e+25) tmp = Float64(x * Float64(Float64(1.0 + Float64(z / Float64(a - z))) - fma(-1.0, Float64(Float64(t / x) * Float64(Float64(y - z) / Float64(a - z))), Float64(y / Float64(a - z))))); else tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.35e+73], N[(N[(y - z), $MachinePrecision] * N[(t * N[(N[(1.0 / N[(a - z), $MachinePrecision]), $MachinePrecision] + N[(N[(x / t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 1.6e+25], N[(x * N[(N[(1.0 + N[(z / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-1.0 * N[(N[(t / x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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}
\mathbf{if}\;t \leq -2.35 \cdot 10^{+73}:\\
\;\;\;\;\mathsf{fma}\left(y - z, t \cdot \left(\frac{1}{a - z} + \frac{\frac{x}{t}}{z - a}\right), x\right)\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{+25}:\\
\;\;\;\;x \cdot \left(\left(1 + \frac{z}{a - z}\right) - \mathsf{fma}\left(-1, \frac{t}{x} \cdot \frac{y - z}{a - z}, \frac{y}{a - z}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\end{array}
\end{array}
if t < -2.3500000000000001e73Initial program 57.2%
+-commutative57.2%
associate-/l*90.4%
fma-define90.4%
Simplified90.4%
Taylor expanded in t around -inf 88.4%
mul-1-neg88.4%
associate-/r*90.7%
Simplified90.7%
if -2.3500000000000001e73 < t < 1.6e25Initial program 69.2%
+-commutative69.2%
associate-/l*65.2%
fma-define65.3%
Simplified65.3%
Taylor expanded in x around -inf 84.0%
associate-*r*84.0%
neg-mul-184.0%
fma-define84.0%
times-frac89.2%
+-commutative89.2%
Simplified89.2%
if 1.6e25 < t Initial program 61.2%
associate-/l*89.2%
Simplified89.2%
*-commutative89.2%
associate-*l/61.2%
associate-*r/96.2%
clear-num96.1%
un-div-inv96.2%
Applied egg-rr96.2%
Final simplification90.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y z) (- x t)) (- z a)))))
(if (or (<= t_1 -1e-289) (not (<= t_1 0.0)))
(fma (- t x) (/ (- y z) (- a z)) x)
(- t (* x (/ (- a y) z))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - z) * (x - t)) / (z - a));
double tmp;
if ((t_1 <= -1e-289) || !(t_1 <= 0.0)) {
tmp = fma((t - x), ((y - z) / (a - z)), x);
} else {
tmp = t - (x * ((a - y) / z));
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(x - t)) / Float64(z - a))) tmp = 0.0 if ((t_1 <= -1e-289) || !(t_1 <= 0.0)) tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); else tmp = Float64(t - Float64(x * Float64(Float64(a - y) / z))); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e-289], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(t - N[(x * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - z\right) \cdot \left(x - t\right)}{z - a}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-289} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t - x \cdot \frac{a - y}{z}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1e-289 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 70.8%
+-commutative70.8%
*-commutative70.8%
associate-/l*88.8%
fma-define88.8%
Simplified88.8%
if -1e-289 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 3.8%
+-commutative3.8%
associate-/l*3.4%
fma-define3.7%
Simplified3.7%
Taylor expanded in x around -inf 84.2%
mul-1-neg84.2%
distribute-rgt-neg-in84.2%
+-commutative84.2%
mul-1-neg84.2%
unsub-neg84.2%
associate-/r*84.0%
+-commutative84.0%
Simplified84.0%
Taylor expanded in z around inf 84.3%
Taylor expanded in z around inf 99.7%
mul-1-neg99.7%
unsub-neg99.7%
associate-/l*99.8%
neg-mul-199.8%
sub-neg99.8%
Simplified99.8%
Final simplification89.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- x t) (- z a)))))
(t_2 (+ x (/ (* (- y z) (- x t)) (- z a)))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -1e-289)
t_2
(if (<= t_2 0.0)
(- t (* x (/ (- a y) z)))
(if (<= t_2 5e+287) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((x - t) / (z - a)));
double t_2 = x + (((y - z) * (x - t)) / (z - a));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -1e-289) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t - (x * ((a - y) / z));
} else if (t_2 <= 5e+287) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((x - t) / (z - a)));
double t_2 = x + (((y - z) * (x - t)) / (z - a));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= -1e-289) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t - (x * ((a - y) / z));
} else if (t_2 <= 5e+287) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((x - t) / (z - a))) t_2 = x + (((y - z) * (x - t)) / (z - a)) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -1e-289: tmp = t_2 elif t_2 <= 0.0: tmp = t - (x * ((a - y) / z)) elif t_2 <= 5e+287: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(x - t) / Float64(z - a)))) t_2 = Float64(x + Float64(Float64(Float64(y - z) * Float64(x - t)) / Float64(z - a))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= -1e-289) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(t - Float64(x * Float64(Float64(a - y) / z))); elseif (t_2 <= 5e+287) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((x - t) / (z - a))); t_2 = x + (((y - z) * (x - t)) / (z - a)); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -1e-289) tmp = t_2; elseif (t_2 <= 0.0) tmp = t - (x * ((a - y) / z)); elseif (t_2 <= 5e+287) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -1e-289], t$95$2, If[LessEqual[t$95$2, 0.0], N[(t - N[(x * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+287], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{x - t}{z - a}\\
t_2 := x + \frac{\left(y - z\right) \cdot \left(x - t\right)}{z - a}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-289}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t - x \cdot \frac{a - y}{z}\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+287}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -inf.0 or 5e287 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 38.7%
associate-/l*78.4%
Simplified78.4%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1e-289 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 5e287Initial program 96.0%
if -1e-289 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 3.8%
+-commutative3.8%
associate-/l*3.4%
fma-define3.7%
Simplified3.7%
Taylor expanded in x around -inf 84.2%
mul-1-neg84.2%
distribute-rgt-neg-in84.2%
+-commutative84.2%
mul-1-neg84.2%
unsub-neg84.2%
associate-/r*84.0%
+-commutative84.0%
Simplified84.0%
Taylor expanded in z around inf 84.3%
Taylor expanded in z around inf 99.7%
mul-1-neg99.7%
unsub-neg99.7%
associate-/l*99.8%
neg-mul-199.8%
sub-neg99.8%
Simplified99.8%
Final simplification89.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y z) (- x t)) (- z a)))))
(if (or (<= t_1 -1e-289) (not (<= t_1 0.0)))
(+ x (/ (- t x) (/ (- a z) (- y z))))
(- t (* x (/ (- a y) z))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - z) * (x - t)) / (z - a));
double tmp;
if ((t_1 <= -1e-289) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = 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 + (((y - z) * (x - t)) / (z - a))
if ((t_1 <= (-1d-289)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((t - x) / ((a - z) / (y - z)))
else
tmp = 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 + (((y - z) * (x - t)) / (z - a));
double tmp;
if ((t_1 <= -1e-289) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t - (x * ((a - y) / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - z) * (x - t)) / (z - a)) tmp = 0 if (t_1 <= -1e-289) or not (t_1 <= 0.0): tmp = x + ((t - x) / ((a - z) / (y - z))) else: tmp = t - (x * ((a - y) / z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(x - t)) / Float64(z - a))) tmp = 0.0 if ((t_1 <= -1e-289) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); else tmp = Float64(t - Float64(x * Float64(Float64(a - y) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - z) * (x - t)) / (z - a)); tmp = 0.0; if ((t_1 <= -1e-289) || ~((t_1 <= 0.0))) tmp = x + ((t - x) / ((a - z) / (y - z))); else tmp = 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[(y - z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e-289], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t - N[(x * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - z\right) \cdot \left(x - t\right)}{z - a}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-289} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;t - x \cdot \frac{a - y}{z}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1e-289 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 70.8%
associate-/l*80.3%
Simplified80.3%
*-commutative80.3%
associate-*l/70.8%
associate-*r/88.8%
clear-num88.7%
un-div-inv88.7%
Applied egg-rr88.7%
if -1e-289 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 3.8%
+-commutative3.8%
associate-/l*3.4%
fma-define3.7%
Simplified3.7%
Taylor expanded in x around -inf 84.2%
mul-1-neg84.2%
distribute-rgt-neg-in84.2%
+-commutative84.2%
mul-1-neg84.2%
unsub-neg84.2%
associate-/r*84.0%
+-commutative84.0%
Simplified84.0%
Taylor expanded in z around inf 84.3%
Taylor expanded in z around inf 99.7%
mul-1-neg99.7%
unsub-neg99.7%
associate-/l*99.8%
neg-mul-199.8%
sub-neg99.8%
Simplified99.8%
Final simplification89.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ z (- z a)))))
(if (<= z -3.5e+69)
t_1
(if (<= z -1.05e+28)
x
(if (<= z -8.2e-120)
(* x (/ y z))
(if (<= z -1.75e-190)
x
(if (<= z 9e-107)
(/ (* y (- t x)) a)
(if (<= z 8.5e-6) x t_1))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (z / (z - a));
double tmp;
if (z <= -3.5e+69) {
tmp = t_1;
} else if (z <= -1.05e+28) {
tmp = x;
} else if (z <= -8.2e-120) {
tmp = x * (y / z);
} else if (z <= -1.75e-190) {
tmp = x;
} else if (z <= 9e-107) {
tmp = (y * (t - x)) / a;
} else if (z <= 8.5e-6) {
tmp = 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 * (z / (z - a))
if (z <= (-3.5d+69)) then
tmp = t_1
else if (z <= (-1.05d+28)) then
tmp = x
else if (z <= (-8.2d-120)) then
tmp = x * (y / z)
else if (z <= (-1.75d-190)) then
tmp = x
else if (z <= 9d-107) then
tmp = (y * (t - x)) / a
else if (z <= 8.5d-6) then
tmp = 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 * (z / (z - a));
double tmp;
if (z <= -3.5e+69) {
tmp = t_1;
} else if (z <= -1.05e+28) {
tmp = x;
} else if (z <= -8.2e-120) {
tmp = x * (y / z);
} else if (z <= -1.75e-190) {
tmp = x;
} else if (z <= 9e-107) {
tmp = (y * (t - x)) / a;
} else if (z <= 8.5e-6) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (z / (z - a)) tmp = 0 if z <= -3.5e+69: tmp = t_1 elif z <= -1.05e+28: tmp = x elif z <= -8.2e-120: tmp = x * (y / z) elif z <= -1.75e-190: tmp = x elif z <= 9e-107: tmp = (y * (t - x)) / a elif z <= 8.5e-6: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(z / Float64(z - a))) tmp = 0.0 if (z <= -3.5e+69) tmp = t_1; elseif (z <= -1.05e+28) tmp = x; elseif (z <= -8.2e-120) tmp = Float64(x * Float64(y / z)); elseif (z <= -1.75e-190) tmp = x; elseif (z <= 9e-107) tmp = Float64(Float64(y * Float64(t - x)) / a); elseif (z <= 8.5e-6) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (z / (z - a)); tmp = 0.0; if (z <= -3.5e+69) tmp = t_1; elseif (z <= -1.05e+28) tmp = x; elseif (z <= -8.2e-120) tmp = x * (y / z); elseif (z <= -1.75e-190) tmp = x; elseif (z <= 9e-107) tmp = (y * (t - x)) / a; elseif (z <= 8.5e-6) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.5e+69], t$95$1, If[LessEqual[z, -1.05e+28], x, If[LessEqual[z, -8.2e-120], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.75e-190], x, If[LessEqual[z, 9e-107], N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 8.5e-6], x, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{z}{z - a}\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{+28}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{-120}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq -1.75 \cdot 10^{-190}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 9 \cdot 10^{-107}:\\
\;\;\;\;\frac{y \cdot \left(t - x\right)}{a}\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-6}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.49999999999999987e69 or 8.4999999999999999e-6 < z Initial program 40.1%
+-commutative40.1%
associate-/l*57.4%
fma-define57.3%
Simplified57.3%
Taylor expanded in y around 0 28.7%
mul-1-neg28.7%
associate-/l*44.5%
distribute-lft-neg-out44.5%
*-commutative44.5%
Simplified44.5%
Taylor expanded in x around 0 31.8%
mul-1-neg31.8%
associate-/l*51.7%
distribute-lft-neg-in51.7%
Simplified51.7%
if -3.49999999999999987e69 < z < -1.04999999999999995e28 or -8.20000000000000068e-120 < z < -1.75e-190 or 9.00000000000000032e-107 < z < 8.4999999999999999e-6Initial program 77.9%
+-commutative77.9%
associate-/l*87.6%
fma-define87.9%
Simplified87.9%
Taylor expanded in a around inf 60.9%
if -1.04999999999999995e28 < z < -8.20000000000000068e-120Initial program 96.1%
+-commutative96.1%
associate-/l*96.2%
fma-define96.4%
Simplified96.4%
Taylor expanded in x around -inf 81.7%
associate-*r*81.7%
neg-mul-181.7%
fma-define81.7%
times-frac85.4%
+-commutative85.4%
Simplified85.4%
Taylor expanded in x around inf 74.7%
mul-1-neg74.7%
*-commutative74.7%
distribute-rgt-neg-in74.7%
Simplified74.7%
Taylor expanded in a around 0 53.6%
associate-*r/53.6%
neg-mul-153.6%
Simplified53.6%
if -1.75e-190 < z < 9.00000000000000032e-107Initial program 90.4%
+-commutative90.4%
associate-/l*87.5%
fma-define87.5%
Simplified87.5%
Taylor expanded in y around -inf 62.2%
Taylor expanded in a around inf 56.6%
Final simplification54.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- x t) (- z a)))))
(t_2 (- t (* x (/ (- a y) z)))))
(if (<= z -2.6e+227)
t_2
(if (<= z -7.2e+106)
t_1
(if (<= z -2.6e+86)
(+ t (/ (* (- t x) (- a y)) z))
(if (<= z 1.9e+105) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((x - t) / (z - a)));
double t_2 = t - (x * ((a - y) / z));
double tmp;
if (z <= -2.6e+227) {
tmp = t_2;
} else if (z <= -7.2e+106) {
tmp = t_1;
} else if (z <= -2.6e+86) {
tmp = t + (((t - x) * (a - y)) / z);
} else if (z <= 1.9e+105) {
tmp = t_1;
} 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 + ((y - z) * ((x - t) / (z - a)))
t_2 = t - (x * ((a - y) / z))
if (z <= (-2.6d+227)) then
tmp = t_2
else if (z <= (-7.2d+106)) then
tmp = t_1
else if (z <= (-2.6d+86)) then
tmp = t + (((t - x) * (a - y)) / z)
else if (z <= 1.9d+105) 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 t_1 = x + ((y - z) * ((x - t) / (z - a)));
double t_2 = t - (x * ((a - y) / z));
double tmp;
if (z <= -2.6e+227) {
tmp = t_2;
} else if (z <= -7.2e+106) {
tmp = t_1;
} else if (z <= -2.6e+86) {
tmp = t + (((t - x) * (a - y)) / z);
} else if (z <= 1.9e+105) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((x - t) / (z - a))) t_2 = t - (x * ((a - y) / z)) tmp = 0 if z <= -2.6e+227: tmp = t_2 elif z <= -7.2e+106: tmp = t_1 elif z <= -2.6e+86: tmp = t + (((t - x) * (a - y)) / z) elif z <= 1.9e+105: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(x - t) / Float64(z - a)))) t_2 = Float64(t - Float64(x * Float64(Float64(a - y) / z))) tmp = 0.0 if (z <= -2.6e+227) tmp = t_2; elseif (z <= -7.2e+106) tmp = t_1; elseif (z <= -2.6e+86) tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); elseif (z <= 1.9e+105) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((x - t) / (z - a))); t_2 = t - (x * ((a - y) / z)); tmp = 0.0; if (z <= -2.6e+227) tmp = t_2; elseif (z <= -7.2e+106) tmp = t_1; elseif (z <= -2.6e+86) tmp = t + (((t - x) * (a - y)) / z); elseif (z <= 1.9e+105) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(x * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.6e+227], t$95$2, If[LessEqual[z, -7.2e+106], t$95$1, If[LessEqual[z, -2.6e+86], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.9e+105], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{x - t}{z - a}\\
t_2 := t - x \cdot \frac{a - y}{z}\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{+227}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -7.2 \cdot 10^{+106}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{+86}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+105}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -2.59999999999999982e227 or 1.9e105 < z Initial program 31.9%
+-commutative31.9%
associate-/l*45.2%
fma-define45.3%
Simplified45.3%
Taylor expanded in x around -inf 51.4%
mul-1-neg51.4%
distribute-rgt-neg-in51.4%
+-commutative51.4%
mul-1-neg51.4%
unsub-neg51.4%
associate-/r*41.6%
+-commutative41.6%
Simplified41.6%
Taylor expanded in z around inf 76.9%
Taylor expanded in z around inf 72.1%
mul-1-neg72.1%
unsub-neg72.1%
associate-/l*87.6%
neg-mul-187.6%
sub-neg87.6%
Simplified87.6%
if -2.59999999999999982e227 < z < -7.2000000000000002e106 or -2.5999999999999998e86 < z < 1.9e105Initial program 78.5%
associate-/l*85.6%
Simplified85.6%
if -7.2000000000000002e106 < z < -2.5999999999999998e86Initial program 17.2%
+-commutative17.2%
associate-/l*31.4%
fma-define30.3%
Simplified30.3%
Taylor expanded in z around inf 99.6%
associate--l+99.6%
associate-*r/99.6%
associate-*r/99.6%
mul-1-neg99.6%
div-sub99.6%
mul-1-neg99.6%
distribute-lft-out--99.6%
associate-*r/99.6%
mul-1-neg99.6%
unsub-neg99.6%
distribute-rgt-out--99.6%
Simplified99.6%
Final simplification86.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3e+69)
t
(if (<= z -1.2e+28)
x
(if (<= z -9e-120)
(* x (/ y z))
(if (<= z -4e-190)
x
(if (<= z 8.5e-114) (/ (* y (- t x)) a) (if (<= z 2.45e-5) x t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3e+69) {
tmp = t;
} else if (z <= -1.2e+28) {
tmp = x;
} else if (z <= -9e-120) {
tmp = x * (y / z);
} else if (z <= -4e-190) {
tmp = x;
} else if (z <= 8.5e-114) {
tmp = (y * (t - x)) / a;
} else if (z <= 2.45e-5) {
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 <= (-3d+69)) then
tmp = t
else if (z <= (-1.2d+28)) then
tmp = x
else if (z <= (-9d-120)) then
tmp = x * (y / z)
else if (z <= (-4d-190)) then
tmp = x
else if (z <= 8.5d-114) then
tmp = (y * (t - x)) / a
else if (z <= 2.45d-5) 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 <= -3e+69) {
tmp = t;
} else if (z <= -1.2e+28) {
tmp = x;
} else if (z <= -9e-120) {
tmp = x * (y / z);
} else if (z <= -4e-190) {
tmp = x;
} else if (z <= 8.5e-114) {
tmp = (y * (t - x)) / a;
} else if (z <= 2.45e-5) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3e+69: tmp = t elif z <= -1.2e+28: tmp = x elif z <= -9e-120: tmp = x * (y / z) elif z <= -4e-190: tmp = x elif z <= 8.5e-114: tmp = (y * (t - x)) / a elif z <= 2.45e-5: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3e+69) tmp = t; elseif (z <= -1.2e+28) tmp = x; elseif (z <= -9e-120) tmp = Float64(x * Float64(y / z)); elseif (z <= -4e-190) tmp = x; elseif (z <= 8.5e-114) tmp = Float64(Float64(y * Float64(t - x)) / a); elseif (z <= 2.45e-5) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3e+69) tmp = t; elseif (z <= -1.2e+28) tmp = x; elseif (z <= -9e-120) tmp = x * (y / z); elseif (z <= -4e-190) tmp = x; elseif (z <= 8.5e-114) tmp = (y * (t - x)) / a; elseif (z <= 2.45e-5) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3e+69], t, If[LessEqual[z, -1.2e+28], x, If[LessEqual[z, -9e-120], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4e-190], x, If[LessEqual[z, 8.5e-114], N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 2.45e-5], x, t]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{+69}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{+28}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -9 \cdot 10^{-120}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-190}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-114}:\\
\;\;\;\;\frac{y \cdot \left(t - x\right)}{a}\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{-5}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -2.99999999999999983e69 or 2.45e-5 < z Initial program 40.1%
+-commutative40.1%
associate-/l*57.4%
fma-define57.3%
Simplified57.3%
Taylor expanded in z around inf 48.1%
if -2.99999999999999983e69 < z < -1.19999999999999991e28 or -9e-120 < z < -4.0000000000000001e-190 or 8.5000000000000006e-114 < z < 2.45e-5Initial program 77.9%
+-commutative77.9%
associate-/l*87.6%
fma-define87.9%
Simplified87.9%
Taylor expanded in a around inf 60.9%
if -1.19999999999999991e28 < z < -9e-120Initial program 96.1%
+-commutative96.1%
associate-/l*96.2%
fma-define96.4%
Simplified96.4%
Taylor expanded in x around -inf 81.7%
associate-*r*81.7%
neg-mul-181.7%
fma-define81.7%
times-frac85.4%
+-commutative85.4%
Simplified85.4%
Taylor expanded in x around inf 74.7%
mul-1-neg74.7%
*-commutative74.7%
distribute-rgt-neg-in74.7%
Simplified74.7%
Taylor expanded in a around 0 53.6%
associate-*r/53.6%
neg-mul-153.6%
Simplified53.6%
if -4.0000000000000001e-190 < z < 8.5000000000000006e-114Initial program 90.4%
+-commutative90.4%
associate-/l*87.5%
fma-define87.5%
Simplified87.5%
Taylor expanded in y around -inf 62.2%
Taylor expanded in a around inf 56.6%
Final simplification53.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -5.1e+69)
t
(if (<= z -1.8e+28)
x
(if (<= z -2.2e-119)
(* x (/ y z))
(if (<= z -1.3e-190)
x
(if (<= z 3.8e-108) (* y (/ (- t x) a)) (if (<= z 2.5e-5) x t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.1e+69) {
tmp = t;
} else if (z <= -1.8e+28) {
tmp = x;
} else if (z <= -2.2e-119) {
tmp = x * (y / z);
} else if (z <= -1.3e-190) {
tmp = x;
} else if (z <= 3.8e-108) {
tmp = y * ((t - x) / a);
} else if (z <= 2.5e-5) {
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 <= (-5.1d+69)) then
tmp = t
else if (z <= (-1.8d+28)) then
tmp = x
else if (z <= (-2.2d-119)) then
tmp = x * (y / z)
else if (z <= (-1.3d-190)) then
tmp = x
else if (z <= 3.8d-108) then
tmp = y * ((t - x) / a)
else if (z <= 2.5d-5) 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 <= -5.1e+69) {
tmp = t;
} else if (z <= -1.8e+28) {
tmp = x;
} else if (z <= -2.2e-119) {
tmp = x * (y / z);
} else if (z <= -1.3e-190) {
tmp = x;
} else if (z <= 3.8e-108) {
tmp = y * ((t - x) / a);
} else if (z <= 2.5e-5) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5.1e+69: tmp = t elif z <= -1.8e+28: tmp = x elif z <= -2.2e-119: tmp = x * (y / z) elif z <= -1.3e-190: tmp = x elif z <= 3.8e-108: tmp = y * ((t - x) / a) elif z <= 2.5e-5: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.1e+69) tmp = t; elseif (z <= -1.8e+28) tmp = x; elseif (z <= -2.2e-119) tmp = Float64(x * Float64(y / z)); elseif (z <= -1.3e-190) tmp = x; elseif (z <= 3.8e-108) tmp = Float64(y * Float64(Float64(t - x) / a)); elseif (z <= 2.5e-5) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5.1e+69) tmp = t; elseif (z <= -1.8e+28) tmp = x; elseif (z <= -2.2e-119) tmp = x * (y / z); elseif (z <= -1.3e-190) tmp = x; elseif (z <= 3.8e-108) tmp = y * ((t - x) / a); elseif (z <= 2.5e-5) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.1e+69], t, If[LessEqual[z, -1.8e+28], x, If[LessEqual[z, -2.2e-119], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.3e-190], x, If[LessEqual[z, 3.8e-108], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e-5], x, t]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.1 \cdot 10^{+69}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{+28}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{-119}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{-190}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-108}:\\
\;\;\;\;y \cdot \frac{t - x}{a}\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-5}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -5.09999999999999999e69 or 2.50000000000000012e-5 < z Initial program 40.1%
+-commutative40.1%
associate-/l*57.4%
fma-define57.3%
Simplified57.3%
Taylor expanded in z around inf 48.1%
if -5.09999999999999999e69 < z < -1.8e28 or -2.2000000000000001e-119 < z < -1.2999999999999999e-190 or 3.79999999999999973e-108 < z < 2.50000000000000012e-5Initial program 77.9%
+-commutative77.9%
associate-/l*87.6%
fma-define87.9%
Simplified87.9%
Taylor expanded in a around inf 60.9%
if -1.8e28 < z < -2.2000000000000001e-119Initial program 96.1%
+-commutative96.1%
associate-/l*96.2%
fma-define96.4%
Simplified96.4%
Taylor expanded in x around -inf 81.7%
associate-*r*81.7%
neg-mul-181.7%
fma-define81.7%
times-frac85.4%
+-commutative85.4%
Simplified85.4%
Taylor expanded in x around inf 74.7%
mul-1-neg74.7%
*-commutative74.7%
distribute-rgt-neg-in74.7%
Simplified74.7%
Taylor expanded in a around 0 53.6%
associate-*r/53.6%
neg-mul-153.6%
Simplified53.6%
if -1.2999999999999999e-190 < z < 3.79999999999999973e-108Initial program 90.4%
+-commutative90.4%
associate-/l*87.5%
fma-define87.5%
Simplified87.5%
Taylor expanded in y around -inf 62.2%
Taylor expanded in a around inf 56.6%
associate-/l*52.3%
Simplified52.3%
Final simplification51.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- t x) a))))
(if (<= z -1.6e+69)
t
(if (<= z -5.8e+27)
x
(if (<= z -6.8e-140)
t_1
(if (<= z -1.7e-191)
x
(if (<= z 1.5e-117) t_1 (if (<= z 3e-5) x t))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((t - x) / a);
double tmp;
if (z <= -1.6e+69) {
tmp = t;
} else if (z <= -5.8e+27) {
tmp = x;
} else if (z <= -6.8e-140) {
tmp = t_1;
} else if (z <= -1.7e-191) {
tmp = x;
} else if (z <= 1.5e-117) {
tmp = t_1;
} else if (z <= 3e-5) {
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 * ((t - x) / a)
if (z <= (-1.6d+69)) then
tmp = t
else if (z <= (-5.8d+27)) then
tmp = x
else if (z <= (-6.8d-140)) then
tmp = t_1
else if (z <= (-1.7d-191)) then
tmp = x
else if (z <= 1.5d-117) then
tmp = t_1
else if (z <= 3d-5) 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 * ((t - x) / a);
double tmp;
if (z <= -1.6e+69) {
tmp = t;
} else if (z <= -5.8e+27) {
tmp = x;
} else if (z <= -6.8e-140) {
tmp = t_1;
} else if (z <= -1.7e-191) {
tmp = x;
} else if (z <= 1.5e-117) {
tmp = t_1;
} else if (z <= 3e-5) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((t - x) / a) tmp = 0 if z <= -1.6e+69: tmp = t elif z <= -5.8e+27: tmp = x elif z <= -6.8e-140: tmp = t_1 elif z <= -1.7e-191: tmp = x elif z <= 1.5e-117: tmp = t_1 elif z <= 3e-5: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(t - x) / a)) tmp = 0.0 if (z <= -1.6e+69) tmp = t; elseif (z <= -5.8e+27) tmp = x; elseif (z <= -6.8e-140) tmp = t_1; elseif (z <= -1.7e-191) tmp = x; elseif (z <= 1.5e-117) tmp = t_1; elseif (z <= 3e-5) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((t - x) / a); tmp = 0.0; if (z <= -1.6e+69) tmp = t; elseif (z <= -5.8e+27) tmp = x; elseif (z <= -6.8e-140) tmp = t_1; elseif (z <= -1.7e-191) tmp = x; elseif (z <= 1.5e-117) tmp = t_1; elseif (z <= 3e-5) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.6e+69], t, If[LessEqual[z, -5.8e+27], x, If[LessEqual[z, -6.8e-140], t$95$1, If[LessEqual[z, -1.7e-191], x, If[LessEqual[z, 1.5e-117], t$95$1, If[LessEqual[z, 3e-5], x, t]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{t - x}{a}\\
\mathbf{if}\;z \leq -1.6 \cdot 10^{+69}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -5.8 \cdot 10^{+27}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -6.8 \cdot 10^{-140}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-191}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-117}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3 \cdot 10^{-5}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.59999999999999992e69 or 3.00000000000000008e-5 < z Initial program 40.1%
+-commutative40.1%
associate-/l*57.4%
fma-define57.3%
Simplified57.3%
Taylor expanded in z around inf 48.1%
if -1.59999999999999992e69 < z < -5.8000000000000002e27 or -6.80000000000000017e-140 < z < -1.69999999999999997e-191 or 1.49999999999999996e-117 < z < 3.00000000000000008e-5Initial program 78.2%
+-commutative78.2%
associate-/l*89.0%
fma-define89.2%
Simplified89.2%
Taylor expanded in a around inf 64.3%
if -5.8000000000000002e27 < z < -6.80000000000000017e-140 or -1.69999999999999997e-191 < z < 1.49999999999999996e-117Initial program 91.4%
+-commutative91.4%
associate-/l*89.3%
fma-define89.4%
Simplified89.4%
Taylor expanded in y around -inf 64.5%
Taylor expanded in a around inf 54.4%
associate-/l*51.4%
Simplified51.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (/ (* (- t x) (- a y)) z))))
(if (<= z -5.1e+69)
t_1
(if (<= z 4.1e+34)
(+ x (* (- t x) (/ (- y z) a)))
(if (<= z 6.5e+96)
t_1
(if (<= z 3.5e+104)
(+ x (* z (/ (- t x) (- z a))))
(- t (* x (/ (- a y) z)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + (((t - x) * (a - y)) / z);
double tmp;
if (z <= -5.1e+69) {
tmp = t_1;
} else if (z <= 4.1e+34) {
tmp = x + ((t - x) * ((y - z) / a));
} else if (z <= 6.5e+96) {
tmp = t_1;
} else if (z <= 3.5e+104) {
tmp = x + (z * ((t - x) / (z - a)));
} else {
tmp = 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 = t + (((t - x) * (a - y)) / z)
if (z <= (-5.1d+69)) then
tmp = t_1
else if (z <= 4.1d+34) then
tmp = x + ((t - x) * ((y - z) / a))
else if (z <= 6.5d+96) then
tmp = t_1
else if (z <= 3.5d+104) then
tmp = x + (z * ((t - x) / (z - a)))
else
tmp = 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 = t + (((t - x) * (a - y)) / z);
double tmp;
if (z <= -5.1e+69) {
tmp = t_1;
} else if (z <= 4.1e+34) {
tmp = x + ((t - x) * ((y - z) / a));
} else if (z <= 6.5e+96) {
tmp = t_1;
} else if (z <= 3.5e+104) {
tmp = x + (z * ((t - x) / (z - a)));
} else {
tmp = t - (x * ((a - y) / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + (((t - x) * (a - y)) / z) tmp = 0 if z <= -5.1e+69: tmp = t_1 elif z <= 4.1e+34: tmp = x + ((t - x) * ((y - z) / a)) elif z <= 6.5e+96: tmp = t_1 elif z <= 3.5e+104: tmp = x + (z * ((t - x) / (z - a))) else: tmp = t - (x * ((a - y) / z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)) tmp = 0.0 if (z <= -5.1e+69) tmp = t_1; elseif (z <= 4.1e+34) tmp = Float64(x + Float64(Float64(t - x) * Float64(Float64(y - z) / a))); elseif (z <= 6.5e+96) tmp = t_1; elseif (z <= 3.5e+104) tmp = Float64(x + Float64(z * Float64(Float64(t - x) / Float64(z - a)))); else tmp = Float64(t - Float64(x * Float64(Float64(a - y) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + (((t - x) * (a - y)) / z); tmp = 0.0; if (z <= -5.1e+69) tmp = t_1; elseif (z <= 4.1e+34) tmp = x + ((t - x) * ((y - z) / a)); elseif (z <= 6.5e+96) tmp = t_1; elseif (z <= 3.5e+104) tmp = x + (z * ((t - x) / (z - a))); else tmp = t - (x * ((a - y) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.1e+69], t$95$1, If[LessEqual[z, 4.1e+34], N[(x + N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e+96], t$95$1, If[LessEqual[z, 3.5e+104], N[(x + N[(z * N[(N[(t - x), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t - N[(x * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\mathbf{if}\;z \leq -5.1 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{+34}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a}\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+96}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+104}:\\
\;\;\;\;x + z \cdot \frac{t - x}{z - a}\\
\mathbf{else}:\\
\;\;\;\;t - x \cdot \frac{a - y}{z}\\
\end{array}
\end{array}
if z < -5.09999999999999999e69 or 4.0999999999999998e34 < z < 6.5e96Initial program 39.4%
+-commutative39.4%
associate-/l*59.6%
fma-define59.5%
Simplified59.5%
Taylor expanded in z around inf 67.2%
associate--l+67.2%
associate-*r/67.2%
associate-*r/67.2%
mul-1-neg67.2%
div-sub67.2%
mul-1-neg67.2%
distribute-lft-out--67.2%
associate-*r/67.2%
mul-1-neg67.2%
unsub-neg67.2%
distribute-rgt-out--68.6%
Simplified68.6%
if -5.09999999999999999e69 < z < 4.0999999999999998e34Initial program 88.1%
+-commutative88.1%
associate-/l*89.4%
fma-define89.5%
Simplified89.5%
Taylor expanded in a around inf 76.9%
associate-/l*83.0%
Simplified83.0%
if 6.5e96 < z < 3.5000000000000002e104Initial program 61.5%
+-commutative61.5%
associate-/l*100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in y around 0 61.5%
mul-1-neg61.5%
associate-/l*100.0%
distribute-lft-neg-out100.0%
*-commutative100.0%
Simplified100.0%
if 3.5000000000000002e104 < z Initial program 36.0%
+-commutative36.0%
associate-/l*46.7%
fma-define46.6%
Simplified46.6%
Taylor expanded in x around -inf 53.4%
mul-1-neg53.4%
distribute-rgt-neg-in53.4%
+-commutative53.4%
mul-1-neg53.4%
unsub-neg53.4%
associate-/r*38.7%
+-commutative38.7%
Simplified38.7%
Taylor expanded in z around inf 74.8%
Taylor expanded in z around inf 70.2%
mul-1-neg70.2%
unsub-neg70.2%
associate-/l*88.5%
neg-mul-188.5%
sub-neg88.5%
Simplified88.5%
Final simplification80.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- x) (+ -1.0 (/ y a)))) (t_2 (* t (/ z (- z a)))))
(if (<= z -6.8e+128)
t_2
(if (<= z -1.7e-275)
t_1
(if (<= z 2.8e-222)
(* t (/ y (- a z)))
(if (<= z 1.55e+90) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -x * (-1.0 + (y / a));
double t_2 = t * (z / (z - a));
double tmp;
if (z <= -6.8e+128) {
tmp = t_2;
} else if (z <= -1.7e-275) {
tmp = t_1;
} else if (z <= 2.8e-222) {
tmp = t * (y / (a - z));
} else if (z <= 1.55e+90) {
tmp = t_1;
} 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 * ((-1.0d0) + (y / a))
t_2 = t * (z / (z - a))
if (z <= (-6.8d+128)) then
tmp = t_2
else if (z <= (-1.7d-275)) then
tmp = t_1
else if (z <= 2.8d-222) then
tmp = t * (y / (a - z))
else if (z <= 1.55d+90) 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 t_1 = -x * (-1.0 + (y / a));
double t_2 = t * (z / (z - a));
double tmp;
if (z <= -6.8e+128) {
tmp = t_2;
} else if (z <= -1.7e-275) {
tmp = t_1;
} else if (z <= 2.8e-222) {
tmp = t * (y / (a - z));
} else if (z <= 1.55e+90) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -x * (-1.0 + (y / a)) t_2 = t * (z / (z - a)) tmp = 0 if z <= -6.8e+128: tmp = t_2 elif z <= -1.7e-275: tmp = t_1 elif z <= 2.8e-222: tmp = t * (y / (a - z)) elif z <= 1.55e+90: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(-x) * Float64(-1.0 + Float64(y / a))) t_2 = Float64(t * Float64(z / Float64(z - a))) tmp = 0.0 if (z <= -6.8e+128) tmp = t_2; elseif (z <= -1.7e-275) tmp = t_1; elseif (z <= 2.8e-222) tmp = Float64(t * Float64(y / Float64(a - z))); elseif (z <= 1.55e+90) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -x * (-1.0 + (y / a)); t_2 = t * (z / (z - a)); tmp = 0.0; if (z <= -6.8e+128) tmp = t_2; elseif (z <= -1.7e-275) tmp = t_1; elseif (z <= 2.8e-222) tmp = t * (y / (a - z)); elseif (z <= 1.55e+90) tmp = t_1; else tmp = t_2; 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]}, Block[{t$95$2 = N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.8e+128], t$95$2, If[LessEqual[z, -1.7e-275], t$95$1, If[LessEqual[z, 2.8e-222], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.55e+90], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-x\right) \cdot \left(-1 + \frac{y}{a}\right)\\
t_2 := t \cdot \frac{z}{z - a}\\
\mathbf{if}\;z \leq -6.8 \cdot 10^{+128}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-275}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-222}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{+90}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -6.7999999999999997e128 or 1.54999999999999994e90 < z Initial program 34.6%
+-commutative34.6%
associate-/l*53.1%
fma-define53.2%
Simplified53.2%
Taylor expanded in y around 0 28.2%
mul-1-neg28.2%
associate-/l*44.8%
distribute-lft-neg-out44.8%
*-commutative44.8%
Simplified44.8%
Taylor expanded in x around 0 34.0%
mul-1-neg34.0%
associate-/l*58.3%
distribute-lft-neg-in58.3%
Simplified58.3%
if -6.7999999999999997e128 < z < -1.69999999999999984e-275 or 2.80000000000000007e-222 < z < 1.54999999999999994e90Initial program 79.6%
+-commutative79.6%
associate-/l*86.7%
fma-define86.7%
Simplified86.7%
Taylor expanded in x around -inf 81.5%
associate-*r*81.5%
neg-mul-181.5%
fma-define81.5%
times-frac86.5%
+-commutative86.5%
Simplified86.5%
Taylor expanded in x around inf 62.2%
mul-1-neg62.2%
*-commutative62.2%
distribute-rgt-neg-in62.2%
Simplified62.2%
Taylor expanded in z around 0 52.2%
if -1.69999999999999984e-275 < z < 2.80000000000000007e-222Initial program 96.6%
+-commutative96.6%
associate-/l*83.1%
fma-define83.1%
Simplified83.1%
Taylor expanded in y around -inf 67.0%
Taylor expanded in t around inf 63.6%
associate-/l*66.7%
Simplified66.7%
Final simplification56.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ z (- z a)))))
(if (<= z -2.5e+101)
t_1
(if (<= z -6e-65)
(* y (/ (- x t) z))
(if (<= z 6.4e-102) (/ (* y (- t x)) a) (if (<= z 2.45e-5) x t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (z / (z - a));
double tmp;
if (z <= -2.5e+101) {
tmp = t_1;
} else if (z <= -6e-65) {
tmp = y * ((x - t) / z);
} else if (z <= 6.4e-102) {
tmp = (y * (t - x)) / a;
} else if (z <= 2.45e-5) {
tmp = 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 * (z / (z - a))
if (z <= (-2.5d+101)) then
tmp = t_1
else if (z <= (-6d-65)) then
tmp = y * ((x - t) / z)
else if (z <= 6.4d-102) then
tmp = (y * (t - x)) / a
else if (z <= 2.45d-5) then
tmp = 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 * (z / (z - a));
double tmp;
if (z <= -2.5e+101) {
tmp = t_1;
} else if (z <= -6e-65) {
tmp = y * ((x - t) / z);
} else if (z <= 6.4e-102) {
tmp = (y * (t - x)) / a;
} else if (z <= 2.45e-5) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (z / (z - a)) tmp = 0 if z <= -2.5e+101: tmp = t_1 elif z <= -6e-65: tmp = y * ((x - t) / z) elif z <= 6.4e-102: tmp = (y * (t - x)) / a elif z <= 2.45e-5: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(z / Float64(z - a))) tmp = 0.0 if (z <= -2.5e+101) tmp = t_1; elseif (z <= -6e-65) tmp = Float64(y * Float64(Float64(x - t) / z)); elseif (z <= 6.4e-102) tmp = Float64(Float64(y * Float64(t - x)) / a); elseif (z <= 2.45e-5) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (z / (z - a)); tmp = 0.0; if (z <= -2.5e+101) tmp = t_1; elseif (z <= -6e-65) tmp = y * ((x - t) / z); elseif (z <= 6.4e-102) tmp = (y * (t - x)) / a; elseif (z <= 2.45e-5) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.5e+101], t$95$1, If[LessEqual[z, -6e-65], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.4e-102], N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 2.45e-5], x, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{z}{z - a}\\
\mathbf{if}\;z \leq -2.5 \cdot 10^{+101}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -6 \cdot 10^{-65}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\
\mathbf{elif}\;z \leq 6.4 \cdot 10^{-102}:\\
\;\;\;\;\frac{y \cdot \left(t - x\right)}{a}\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{-5}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.49999999999999994e101 or 2.45e-5 < z Initial program 39.9%
+-commutative39.9%
associate-/l*57.9%
fma-define57.9%
Simplified57.9%
Taylor expanded in y around 0 29.2%
mul-1-neg29.2%
associate-/l*46.4%
distribute-lft-neg-out46.4%
*-commutative46.4%
Simplified46.4%
Taylor expanded in x around 0 32.2%
mul-1-neg32.2%
associate-/l*54.0%
distribute-lft-neg-in54.0%
Simplified54.0%
if -2.49999999999999994e101 < z < -5.99999999999999996e-65Initial program 70.5%
+-commutative70.5%
associate-/l*80.3%
fma-define80.2%
Simplified80.2%
Taylor expanded in y around -inf 45.9%
Taylor expanded in a around 0 39.0%
mul-1-neg39.0%
associate-/l*43.8%
distribute-lft-neg-in43.8%
Simplified43.8%
if -5.99999999999999996e-65 < z < 6.39999999999999973e-102Initial program 91.7%
+-commutative91.7%
associate-/l*89.5%
fma-define89.6%
Simplified89.6%
Taylor expanded in y around -inf 60.6%
Taylor expanded in a around inf 55.0%
if 6.39999999999999973e-102 < z < 2.45e-5Initial program 79.5%
+-commutative79.5%
associate-/l*86.2%
fma-define86.5%
Simplified86.5%
Taylor expanded in a around inf 59.0%
Final simplification53.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.95e+69)
t
(if (<= z -1.25e-191)
x
(if (<= z 5.5e-105) (* t (/ y (- a z))) (if (<= z 1.6e-5) x t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.95e+69) {
tmp = t;
} else if (z <= -1.25e-191) {
tmp = x;
} else if (z <= 5.5e-105) {
tmp = t * (y / (a - z));
} else if (z <= 1.6e-5) {
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.95d+69)) then
tmp = t
else if (z <= (-1.25d-191)) then
tmp = x
else if (z <= 5.5d-105) then
tmp = t * (y / (a - z))
else if (z <= 1.6d-5) 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.95e+69) {
tmp = t;
} else if (z <= -1.25e-191) {
tmp = x;
} else if (z <= 5.5e-105) {
tmp = t * (y / (a - z));
} else if (z <= 1.6e-5) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.95e+69: tmp = t elif z <= -1.25e-191: tmp = x elif z <= 5.5e-105: tmp = t * (y / (a - z)) elif z <= 1.6e-5: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.95e+69) tmp = t; elseif (z <= -1.25e-191) tmp = x; elseif (z <= 5.5e-105) tmp = Float64(t * Float64(y / Float64(a - z))); elseif (z <= 1.6e-5) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.95e+69) tmp = t; elseif (z <= -1.25e-191) tmp = x; elseif (z <= 5.5e-105) tmp = t * (y / (a - z)); elseif (z <= 1.6e-5) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.95e+69], t, If[LessEqual[z, -1.25e-191], x, If[LessEqual[z, 5.5e-105], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e-5], x, t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.95 \cdot 10^{+69}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -1.25 \cdot 10^{-191}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-105}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-5}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -2.95000000000000002e69 or 1.59999999999999993e-5 < z Initial program 40.1%
+-commutative40.1%
associate-/l*57.4%
fma-define57.3%
Simplified57.3%
Taylor expanded in z around inf 48.1%
if -2.95000000000000002e69 < z < -1.25e-191 or 5.50000000000000029e-105 < z < 1.59999999999999993e-5Initial program 85.4%
+-commutative85.4%
associate-/l*91.1%
fma-define91.4%
Simplified91.4%
Taylor expanded in a around inf 44.6%
if -1.25e-191 < z < 5.50000000000000029e-105Initial program 90.4%
+-commutative90.4%
associate-/l*87.5%
fma-define87.5%
Simplified87.5%
Taylor expanded in y around -inf 62.2%
Taylor expanded in t around inf 48.0%
associate-/l*50.4%
Simplified50.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.62e+69) (not (<= z 5.6e+34))) (- t (* x (/ (- a y) z))) (+ x (* (- t x) (/ (- y z) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.62e+69) || !(z <= 5.6e+34)) {
tmp = t - (x * ((a - y) / z));
} else {
tmp = x + ((t - x) * ((y - z) / 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 <= (-1.62d+69)) .or. (.not. (z <= 5.6d+34))) then
tmp = t - (x * ((a - y) / z))
else
tmp = x + ((t - x) * ((y - z) / 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 <= -1.62e+69) || !(z <= 5.6e+34)) {
tmp = t - (x * ((a - y) / z));
} else {
tmp = x + ((t - x) * ((y - z) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.62e+69) or not (z <= 5.6e+34): tmp = t - (x * ((a - y) / z)) else: tmp = x + ((t - x) * ((y - z) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.62e+69) || !(z <= 5.6e+34)) tmp = Float64(t - Float64(x * Float64(Float64(a - y) / z))); else tmp = Float64(x + Float64(Float64(t - x) * Float64(Float64(y - z) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.62e+69) || ~((z <= 5.6e+34))) tmp = t - (x * ((a - y) / z)); else tmp = x + ((t - x) * ((y - z) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.62e+69], N[Not[LessEqual[z, 5.6e+34]], $MachinePrecision]], N[(t - N[(x * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.62 \cdot 10^{+69} \lor \neg \left(z \leq 5.6 \cdot 10^{+34}\right):\\
\;\;\;\;t - x \cdot \frac{a - y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a}\\
\end{array}
\end{array}
if z < -1.62e69 or 5.60000000000000016e34 < z Initial program 39.1%
+-commutative39.1%
associate-/l*56.7%
fma-define56.6%
Simplified56.6%
Taylor expanded in x around -inf 57.0%
mul-1-neg57.0%
distribute-rgt-neg-in57.0%
+-commutative57.0%
mul-1-neg57.0%
unsub-neg57.0%
associate-/r*48.7%
+-commutative48.7%
Simplified48.7%
Taylor expanded in z around inf 67.4%
Taylor expanded in z around inf 64.7%
mul-1-neg64.7%
unsub-neg64.7%
associate-/l*72.9%
neg-mul-172.9%
sub-neg72.9%
Simplified72.9%
if -1.62e69 < z < 5.60000000000000016e34Initial program 88.1%
+-commutative88.1%
associate-/l*89.4%
fma-define89.5%
Simplified89.5%
Taylor expanded in a around inf 76.9%
associate-/l*83.0%
Simplified83.0%
Final simplification78.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.65e+69)
(+ t (/ (* (- t x) (- a y)) z))
(if (<= z 1.6e+35)
(+ x (* (- t x) (/ (- y z) a)))
(- t (* x (/ (- a y) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.65e+69) {
tmp = t + (((t - x) * (a - y)) / z);
} else if (z <= 1.6e+35) {
tmp = x + ((t - x) * ((y - z) / a));
} else {
tmp = 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) :: tmp
if (z <= (-1.65d+69)) then
tmp = t + (((t - x) * (a - y)) / z)
else if (z <= 1.6d+35) then
tmp = x + ((t - x) * ((y - z) / a))
else
tmp = 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 tmp;
if (z <= -1.65e+69) {
tmp = t + (((t - x) * (a - y)) / z);
} else if (z <= 1.6e+35) {
tmp = x + ((t - x) * ((y - z) / a));
} else {
tmp = t - (x * ((a - y) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.65e+69: tmp = t + (((t - x) * (a - y)) / z) elif z <= 1.6e+35: tmp = x + ((t - x) * ((y - z) / a)) else: tmp = t - (x * ((a - y) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.65e+69) tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); elseif (z <= 1.6e+35) tmp = Float64(x + Float64(Float64(t - x) * Float64(Float64(y - z) / a))); else tmp = Float64(t - Float64(x * Float64(Float64(a - y) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.65e+69) tmp = t + (((t - x) * (a - y)) / z); elseif (z <= 1.6e+35) tmp = x + ((t - x) * ((y - z) / a)); else tmp = t - (x * ((a - y) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.65e+69], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e+35], N[(x + N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t - N[(x * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{+69}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+35}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a}\\
\mathbf{else}:\\
\;\;\;\;t - x \cdot \frac{a - y}{z}\\
\end{array}
\end{array}
if z < -1.6499999999999999e69Initial program 35.7%
+-commutative35.7%
associate-/l*56.2%
fma-define56.1%
Simplified56.1%
Taylor expanded in z around inf 65.0%
associate--l+65.0%
associate-*r/65.0%
associate-*r/65.0%
mul-1-neg65.0%
div-sub65.0%
mul-1-neg65.0%
distribute-lft-out--65.0%
associate-*r/65.0%
mul-1-neg65.0%
unsub-neg65.0%
distribute-rgt-out--66.7%
Simplified66.7%
if -1.6499999999999999e69 < z < 1.59999999999999991e35Initial program 88.1%
+-commutative88.1%
associate-/l*89.4%
fma-define89.5%
Simplified89.5%
Taylor expanded in a around inf 76.9%
associate-/l*83.0%
Simplified83.0%
if 1.59999999999999991e35 < z Initial program 42.7%
+-commutative42.7%
associate-/l*57.3%
fma-define57.1%
Simplified57.1%
Taylor expanded in x around -inf 52.3%
mul-1-neg52.3%
distribute-rgt-neg-in52.3%
+-commutative52.3%
mul-1-neg52.3%
unsub-neg52.3%
associate-/r*40.0%
+-commutative40.0%
Simplified40.0%
Taylor expanded in z around inf 65.0%
Taylor expanded in z around inf 66.0%
mul-1-neg66.0%
unsub-neg66.0%
associate-/l*79.5%
neg-mul-179.5%
sub-neg79.5%
Simplified79.5%
Final simplification78.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2e+69) (not (<= z 2.4e-6))) (- t (* x (/ (- a y) z))) (+ x (/ (- t x) (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2e+69) || !(z <= 2.4e-6)) {
tmp = t - (x * ((a - y) / z));
} else {
tmp = x + ((t - x) / (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 <= (-2d+69)) .or. (.not. (z <= 2.4d-6))) then
tmp = t - (x * ((a - y) / z))
else
tmp = x + ((t - x) / (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 <= -2e+69) || !(z <= 2.4e-6)) {
tmp = t - (x * ((a - y) / z));
} else {
tmp = x + ((t - x) / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2e+69) or not (z <= 2.4e-6): tmp = t - (x * ((a - y) / z)) else: tmp = x + ((t - x) / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2e+69) || !(z <= 2.4e-6)) tmp = Float64(t - Float64(x * Float64(Float64(a - y) / z))); else tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2e+69) || ~((z <= 2.4e-6))) tmp = t - (x * ((a - y) / z)); else tmp = x + ((t - x) / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2e+69], N[Not[LessEqual[z, 2.4e-6]], $MachinePrecision]], N[(t - N[(x * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+69} \lor \neg \left(z \leq 2.4 \cdot 10^{-6}\right):\\
\;\;\;\;t - x \cdot \frac{a - y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -2.0000000000000001e69 or 2.3999999999999999e-6 < z Initial program 40.1%
+-commutative40.1%
associate-/l*57.4%
fma-define57.3%
Simplified57.3%
Taylor expanded in x around -inf 57.7%
mul-1-neg57.7%
distribute-rgt-neg-in57.7%
+-commutative57.7%
mul-1-neg57.7%
unsub-neg57.7%
associate-/r*49.6%
+-commutative49.6%
Simplified49.6%
Taylor expanded in z around inf 67.9%
Taylor expanded in z around inf 64.5%
mul-1-neg64.5%
unsub-neg64.5%
associate-/l*72.5%
neg-mul-172.5%
sub-neg72.5%
Simplified72.5%
if -2.0000000000000001e69 < z < 2.3999999999999999e-6Initial program 88.0%
associate-/l*89.3%
Simplified89.3%
*-commutative89.3%
associate-*l/88.0%
associate-*r/94.9%
clear-num94.9%
un-div-inv94.9%
Applied egg-rr94.9%
Taylor expanded in z around 0 80.7%
Final simplification76.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -4.8) (not (<= x 2.45e+120))) (* (- x) (+ -1.0 (/ y a))) (* t (/ (- y z) (- a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -4.8) || !(x <= 2.45e+120)) {
tmp = -x * (-1.0 + (y / a));
} 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) :: tmp
if ((x <= (-4.8d0)) .or. (.not. (x <= 2.45d+120))) then
tmp = -x * ((-1.0d0) + (y / a))
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 tmp;
if ((x <= -4.8) || !(x <= 2.45e+120)) {
tmp = -x * (-1.0 + (y / a));
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -4.8) or not (x <= 2.45e+120): tmp = -x * (-1.0 + (y / a)) else: tmp = t * ((y - z) / (a - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -4.8) || !(x <= 2.45e+120)) tmp = Float64(Float64(-x) * Float64(-1.0 + Float64(y / a))); else tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -4.8) || ~((x <= 2.45e+120))) tmp = -x * (-1.0 + (y / a)); else tmp = t * ((y - z) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -4.8], N[Not[LessEqual[x, 2.45e+120]], $MachinePrecision]], N[((-x) * N[(-1.0 + N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.8 \lor \neg \left(x \leq 2.45 \cdot 10^{+120}\right):\\
\;\;\;\;\left(-x\right) \cdot \left(-1 + \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if x < -4.79999999999999982 or 2.45000000000000005e120 < x Initial program 53.1%
+-commutative53.1%
associate-/l*70.8%
fma-define70.7%
Simplified70.7%
Taylor expanded in x around -inf 68.3%
associate-*r*68.3%
neg-mul-168.3%
fma-define68.3%
times-frac86.0%
+-commutative86.0%
Simplified86.0%
Taylor expanded in x around inf 70.5%
mul-1-neg70.5%
*-commutative70.5%
distribute-rgt-neg-in70.5%
Simplified70.5%
Taylor expanded in z around 0 57.0%
if -4.79999999999999982 < x < 2.45000000000000005e120Initial program 74.3%
+-commutative74.3%
associate-/l*76.8%
fma-define76.9%
Simplified76.9%
Taylor expanded in t around inf 72.1%
div-sub72.2%
Simplified72.2%
Final simplification65.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.65e+69) (* x (+ (/ t x) (/ y z))) (if (<= z 5.6e-7) (+ x (/ (- t x) (/ a y))) (* t (/ (- y z) (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.65e+69) {
tmp = x * ((t / x) + (y / z));
} else if (z <= 5.6e-7) {
tmp = x + ((t - x) / (a / y));
} 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) :: tmp
if (z <= (-2.65d+69)) then
tmp = x * ((t / x) + (y / z))
else if (z <= 5.6d-7) then
tmp = x + ((t - x) / (a / y))
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 tmp;
if (z <= -2.65e+69) {
tmp = x * ((t / x) + (y / z));
} else if (z <= 5.6e-7) {
tmp = x + ((t - x) / (a / y));
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.65e+69: tmp = x * ((t / x) + (y / z)) elif z <= 5.6e-7: tmp = x + ((t - x) / (a / y)) else: tmp = t * ((y - z) / (a - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.65e+69) tmp = Float64(x * Float64(Float64(t / x) + Float64(y / z))); elseif (z <= 5.6e-7) tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); else tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.65e+69) tmp = x * ((t / x) + (y / z)); elseif (z <= 5.6e-7) tmp = x + ((t - x) / (a / y)); else tmp = t * ((y - z) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.65e+69], N[(x * N[(N[(t / x), $MachinePrecision] + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.6e-7], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.65 \cdot 10^{+69}:\\
\;\;\;\;x \cdot \left(\frac{t}{x} + \frac{y}{z}\right)\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{-7}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if z < -2.65e69Initial program 35.7%
+-commutative35.7%
associate-/l*56.2%
fma-define56.1%
Simplified56.1%
Taylor expanded in x around -inf 61.4%
mul-1-neg61.4%
distribute-rgt-neg-in61.4%
+-commutative61.4%
mul-1-neg61.4%
unsub-neg61.4%
associate-/r*56.8%
+-commutative56.8%
Simplified56.8%
Taylor expanded in z around inf 69.6%
Taylor expanded in a around 0 55.4%
cancel-sign-sub-inv55.4%
metadata-eval55.4%
*-lft-identity55.4%
Simplified55.4%
if -2.65e69 < z < 5.60000000000000038e-7Initial program 88.0%
associate-/l*89.3%
Simplified89.3%
*-commutative89.3%
associate-*l/88.0%
associate-*r/94.9%
clear-num94.9%
un-div-inv94.9%
Applied egg-rr94.9%
Taylor expanded in z around 0 80.7%
if 5.60000000000000038e-7 < z Initial program 44.6%
+-commutative44.6%
associate-/l*58.7%
fma-define58.6%
Simplified58.6%
Taylor expanded in t around inf 67.6%
div-sub67.6%
Simplified67.6%
(FPCore (x y z t a) :precision binary64 (if (<= z -4.8e+69) (* x (+ (/ t x) (/ y z))) (if (<= z 3.5e-6) (+ x (* y (/ (- t x) a))) (* t (/ (- y z) (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.8e+69) {
tmp = x * ((t / x) + (y / z));
} else if (z <= 3.5e-6) {
tmp = x + (y * ((t - x) / a));
} 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) :: tmp
if (z <= (-4.8d+69)) then
tmp = x * ((t / x) + (y / z))
else if (z <= 3.5d-6) then
tmp = x + (y * ((t - x) / a))
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 tmp;
if (z <= -4.8e+69) {
tmp = x * ((t / x) + (y / z));
} else if (z <= 3.5e-6) {
tmp = x + (y * ((t - x) / a));
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.8e+69: tmp = x * ((t / x) + (y / z)) elif z <= 3.5e-6: tmp = x + (y * ((t - x) / a)) else: tmp = t * ((y - z) / (a - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.8e+69) tmp = Float64(x * Float64(Float64(t / x) + Float64(y / z))); elseif (z <= 3.5e-6) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); else tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.8e+69) tmp = x * ((t / x) + (y / z)); elseif (z <= 3.5e-6) tmp = x + (y * ((t - x) / a)); else tmp = t * ((y - z) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.8e+69], N[(x * N[(N[(t / x), $MachinePrecision] + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.5e-6], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{+69}:\\
\;\;\;\;x \cdot \left(\frac{t}{x} + \frac{y}{z}\right)\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-6}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if z < -4.8000000000000003e69Initial program 35.7%
+-commutative35.7%
associate-/l*56.2%
fma-define56.1%
Simplified56.1%
Taylor expanded in x around -inf 61.4%
mul-1-neg61.4%
distribute-rgt-neg-in61.4%
+-commutative61.4%
mul-1-neg61.4%
unsub-neg61.4%
associate-/r*56.8%
+-commutative56.8%
Simplified56.8%
Taylor expanded in z around inf 69.6%
Taylor expanded in a around 0 55.4%
cancel-sign-sub-inv55.4%
metadata-eval55.4%
*-lft-identity55.4%
Simplified55.4%
if -4.8000000000000003e69 < z < 3.49999999999999995e-6Initial program 88.0%
+-commutative88.0%
associate-/l*89.3%
fma-define89.4%
Simplified89.4%
Taylor expanded in z around 0 76.0%
associate-/l*76.4%
Simplified76.4%
if 3.49999999999999995e-6 < z Initial program 44.6%
+-commutative44.6%
associate-/l*58.7%
fma-define58.6%
Simplified58.6%
Taylor expanded in t around inf 67.6%
div-sub67.6%
Simplified67.6%
(FPCore (x y z t a) :precision binary64 (if (<= a -8.6e+74) x (if (<= a 3.8e+56) t x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -8.6e+74) {
tmp = x;
} else if (a <= 3.8e+56) {
tmp = t;
} else {
tmp = x;
}
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 (a <= (-8.6d+74)) then
tmp = x
else if (a <= 3.8d+56) then
tmp = t
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -8.6e+74) {
tmp = x;
} else if (a <= 3.8e+56) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -8.6e+74: tmp = x elif a <= 3.8e+56: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -8.6e+74) tmp = x; elseif (a <= 3.8e+56) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -8.6e+74) tmp = x; elseif (a <= 3.8e+56) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -8.6e+74], x, If[LessEqual[a, 3.8e+56], t, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.6 \cdot 10^{+74}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 3.8 \cdot 10^{+56}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -8.60000000000000001e74 or 3.79999999999999996e56 < a Initial program 69.3%
+-commutative69.3%
associate-/l*86.1%
fma-define86.2%
Simplified86.2%
Taylor expanded in a around inf 56.6%
if -8.60000000000000001e74 < a < 3.79999999999999996e56Initial program 63.4%
+-commutative63.4%
associate-/l*67.6%
fma-define67.6%
Simplified67.6%
Taylor expanded in z around inf 34.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 65.5%
+-commutative65.5%
associate-/l*74.3%
fma-define74.4%
Simplified74.4%
Taylor expanded in z around inf 26.6%
(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 2024111
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
:precision binary64
:alt
(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))))