
(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(y - z) * Float64(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[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 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(y - z) * Float64(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[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -2e-290) (not (<= t_1 0.0)))
(fma (- t x) (/ (- y z) (- a z)) x)
(+ t (* x (/ (+ y (- (- (* a (/ t x)) (* t (/ y x))) a)) z))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -2e-290) || !(t_1 <= 0.0)) {
tmp = fma((t - x), ((y - z) / (a - z)), x);
} else {
tmp = t + (x * ((y + (((a * (t / x)) - (t * (y / x))) - a)) / z));
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if ((t_1 <= -2e-290) || !(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(y + Float64(Float64(Float64(a * Float64(t / x)) - Float64(t * Float64(y / x))) - a)) / z))); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-290], 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[(y + N[(N[(N[(a * N[(t / x), $MachinePrecision]), $MachinePrecision] - N[(t * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-290} \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{y + \left(\left(a \cdot \frac{t}{x} - t \cdot \frac{y}{x}\right) - a\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2.0000000000000001e-290 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 88.0%
+-commutative88.0%
remove-double-neg88.0%
unsub-neg88.0%
*-commutative88.0%
associate-*l/76.2%
associate-/l*93.9%
fma-neg93.9%
remove-double-neg93.9%
Simplified93.9%
if -2.0000000000000001e-290 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.5%
+-commutative3.5%
remove-double-neg3.5%
unsub-neg3.5%
*-commutative3.5%
associate-*l/3.2%
associate-/l*3.5%
fma-neg3.5%
remove-double-neg3.5%
Simplified3.5%
Taylor expanded in x around -inf 40.4%
associate-*r*40.4%
neg-mul-140.4%
fma-define40.4%
times-frac57.1%
+-commutative57.1%
Simplified57.1%
Taylor expanded in z around -inf 69.3%
associate-/l*87.5%
distribute-lft-out--87.5%
associate--l+87.5%
distribute-lft-out--87.5%
mul-1-neg87.5%
associate-/l*92.4%
associate-/l*97.4%
Simplified97.4%
Final simplification94.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (- y z) (/ (- a z) (- t x)))))
(t_2 (+ (/ z (- a z)) 1.0))
(t_3 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (<= t_3 (- INFINITY))
(* x (+ t_2 (* t (- (/ (/ (- y z) x) (- a z)) (/ (/ y t) (- a z))))))
(if (<= t_3 -2e-290)
t_1
(if (<= t_3 0.0)
(+ t (* x (/ (+ y (- (- (* a (/ t x)) (* t (/ y x))) a)) z)))
(if (<= t_3 1e-45)
(* t (+ (/ (- y z) (- a z)) (/ (* x (+ t_2 (/ y (- z a)))) t)))
t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) / ((a - z) / (t - x)));
double t_2 = (z / (a - z)) + 1.0;
double t_3 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = x * (t_2 + (t * ((((y - z) / x) / (a - z)) - ((y / t) / (a - z)))));
} else if (t_3 <= -2e-290) {
tmp = t_1;
} else if (t_3 <= 0.0) {
tmp = t + (x * ((y + (((a * (t / x)) - (t * (y / x))) - a)) / z));
} else if (t_3 <= 1e-45) {
tmp = t * (((y - z) / (a - z)) + ((x * (t_2 + (y / (z - a)))) / t));
} 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) / ((a - z) / (t - x)));
double t_2 = (z / (a - z)) + 1.0;
double t_3 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = x * (t_2 + (t * ((((y - z) / x) / (a - z)) - ((y / t) / (a - z)))));
} else if (t_3 <= -2e-290) {
tmp = t_1;
} else if (t_3 <= 0.0) {
tmp = t + (x * ((y + (((a * (t / x)) - (t * (y / x))) - a)) / z));
} else if (t_3 <= 1e-45) {
tmp = t * (((y - z) / (a - z)) + ((x * (t_2 + (y / (z - a)))) / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) / ((a - z) / (t - x))) t_2 = (z / (a - z)) + 1.0 t_3 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if t_3 <= -math.inf: tmp = x * (t_2 + (t * ((((y - z) / x) / (a - z)) - ((y / t) / (a - z))))) elif t_3 <= -2e-290: tmp = t_1 elif t_3 <= 0.0: tmp = t + (x * ((y + (((a * (t / x)) - (t * (y / x))) - a)) / z)) elif t_3 <= 1e-45: tmp = t * (((y - z) / (a - z)) + ((x * (t_2 + (y / (z - a)))) / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))) t_2 = Float64(Float64(z / Float64(a - z)) + 1.0) t_3 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = Float64(x * Float64(t_2 + Float64(t * Float64(Float64(Float64(Float64(y - z) / x) / Float64(a - z)) - Float64(Float64(y / t) / Float64(a - z)))))); elseif (t_3 <= -2e-290) tmp = t_1; elseif (t_3 <= 0.0) tmp = Float64(t + Float64(x * Float64(Float64(y + Float64(Float64(Float64(a * Float64(t / x)) - Float64(t * Float64(y / x))) - a)) / z))); elseif (t_3 <= 1e-45) tmp = Float64(t * Float64(Float64(Float64(y - z) / Float64(a - z)) + Float64(Float64(x * Float64(t_2 + Float64(y / Float64(z - a)))) / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) / ((a - z) / (t - x))); t_2 = (z / (a - z)) + 1.0; t_3 = x + ((y - z) * ((t - x) / (a - z))); tmp = 0.0; if (t_3 <= -Inf) tmp = x * (t_2 + (t * ((((y - z) / x) / (a - z)) - ((y / t) / (a - z))))); elseif (t_3 <= -2e-290) tmp = t_1; elseif (t_3 <= 0.0) tmp = t + (x * ((y + (((a * (t / x)) - (t * (y / x))) - a)) / z)); elseif (t_3 <= 1e-45) tmp = t * (((y - z) / (a - z)) + ((x * (t_2 + (y / (z - a)))) / t)); 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[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z / N[(a - z), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(x * N[(t$95$2 + N[(t * N[(N[(N[(N[(y - z), $MachinePrecision] / x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] - N[(N[(y / t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, -2e-290], t$95$1, If[LessEqual[t$95$3, 0.0], N[(t + N[(x * N[(N[(y + N[(N[(N[(a * N[(t / x), $MachinePrecision]), $MachinePrecision] - N[(t * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 1e-45], N[(t * N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + N[(N[(x * N[(t$95$2 + N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - z}{\frac{a - z}{t - x}}\\
t_2 := \frac{z}{a - z} + 1\\
t_3 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;x \cdot \left(t\_2 + t \cdot \left(\frac{\frac{y - z}{x}}{a - z} - \frac{\frac{y}{t}}{a - z}\right)\right)\\
\mathbf{elif}\;t\_3 \leq -2 \cdot 10^{-290}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;t + x \cdot \frac{y + \left(\left(a \cdot \frac{t}{x} - t \cdot \frac{y}{x}\right) - a\right)}{z}\\
\mathbf{elif}\;t\_3 \leq 10^{-45}:\\
\;\;\;\;t \cdot \left(\frac{y - z}{a - z} + \frac{x \cdot \left(t\_2 + \frac{y}{z - a}\right)}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -inf.0Initial program 79.9%
+-commutative79.9%
remove-double-neg79.9%
unsub-neg79.9%
*-commutative79.9%
associate-*l/95.7%
associate-/l*95.7%
fma-neg95.7%
remove-double-neg95.7%
Simplified95.7%
Taylor expanded in x around -inf 91.3%
associate-*r*91.3%
neg-mul-191.3%
fma-define91.3%
times-frac95.5%
+-commutative95.5%
Simplified95.5%
Taylor expanded in t around -inf 88.0%
associate-*r*88.0%
neg-mul-188.0%
associate--l+88.0%
mul-1-neg88.0%
associate-/r*96.0%
div-sub96.0%
associate-/r*100.0%
Simplified100.0%
if -inf.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2.0000000000000001e-290 or 9.99999999999999984e-46 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 91.9%
clear-num91.9%
un-div-inv92.1%
Applied egg-rr92.1%
if -2.0000000000000001e-290 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.5%
+-commutative3.5%
remove-double-neg3.5%
unsub-neg3.5%
*-commutative3.5%
associate-*l/3.2%
associate-/l*3.5%
fma-neg3.5%
remove-double-neg3.5%
Simplified3.5%
Taylor expanded in x around -inf 40.4%
associate-*r*40.4%
neg-mul-140.4%
fma-define40.4%
times-frac57.1%
+-commutative57.1%
Simplified57.1%
Taylor expanded in z around -inf 69.3%
associate-/l*87.5%
distribute-lft-out--87.5%
associate--l+87.5%
distribute-lft-out--87.5%
mul-1-neg87.5%
associate-/l*92.4%
associate-/l*97.4%
Simplified97.4%
if 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 9.99999999999999984e-46Initial program 65.7%
+-commutative65.7%
remove-double-neg65.7%
unsub-neg65.7%
*-commutative65.7%
associate-*l/94.6%
associate-/l*90.7%
fma-neg90.7%
remove-double-neg90.7%
Simplified90.7%
Taylor expanded in x around -inf 99.9%
associate-*r*99.9%
neg-mul-199.9%
fma-define99.9%
times-frac95.2%
+-commutative95.2%
Simplified95.2%
Taylor expanded in t around inf 95.5%
associate--l+95.5%
associate-*r/95.5%
associate-*r*95.5%
mul-1-neg95.5%
div-sub95.5%
Simplified95.5%
Final simplification93.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (- y z) (/ (- a z) (- t x)))))
(t_2 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (<= t_2 -2e-290)
t_1
(if (<= t_2 0.0)
(+ t (* x (/ (+ y (- (- (* a (/ t x)) (* t (/ y x))) a)) z)))
(if (<= t_2 1e-45)
(*
t
(+
(/ (- y z) (- a z))
(/ (* x (+ (+ (/ z (- a z)) 1.0) (/ y (- z a)))) t)))
t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) / ((a - z) / (t - x)));
double t_2 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (t_2 <= -2e-290) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = t + (x * ((y + (((a * (t / x)) - (t * (y / x))) - a)) / z));
} else if (t_2 <= 1e-45) {
tmp = t * (((y - z) / (a - z)) + ((x * (((z / (a - z)) + 1.0) + (y / (z - a)))) / t));
} 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) :: t_2
real(8) :: tmp
t_1 = x + ((y - z) / ((a - z) / (t - x)))
t_2 = x + ((y - z) * ((t - x) / (a - z)))
if (t_2 <= (-2d-290)) then
tmp = t_1
else if (t_2 <= 0.0d0) then
tmp = t + (x * ((y + (((a * (t / x)) - (t * (y / x))) - a)) / z))
else if (t_2 <= 1d-45) then
tmp = t * (((y - z) / (a - z)) + ((x * (((z / (a - z)) + 1.0d0) + (y / (z - a)))) / t))
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 = x + ((y - z) / ((a - z) / (t - x)));
double t_2 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (t_2 <= -2e-290) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = t + (x * ((y + (((a * (t / x)) - (t * (y / x))) - a)) / z));
} else if (t_2 <= 1e-45) {
tmp = t * (((y - z) / (a - z)) + ((x * (((z / (a - z)) + 1.0) + (y / (z - a)))) / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) / ((a - z) / (t - x))) t_2 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if t_2 <= -2e-290: tmp = t_1 elif t_2 <= 0.0: tmp = t + (x * ((y + (((a * (t / x)) - (t * (y / x))) - a)) / z)) elif t_2 <= 1e-45: tmp = t * (((y - z) / (a - z)) + ((x * (((z / (a - z)) + 1.0) + (y / (z - a)))) / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))) t_2 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if (t_2 <= -2e-290) tmp = t_1; elseif (t_2 <= 0.0) tmp = Float64(t + Float64(x * Float64(Float64(y + Float64(Float64(Float64(a * Float64(t / x)) - Float64(t * Float64(y / x))) - a)) / z))); elseif (t_2 <= 1e-45) tmp = Float64(t * Float64(Float64(Float64(y - z) / Float64(a - z)) + Float64(Float64(x * Float64(Float64(Float64(z / Float64(a - z)) + 1.0) + Float64(y / Float64(z - a)))) / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) / ((a - z) / (t - x))); t_2 = x + ((y - z) * ((t - x) / (a - z))); tmp = 0.0; if (t_2 <= -2e-290) tmp = t_1; elseif (t_2 <= 0.0) tmp = t + (x * ((y + (((a * (t / x)) - (t * (y / x))) - a)) / z)); elseif (t_2 <= 1e-45) tmp = t * (((y - z) / (a - z)) + ((x * (((z / (a - z)) + 1.0) + (y / (z - a)))) / t)); 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[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e-290], t$95$1, If[LessEqual[t$95$2, 0.0], N[(t + N[(x * N[(N[(y + N[(N[(N[(a * N[(t / x), $MachinePrecision]), $MachinePrecision] - N[(t * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e-45], N[(t * N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + N[(N[(x * N[(N[(N[(z / N[(a - z), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] + N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - z}{\frac{a - z}{t - x}}\\
t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{-290}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t + x \cdot \frac{y + \left(\left(a \cdot \frac{t}{x} - t \cdot \frac{y}{x}\right) - a\right)}{z}\\
\mathbf{elif}\;t\_2 \leq 10^{-45}:\\
\;\;\;\;t \cdot \left(\frac{y - z}{a - z} + \frac{x \cdot \left(\left(\frac{z}{a - z} + 1\right) + \frac{y}{z - a}\right)}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2.0000000000000001e-290 or 9.99999999999999984e-46 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 90.5%
clear-num90.5%
un-div-inv90.6%
Applied egg-rr90.6%
if -2.0000000000000001e-290 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.5%
+-commutative3.5%
remove-double-neg3.5%
unsub-neg3.5%
*-commutative3.5%
associate-*l/3.2%
associate-/l*3.5%
fma-neg3.5%
remove-double-neg3.5%
Simplified3.5%
Taylor expanded in x around -inf 40.4%
associate-*r*40.4%
neg-mul-140.4%
fma-define40.4%
times-frac57.1%
+-commutative57.1%
Simplified57.1%
Taylor expanded in z around -inf 69.3%
associate-/l*87.5%
distribute-lft-out--87.5%
associate--l+87.5%
distribute-lft-out--87.5%
mul-1-neg87.5%
associate-/l*92.4%
associate-/l*97.4%
Simplified97.4%
if 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 9.99999999999999984e-46Initial program 65.7%
+-commutative65.7%
remove-double-neg65.7%
unsub-neg65.7%
*-commutative65.7%
associate-*l/94.6%
associate-/l*90.7%
fma-neg90.7%
remove-double-neg90.7%
Simplified90.7%
Taylor expanded in x around -inf 99.9%
associate-*r*99.9%
neg-mul-199.9%
fma-define99.9%
times-frac95.2%
+-commutative95.2%
Simplified95.2%
Taylor expanded in t around inf 95.5%
associate--l+95.5%
associate-*r/95.5%
associate-*r*95.5%
mul-1-neg95.5%
div-sub95.5%
Simplified95.5%
Final simplification92.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (- y z) (/ (- a z) (- t x)))))
(t_2 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (<= t_2 -2e-290)
t_1
(if (<= t_2 5e-281)
(+ t (* x (/ (+ y (- (- (* a (/ t x)) (* t (/ y x))) a)) z)))
(if (<= t_2 1e-45)
(+ x (/ -1.0 (/ (- a z) (* (- y z) (- x t)))))
t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) / ((a - z) / (t - x)));
double t_2 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (t_2 <= -2e-290) {
tmp = t_1;
} else if (t_2 <= 5e-281) {
tmp = t + (x * ((y + (((a * (t / x)) - (t * (y / x))) - a)) / z));
} else if (t_2 <= 1e-45) {
tmp = x + (-1.0 / ((a - z) / ((y - z) * (x - t))));
} 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) :: t_2
real(8) :: tmp
t_1 = x + ((y - z) / ((a - z) / (t - x)))
t_2 = x + ((y - z) * ((t - x) / (a - z)))
if (t_2 <= (-2d-290)) then
tmp = t_1
else if (t_2 <= 5d-281) then
tmp = t + (x * ((y + (((a * (t / x)) - (t * (y / x))) - a)) / z))
else if (t_2 <= 1d-45) then
tmp = x + ((-1.0d0) / ((a - z) / ((y - z) * (x - t))))
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 = x + ((y - z) / ((a - z) / (t - x)));
double t_2 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (t_2 <= -2e-290) {
tmp = t_1;
} else if (t_2 <= 5e-281) {
tmp = t + (x * ((y + (((a * (t / x)) - (t * (y / x))) - a)) / z));
} else if (t_2 <= 1e-45) {
tmp = x + (-1.0 / ((a - z) / ((y - z) * (x - t))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) / ((a - z) / (t - x))) t_2 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if t_2 <= -2e-290: tmp = t_1 elif t_2 <= 5e-281: tmp = t + (x * ((y + (((a * (t / x)) - (t * (y / x))) - a)) / z)) elif t_2 <= 1e-45: tmp = x + (-1.0 / ((a - z) / ((y - z) * (x - t)))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))) t_2 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if (t_2 <= -2e-290) tmp = t_1; elseif (t_2 <= 5e-281) tmp = Float64(t + Float64(x * Float64(Float64(y + Float64(Float64(Float64(a * Float64(t / x)) - Float64(t * Float64(y / x))) - a)) / z))); elseif (t_2 <= 1e-45) tmp = Float64(x + Float64(-1.0 / Float64(Float64(a - z) / Float64(Float64(y - z) * Float64(x - t))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) / ((a - z) / (t - x))); t_2 = x + ((y - z) * ((t - x) / (a - z))); tmp = 0.0; if (t_2 <= -2e-290) tmp = t_1; elseif (t_2 <= 5e-281) tmp = t + (x * ((y + (((a * (t / x)) - (t * (y / x))) - a)) / z)); elseif (t_2 <= 1e-45) tmp = x + (-1.0 / ((a - z) / ((y - z) * (x - t)))); 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[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e-290], t$95$1, If[LessEqual[t$95$2, 5e-281], N[(t + N[(x * N[(N[(y + N[(N[(N[(a * N[(t / x), $MachinePrecision]), $MachinePrecision] - N[(t * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e-45], N[(x + N[(-1.0 / N[(N[(a - z), $MachinePrecision] / N[(N[(y - z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - z}{\frac{a - z}{t - x}}\\
t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{-290}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-281}:\\
\;\;\;\;t + x \cdot \frac{y + \left(\left(a \cdot \frac{t}{x} - t \cdot \frac{y}{x}\right) - a\right)}{z}\\
\mathbf{elif}\;t\_2 \leq 10^{-45}:\\
\;\;\;\;x + \frac{-1}{\frac{a - z}{\left(y - z\right) \cdot \left(x - t\right)}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2.0000000000000001e-290 or 9.99999999999999984e-46 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 90.5%
clear-num90.5%
un-div-inv90.6%
Applied egg-rr90.6%
if -2.0000000000000001e-290 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 4.9999999999999998e-281Initial program 3.5%
+-commutative3.5%
remove-double-neg3.5%
unsub-neg3.5%
*-commutative3.5%
associate-*l/5.7%
associate-/l*6.0%
fma-neg6.0%
remove-double-neg6.0%
Simplified6.0%
Taylor expanded in x around -inf 41.9%
associate-*r*41.9%
neg-mul-141.9%
fma-define41.9%
times-frac58.2%
+-commutative58.2%
Simplified58.2%
Taylor expanded in z around -inf 70.1%
associate-/l*87.8%
distribute-lft-out--87.8%
associate--l+87.8%
distribute-lft-out--87.8%
mul-1-neg87.8%
associate-/l*92.5%
associate-/l*97.4%
Simplified97.4%
if 4.9999999999999998e-281 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 9.99999999999999984e-46Initial program 68.6%
associate-*r/94.4%
clear-num94.2%
Applied egg-rr94.2%
Final simplification92.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -2e-290) (not (<= t_1 1e-246)))
t_1
(+ t (/ (* (- t x) (- a y)) z)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -2e-290) || !(t_1 <= 1e-246)) {
tmp = t_1;
} 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 + ((y - z) * ((t - x) / (a - z)))
if ((t_1 <= (-2d-290)) .or. (.not. (t_1 <= 1d-246))) then
tmp = t_1
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 + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -2e-290) || !(t_1 <= 1e-246)) {
tmp = t_1;
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -2e-290) or not (t_1 <= 1e-246): tmp = t_1 else: tmp = t + (((t - x) * (a - y)) / z) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if ((t_1 <= -2e-290) || !(t_1 <= 1e-246)) tmp = t_1; 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 + ((y - z) * ((t - x) / (a - z))); tmp = 0.0; if ((t_1 <= -2e-290) || ~((t_1 <= 1e-246))) tmp = t_1; 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[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-290], N[Not[LessEqual[t$95$1, 1e-246]], $MachinePrecision]], t$95$1, 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 + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-290} \lor \neg \left(t\_1 \leq 10^{-246}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2.0000000000000001e-290 or 9.99999999999999956e-247 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 89.6%
if -2.0000000000000001e-290 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 9.99999999999999956e-247Initial program 3.7%
+-commutative3.7%
remove-double-neg3.7%
unsub-neg3.7%
*-commutative3.7%
associate-*l/12.4%
associate-/l*12.7%
fma-neg12.7%
remove-double-neg12.7%
Simplified12.7%
Taylor expanded in z around inf 70.0%
associate--l+70.0%
associate-*r/70.0%
associate-*r/70.0%
mul-1-neg70.0%
div-sub69.9%
mul-1-neg69.9%
distribute-lft-out--69.9%
associate-*r/69.9%
mul-1-neg69.9%
unsub-neg69.9%
distribute-rgt-out--70.0%
Simplified70.0%
Final simplification86.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (<= t_1 -2e-290)
(+ x (/ (- y z) (/ (- a z) (- t x))))
(if (<= t_1 1e-246) (+ t (/ (* (- t x) (- a y)) z)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (t_1 <= -2e-290) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else if (t_1 <= 1e-246) {
tmp = t + (((t - x) * (a - y)) / z);
} 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 = x + ((y - z) * ((t - x) / (a - z)))
if (t_1 <= (-2d-290)) then
tmp = x + ((y - z) / ((a - z) / (t - x)))
else if (t_1 <= 1d-246) then
tmp = t + (((t - x) * (a - y)) / z)
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 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (t_1 <= -2e-290) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else if (t_1 <= 1e-246) {
tmp = t + (((t - x) * (a - y)) / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if t_1 <= -2e-290: tmp = x + ((y - z) / ((a - z) / (t - x))) elif t_1 <= 1e-246: tmp = t + (((t - x) * (a - y)) / z) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if (t_1 <= -2e-290) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))); elseif (t_1 <= 1e-246) tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); tmp = 0.0; if (t_1 <= -2e-290) tmp = x + ((y - z) / ((a - z) / (t - x))); elseif (t_1 <= 1e-246) tmp = t + (((t - x) * (a - y)) / z); 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[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-290], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-246], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-290}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\mathbf{elif}\;t\_1 \leq 10^{-246}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2.0000000000000001e-290Initial program 91.1%
clear-num91.0%
un-div-inv91.2%
Applied egg-rr91.2%
if -2.0000000000000001e-290 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 9.99999999999999956e-247Initial program 3.7%
+-commutative3.7%
remove-double-neg3.7%
unsub-neg3.7%
*-commutative3.7%
associate-*l/12.4%
associate-/l*12.7%
fma-neg12.7%
remove-double-neg12.7%
Simplified12.7%
Taylor expanded in z around inf 70.0%
associate--l+70.0%
associate-*r/70.0%
associate-*r/70.0%
mul-1-neg70.0%
div-sub69.9%
mul-1-neg69.9%
distribute-lft-out--69.9%
associate-*r/69.9%
mul-1-neg69.9%
unsub-neg69.9%
distribute-rgt-out--70.0%
Simplified70.0%
if 9.99999999999999956e-247 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 87.7%
Final simplification86.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.08e-190) (not (<= t 1.65e-131))) (+ x (* t (/ (- y z) (- a z)))) (* x (+ (/ (- y z) (- z a)) 1.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.08e-190) || !(t <= 1.65e-131)) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = x * (((y - z) / (z - a)) + 1.0);
}
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 ((t <= (-1.08d-190)) .or. (.not. (t <= 1.65d-131))) then
tmp = x + (t * ((y - z) / (a - z)))
else
tmp = x * (((y - z) / (z - a)) + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.08e-190) || !(t <= 1.65e-131)) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = x * (((y - z) / (z - a)) + 1.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.08e-190) or not (t <= 1.65e-131): tmp = x + (t * ((y - z) / (a - z))) else: tmp = x * (((y - z) / (z - a)) + 1.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.08e-190) || !(t <= 1.65e-131)) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); else tmp = Float64(x * Float64(Float64(Float64(y - z) / Float64(z - a)) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.08e-190) || ~((t <= 1.65e-131))) tmp = x + (t * ((y - z) / (a - z))); else tmp = x * (((y - z) / (z - a)) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.08e-190], N[Not[LessEqual[t, 1.65e-131]], $MachinePrecision]], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(N[(y - z), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.08 \cdot 10^{-190} \lor \neg \left(t \leq 1.65 \cdot 10^{-131}\right):\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y - z}{z - a} + 1\right)\\
\end{array}
\end{array}
if t < -1.08e-190 or 1.6500000000000001e-131 < t Initial program 81.9%
Taylor expanded in t around inf 58.4%
associate-/l*73.3%
Simplified73.3%
if -1.08e-190 < t < 1.6500000000000001e-131Initial program 56.1%
+-commutative56.1%
remove-double-neg56.1%
unsub-neg56.1%
*-commutative56.1%
associate-*l/62.5%
associate-/l*65.5%
fma-neg65.5%
remove-double-neg65.5%
Simplified65.5%
Taylor expanded in t around 0 58.7%
mul-1-neg58.7%
*-rgt-identity58.7%
associate-/l*61.7%
distribute-rgt-neg-in61.7%
mul-1-neg61.7%
distribute-lft-in61.7%
mul-1-neg61.7%
unsub-neg61.7%
Simplified61.7%
Final simplification70.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -5.5e+21)
(+ x (* t (/ (- y z) (- a z))))
(if (<= z 1.1e+151)
(+ x (* (- t x) (/ y (- a z))))
(/ t (/ (- a z) (- y z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.5e+21) {
tmp = x + (t * ((y - z) / (a - z)));
} else if (z <= 1.1e+151) {
tmp = x + ((t - x) * (y / (a - z)));
} else {
tmp = t / ((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) :: tmp
if (z <= (-5.5d+21)) then
tmp = x + (t * ((y - z) / (a - z)))
else if (z <= 1.1d+151) then
tmp = x + ((t - x) * (y / (a - z)))
else
tmp = t / ((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 tmp;
if (z <= -5.5e+21) {
tmp = x + (t * ((y - z) / (a - z)));
} else if (z <= 1.1e+151) {
tmp = x + ((t - x) * (y / (a - z)));
} else {
tmp = t / ((a - z) / (y - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5.5e+21: tmp = x + (t * ((y - z) / (a - z))) elif z <= 1.1e+151: tmp = x + ((t - x) * (y / (a - z))) else: tmp = t / ((a - z) / (y - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.5e+21) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); elseif (z <= 1.1e+151) tmp = Float64(x + Float64(Float64(t - x) * Float64(y / Float64(a - z)))); else tmp = Float64(t / Float64(Float64(a - z) / Float64(y - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5.5e+21) tmp = x + (t * ((y - z) / (a - z))); elseif (z <= 1.1e+151) tmp = x + ((t - x) * (y / (a - z))); else tmp = t / ((a - z) / (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.5e+21], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1e+151], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{+21}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+151}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\
\end{array}
\end{array}
if z < -5.5e21Initial program 63.0%
Taylor expanded in t around inf 37.4%
associate-/l*58.1%
Simplified58.1%
if -5.5e21 < z < 1.10000000000000003e151Initial program 86.8%
Taylor expanded in y around inf 77.1%
*-commutative77.1%
*-lft-identity77.1%
times-frac83.3%
/-rgt-identity83.3%
Simplified83.3%
if 1.10000000000000003e151 < z Initial program 53.1%
+-commutative53.1%
remove-double-neg53.1%
unsub-neg53.1%
*-commutative53.1%
associate-*l/34.8%
associate-/l*62.7%
fma-neg62.7%
remove-double-neg62.7%
Simplified62.7%
Taylor expanded in x around -inf 43.6%
associate-*r*43.6%
neg-mul-143.6%
fma-define43.6%
times-frac71.0%
+-commutative71.0%
Simplified71.0%
Taylor expanded in t around inf 78.9%
associate--l+78.9%
associate-*r/78.9%
associate-*r*78.9%
mul-1-neg78.9%
div-sub78.9%
Simplified78.9%
Taylor expanded in t around inf 70.4%
div-sub70.4%
Simplified70.4%
clear-num70.4%
un-div-inv70.4%
Applied egg-rr70.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.3e-64) (not (<= z 1.9e+83))) (/ t (/ (- a z) (- y z))) (+ x (* (- t x) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.3e-64) || !(z <= 1.9e+83)) {
tmp = t / ((a - z) / (y - z));
} else {
tmp = x + ((t - x) * (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.3d-64)) .or. (.not. (z <= 1.9d+83))) then
tmp = t / ((a - z) / (y - z))
else
tmp = x + ((t - x) * (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.3e-64) || !(z <= 1.9e+83)) {
tmp = t / ((a - z) / (y - z));
} else {
tmp = x + ((t - x) * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.3e-64) or not (z <= 1.9e+83): tmp = t / ((a - z) / (y - z)) else: tmp = x + ((t - x) * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.3e-64) || !(z <= 1.9e+83)) tmp = Float64(t / Float64(Float64(a - z) / Float64(y - z))); else tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.3e-64) || ~((z <= 1.9e+83))) tmp = t / ((a - z) / (y - z)); else tmp = x + ((t - x) * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.3e-64], N[Not[LessEqual[z, 1.9e+83]], $MachinePrecision]], N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{-64} \lor \neg \left(z \leq 1.9 \cdot 10^{+83}\right):\\
\;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -2.3000000000000001e-64 or 1.9000000000000001e83 < z Initial program 62.9%
+-commutative62.9%
remove-double-neg62.9%
unsub-neg62.9%
*-commutative62.9%
associate-*l/43.3%
associate-/l*68.2%
fma-neg68.2%
remove-double-neg68.2%
Simplified68.2%
Taylor expanded in x around -inf 51.8%
associate-*r*51.8%
neg-mul-151.8%
fma-define51.8%
times-frac73.5%
+-commutative73.5%
Simplified73.5%
Taylor expanded in t around inf 78.6%
associate--l+78.6%
associate-*r/78.6%
associate-*r*78.6%
mul-1-neg78.6%
div-sub78.6%
Simplified78.6%
Taylor expanded in t around inf 57.5%
div-sub57.5%
Simplified57.5%
clear-num57.5%
un-div-inv57.6%
Applied egg-rr57.6%
if -2.3000000000000001e-64 < z < 1.9000000000000001e83Initial program 89.0%
Taylor expanded in y around inf 84.6%
*-commutative84.6%
*-lft-identity84.6%
times-frac89.1%
/-rgt-identity89.1%
Simplified89.1%
Taylor expanded in a around inf 78.9%
Final simplification67.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.8e-69) (not (<= z 2.35e+83))) (* t (/ (- y z) (- a z))) (+ x (* (- t x) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.8e-69) || !(z <= 2.35e+83)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((t - x) * (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 <= (-1.8d-69)) .or. (.not. (z <= 2.35d+83))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + ((t - x) * (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 <= -1.8e-69) || !(z <= 2.35e+83)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((t - x) * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.8e-69) or not (z <= 2.35e+83): tmp = t * ((y - z) / (a - z)) else: tmp = x + ((t - x) * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.8e-69) || !(z <= 2.35e+83)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.8e-69) || ~((z <= 2.35e+83))) tmp = t * ((y - z) / (a - z)); else tmp = x + ((t - x) * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.8e-69], N[Not[LessEqual[z, 2.35e+83]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{-69} \lor \neg \left(z \leq 2.35 \cdot 10^{+83}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -1.80000000000000009e-69 or 2.3499999999999999e83 < z Initial program 62.9%
+-commutative62.9%
remove-double-neg62.9%
unsub-neg62.9%
*-commutative62.9%
associate-*l/43.3%
associate-/l*68.2%
fma-neg68.2%
remove-double-neg68.2%
Simplified68.2%
Taylor expanded in x around -inf 51.8%
associate-*r*51.8%
neg-mul-151.8%
fma-define51.8%
times-frac73.5%
+-commutative73.5%
Simplified73.5%
Taylor expanded in t around inf 78.6%
associate--l+78.6%
associate-*r/78.6%
associate-*r*78.6%
mul-1-neg78.6%
div-sub78.6%
Simplified78.6%
Taylor expanded in t around inf 57.5%
div-sub57.5%
Simplified57.5%
if -1.80000000000000009e-69 < z < 2.3499999999999999e83Initial program 89.0%
Taylor expanded in y around inf 84.6%
*-commutative84.6%
*-lft-identity84.6%
times-frac89.1%
/-rgt-identity89.1%
Simplified89.1%
Taylor expanded in a around inf 78.9%
Final simplification67.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -5.8e-68) (not (<= z 1.3e+83))) (* t (/ (- y z) (- a z))) (+ x (* y (/ (- t x) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -5.8e-68) || !(z <= 1.3e+83)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y * ((t - x) / 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 <= (-5.8d-68)) .or. (.not. (z <= 1.3d+83))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + (y * ((t - x) / 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 <= -5.8e-68) || !(z <= 1.3e+83)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y * ((t - x) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -5.8e-68) or not (z <= 1.3e+83): tmp = t * ((y - z) / (a - z)) else: tmp = x + (y * ((t - x) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -5.8e-68) || !(z <= 1.3e+83)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -5.8e-68) || ~((z <= 1.3e+83))) tmp = t * ((y - z) / (a - z)); else tmp = x + (y * ((t - x) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -5.8e-68], N[Not[LessEqual[z, 1.3e+83]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{-68} \lor \neg \left(z \leq 1.3 \cdot 10^{+83}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\end{array}
\end{array}
if z < -5.8000000000000001e-68 or 1.3000000000000001e83 < z Initial program 62.9%
+-commutative62.9%
remove-double-neg62.9%
unsub-neg62.9%
*-commutative62.9%
associate-*l/43.3%
associate-/l*68.2%
fma-neg68.2%
remove-double-neg68.2%
Simplified68.2%
Taylor expanded in x around -inf 51.8%
associate-*r*51.8%
neg-mul-151.8%
fma-define51.8%
times-frac73.5%
+-commutative73.5%
Simplified73.5%
Taylor expanded in t around inf 78.6%
associate--l+78.6%
associate-*r/78.6%
associate-*r*78.6%
mul-1-neg78.6%
div-sub78.6%
Simplified78.6%
Taylor expanded in t around inf 57.5%
div-sub57.5%
Simplified57.5%
if -5.8000000000000001e-68 < z < 1.3000000000000001e83Initial program 89.0%
Taylor expanded in z around 0 75.0%
associate-/l*74.8%
Simplified74.8%
Final simplification65.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.9e-58) (not (<= z 1.02e+151))) (* t (/ (- y z) (- a z))) (+ x (* y (/ t (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.9e-58) || !(z <= 1.02e+151)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y * (t / (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.9d-58)) .or. (.not. (z <= 1.02d+151))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + (y * (t / (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.9e-58) || !(z <= 1.02e+151)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y * (t / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.9e-58) or not (z <= 1.02e+151): tmp = t * ((y - z) / (a - z)) else: tmp = x + (y * (t / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.9e-58) || !(z <= 1.02e+151)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(y * Float64(t / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -4.9e-58) || ~((z <= 1.02e+151))) tmp = t * ((y - z) / (a - z)); else tmp = x + (y * (t / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.9e-58], N[Not[LessEqual[z, 1.02e+151]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.9 \cdot 10^{-58} \lor \neg \left(z \leq 1.02 \cdot 10^{+151}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a - z}\\
\end{array}
\end{array}
if z < -4.9000000000000003e-58 or 1.02000000000000002e151 < z Initial program 60.9%
+-commutative60.9%
remove-double-neg60.9%
unsub-neg60.9%
*-commutative60.9%
associate-*l/42.2%
associate-/l*66.6%
fma-neg66.6%
remove-double-neg66.6%
Simplified66.6%
Taylor expanded in x around -inf 51.2%
associate-*r*51.2%
neg-mul-151.2%
fma-define51.2%
times-frac73.0%
+-commutative73.0%
Simplified73.0%
Taylor expanded in t around inf 79.2%
associate--l+79.2%
associate-*r/79.2%
associate-*r*79.2%
mul-1-neg79.2%
div-sub79.2%
Simplified79.2%
Taylor expanded in t around inf 57.6%
div-sub57.6%
Simplified57.6%
if -4.9000000000000003e-58 < z < 1.02000000000000002e151Initial program 89.1%
Taylor expanded in t around inf 71.4%
Taylor expanded in y around inf 66.5%
Final simplification62.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.7e-38) (not (<= t 6.5e-125))) (* t (/ (- y z) (- a z))) (* x (- 1.0 (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.7e-38) || !(t <= 6.5e-125)) {
tmp = t * ((y - z) / (a - 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 ((t <= (-2.7d-38)) .or. (.not. (t <= 6.5d-125))) then
tmp = t * ((y - z) / (a - 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 ((t <= -2.7e-38) || !(t <= 6.5e-125)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x * (1.0 - (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.7e-38) or not (t <= 6.5e-125): tmp = t * ((y - z) / (a - z)) else: tmp = x * (1.0 - (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.7e-38) || !(t <= 6.5e-125)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - 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 ((t <= -2.7e-38) || ~((t <= 6.5e-125))) tmp = t * ((y - z) / (a - z)); else tmp = x * (1.0 - (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.7e-38], N[Not[LessEqual[t, 6.5e-125]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.7 \cdot 10^{-38} \lor \neg \left(t \leq 6.5 \cdot 10^{-125}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\end{array}
\end{array}
if t < -2.70000000000000005e-38 or 6.4999999999999999e-125 < t Initial program 84.5%
+-commutative84.5%
remove-double-neg84.5%
unsub-neg84.5%
*-commutative84.5%
associate-*l/64.4%
associate-/l*89.0%
fma-neg89.0%
remove-double-neg89.0%
Simplified89.0%
Taylor expanded in x around -inf 59.1%
associate-*r*59.1%
neg-mul-159.1%
fma-define59.1%
times-frac80.2%
+-commutative80.2%
Simplified80.2%
Taylor expanded in t around inf 93.5%
associate--l+93.5%
associate-*r/93.5%
associate-*r*93.5%
mul-1-neg93.5%
div-sub93.5%
Simplified93.5%
Taylor expanded in t around inf 69.4%
div-sub69.4%
Simplified69.4%
if -2.70000000000000005e-38 < t < 6.4999999999999999e-125Initial program 63.0%
Taylor expanded in z around 0 54.2%
associate-/l*52.3%
Simplified52.3%
Taylor expanded in x around inf 51.3%
mul-1-neg51.3%
unsub-neg51.3%
Simplified51.3%
Final simplification61.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.2e+90) (not (<= z 1.02e+151))) (* t (/ z (- z a))) (* x (- 1.0 (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.2e+90) || !(z <= 1.02e+151)) {
tmp = t * (z / (z - a));
} 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 <= (-1.2d+90)) .or. (.not. (z <= 1.02d+151))) then
tmp = t * (z / (z - a))
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 <= -1.2e+90) || !(z <= 1.02e+151)) {
tmp = t * (z / (z - a));
} else {
tmp = x * (1.0 - (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.2e+90) or not (z <= 1.02e+151): tmp = t * (z / (z - a)) else: tmp = x * (1.0 - (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.2e+90) || !(z <= 1.02e+151)) tmp = Float64(t * Float64(z / Float64(z - a))); 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 <= -1.2e+90) || ~((z <= 1.02e+151))) tmp = t * (z / (z - a)); else tmp = x * (1.0 - (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.2e+90], N[Not[LessEqual[z, 1.02e+151]], $MachinePrecision]], N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{+90} \lor \neg \left(z \leq 1.02 \cdot 10^{+151}\right):\\
\;\;\;\;t \cdot \frac{z}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\end{array}
\end{array}
if z < -1.20000000000000005e90 or 1.02000000000000002e151 < z Initial program 56.8%
+-commutative56.8%
remove-double-neg56.8%
unsub-neg56.8%
*-commutative56.8%
associate-*l/37.0%
associate-/l*64.0%
fma-neg64.0%
remove-double-neg64.0%
Simplified64.0%
Taylor expanded in x around -inf 47.9%
associate-*r*47.9%
neg-mul-147.9%
fma-define47.9%
times-frac72.7%
+-commutative72.7%
Simplified72.7%
Taylor expanded in t around inf 79.5%
associate--l+79.5%
associate-*r/79.5%
associate-*r*79.5%
mul-1-neg79.5%
div-sub79.5%
Simplified79.5%
Taylor expanded in t around inf 60.8%
div-sub60.8%
Simplified60.8%
Taylor expanded in y around 0 57.8%
neg-mul-157.8%
Simplified57.8%
if -1.20000000000000005e90 < z < 1.02000000000000002e151Initial program 84.6%
Taylor expanded in z around 0 62.7%
associate-/l*64.1%
Simplified64.1%
Taylor expanded in x around inf 53.9%
mul-1-neg53.9%
unsub-neg53.9%
Simplified53.9%
Final simplification55.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.6e+89) t (if (<= z 1.02e+151) (* x (- 1.0 (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.6e+89) {
tmp = t;
} else if (z <= 1.02e+151) {
tmp = x * (1.0 - (y / a));
} 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 <= (-3.6d+89)) then
tmp = t
else if (z <= 1.02d+151) then
tmp = x * (1.0d0 - (y / a))
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 <= -3.6e+89) {
tmp = t;
} else if (z <= 1.02e+151) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.6e+89: tmp = t elif z <= 1.02e+151: tmp = x * (1.0 - (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.6e+89) tmp = t; elseif (z <= 1.02e+151) tmp = Float64(x * Float64(1.0 - Float64(y / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.6e+89) tmp = t; elseif (z <= 1.02e+151) tmp = x * (1.0 - (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.6e+89], t, If[LessEqual[z, 1.02e+151], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{+89}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{+151}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.6e89 or 1.02000000000000002e151 < z Initial program 56.8%
+-commutative56.8%
remove-double-neg56.8%
unsub-neg56.8%
*-commutative56.8%
associate-*l/37.0%
associate-/l*64.0%
fma-neg64.0%
remove-double-neg64.0%
Simplified64.0%
Taylor expanded in x around -inf 47.9%
associate-*r*47.9%
neg-mul-147.9%
fma-define47.9%
times-frac72.7%
+-commutative72.7%
Simplified72.7%
Taylor expanded in z around inf 48.9%
if -3.6e89 < z < 1.02000000000000002e151Initial program 84.6%
Taylor expanded in z around 0 62.7%
associate-/l*64.1%
Simplified64.1%
Taylor expanded in x around inf 53.9%
mul-1-neg53.9%
unsub-neg53.9%
Simplified53.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.8e+75) t (if (<= z -6.5e+15) (* t (/ (- y z) a)) (if (<= z 1.95e+83) x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.8e+75) {
tmp = t;
} else if (z <= -6.5e+15) {
tmp = t * ((y - z) / a);
} else if (z <= 1.95e+83) {
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 <= (-3.8d+75)) then
tmp = t
else if (z <= (-6.5d+15)) then
tmp = t * ((y - z) / a)
else if (z <= 1.95d+83) 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 <= -3.8e+75) {
tmp = t;
} else if (z <= -6.5e+15) {
tmp = t * ((y - z) / a);
} else if (z <= 1.95e+83) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.8e+75: tmp = t elif z <= -6.5e+15: tmp = t * ((y - z) / a) elif z <= 1.95e+83: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.8e+75) tmp = t; elseif (z <= -6.5e+15) tmp = Float64(t * Float64(Float64(y - z) / a)); elseif (z <= 1.95e+83) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.8e+75) tmp = t; elseif (z <= -6.5e+15) tmp = t * ((y - z) / a); elseif (z <= 1.95e+83) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.8e+75], t, If[LessEqual[z, -6.5e+15], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.95e+83], x, t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+75}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -6.5 \cdot 10^{+15}:\\
\;\;\;\;t \cdot \frac{y - z}{a}\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{+83}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.8000000000000002e75 or 1.9500000000000001e83 < z Initial program 59.9%
+-commutative59.9%
remove-double-neg59.9%
unsub-neg59.9%
*-commutative59.9%
associate-*l/39.3%
associate-/l*66.3%
fma-neg66.3%
remove-double-neg66.3%
Simplified66.3%
Taylor expanded in x around -inf 49.0%
associate-*r*49.0%
neg-mul-149.0%
fma-define49.0%
times-frac74.0%
+-commutative74.0%
Simplified74.0%
Taylor expanded in z around inf 44.7%
if -3.8000000000000002e75 < z < -6.5e15Initial program 72.0%
+-commutative72.0%
remove-double-neg72.0%
unsub-neg72.0%
*-commutative72.0%
associate-*l/41.5%
associate-/l*76.9%
fma-neg76.9%
remove-double-neg76.9%
Simplified76.9%
Taylor expanded in x around -inf 36.2%
associate-*r*36.2%
neg-mul-136.2%
fma-define36.2%
times-frac58.9%
+-commutative58.9%
Simplified58.9%
Taylor expanded in t around inf 86.1%
associate--l+86.1%
associate-*r/86.1%
associate-*r*86.1%
mul-1-neg86.1%
div-sub86.1%
Simplified86.1%
Taylor expanded in t around inf 63.0%
div-sub63.0%
Simplified63.0%
Taylor expanded in a around inf 25.1%
associate-/l*43.1%
Simplified43.1%
if -6.5e15 < z < 1.9500000000000001e83Initial program 86.5%
+-commutative86.5%
remove-double-neg86.5%
unsub-neg86.5%
*-commutative86.5%
associate-*l/86.6%
associate-/l*90.6%
fma-neg90.5%
remove-double-neg90.5%
Simplified90.5%
Taylor expanded in a around inf 37.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.8e-57) t (if (<= z 2e+83) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.8e-57) {
tmp = t;
} else if (z <= 2e+83) {
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 <= (-3.8d-57)) then
tmp = t
else if (z <= 2d+83) 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 <= -3.8e-57) {
tmp = t;
} else if (z <= 2e+83) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.8e-57: tmp = t elif z <= 2e+83: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.8e-57) tmp = t; elseif (z <= 2e+83) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.8e-57) tmp = t; elseif (z <= 2e+83) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.8e-57], t, If[LessEqual[z, 2e+83], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{-57}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+83}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.7999999999999997e-57 or 2.00000000000000006e83 < z Initial program 61.8%
+-commutative61.8%
remove-double-neg61.8%
unsub-neg61.8%
*-commutative61.8%
associate-*l/41.6%
associate-/l*67.3%
fma-neg67.2%
remove-double-neg67.2%
Simplified67.2%
Taylor expanded in x around -inf 50.3%
associate-*r*50.3%
neg-mul-150.3%
fma-define50.3%
times-frac72.7%
+-commutative72.7%
Simplified72.7%
Taylor expanded in z around inf 38.7%
if -3.7999999999999997e-57 < z < 2.00000000000000006e83Initial program 89.4%
+-commutative89.4%
remove-double-neg89.4%
unsub-neg89.4%
*-commutative89.4%
associate-*l/89.4%
associate-/l*93.8%
fma-neg93.8%
remove-double-neg93.8%
Simplified93.8%
Taylor expanded in a around inf 39.1%
(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 75.5%
+-commutative75.5%
remove-double-neg75.5%
unsub-neg75.5%
*-commutative75.5%
associate-*l/65.3%
associate-/l*80.4%
fma-neg80.4%
remove-double-neg80.4%
Simplified80.4%
Taylor expanded in x around -inf 67.0%
associate-*r*67.0%
neg-mul-167.0%
fma-define67.0%
times-frac79.8%
+-commutative79.8%
Simplified79.8%
Taylor expanded in z around inf 23.5%
herbie shell --seed 2024132
(FPCore (x y z t a)
:name "Numeric.Signal:interpolate from hsignal-0.2.7.1"
:precision binary64
(+ x (* (- y z) (/ (- t x) (- a z)))))