
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - 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 = x + (((y - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - 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 = x + (((y - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- z t) (- a t))))
(if (or (<= t -9.4e+82) (not (<= t 1.12e+151)))
(fma (- x) (+ (/ z (- a t)) (/ a t)) (* y t_1))
(fma t_1 (- y x) x))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (a - t);
double tmp;
if ((t <= -9.4e+82) || !(t <= 1.12e+151)) {
tmp = fma(-x, ((z / (a - t)) + (a / t)), (y * t_1));
} else {
tmp = fma(t_1, (y - x), x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(a - t)) tmp = 0.0 if ((t <= -9.4e+82) || !(t <= 1.12e+151)) tmp = fma(Float64(-x), Float64(Float64(z / Float64(a - t)) + Float64(a / t)), Float64(y * t_1)); else tmp = fma(t_1, Float64(y - x), x); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t, -9.4e+82], N[Not[LessEqual[t, 1.12e+151]], $MachinePrecision]], N[((-x) * N[(N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision] + N[(a / t), $MachinePrecision]), $MachinePrecision] + N[(y * t$95$1), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(y - x), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - t}{a - t}\\
\mathbf{if}\;t \leq -9.4 \cdot 10^{+82} \lor \neg \left(t \leq 1.12 \cdot 10^{+151}\right):\\
\;\;\;\;\mathsf{fma}\left(-x, \frac{z}{a - t} + \frac{a}{t}, y \cdot t_1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t_1, y - x, x\right)\\
\end{array}
\end{array}
if t < -9.4e82 or 1.12000000000000004e151 < t Initial program 38.3%
+-commutative38.3%
*-commutative38.3%
associate-/l*60.4%
associate-/r/72.8%
fma-def72.8%
Simplified72.8%
Taylor expanded in x around -inf 58.4%
associate-*r*58.4%
neg-mul-158.4%
associate-*r/91.2%
fma-def91.3%
Simplified91.3%
Taylor expanded in t around inf 93.6%
mul-1-neg93.6%
distribute-neg-frac93.6%
Simplified93.6%
if -9.4e82 < t < 1.12000000000000004e151Initial program 86.2%
+-commutative86.2%
*-commutative86.2%
associate-/l*91.8%
associate-/r/93.1%
fma-def93.1%
Simplified93.1%
Final simplification93.2%
(FPCore (x y z t a) :precision binary64 (fma (- x) (+ (/ z (- a t)) (- -1.0 (/ t (- a t)))) (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
return fma(-x, ((z / (a - t)) + (-1.0 - (t / (a - t)))), (y * ((z - t) / (a - t))));
}
function code(x, y, z, t, a) return fma(Float64(-x), Float64(Float64(z / Float64(a - t)) + Float64(-1.0 - Float64(t / Float64(a - t)))), Float64(y * Float64(Float64(z - t) / Float64(a - t)))) end
code[x_, y_, z_, t_, a_] := N[((-x) * N[(N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision] + N[(-1.0 - N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(-x, \frac{z}{a - t} + \left(-1 - \frac{t}{a - t}\right), y \cdot \frac{z - t}{a - t}\right)
\end{array}
Initial program 71.8%
+-commutative71.8%
*-commutative71.8%
associate-/l*82.3%
associate-/r/87.0%
fma-def87.0%
Simplified87.0%
Taylor expanded in x around -inf 77.2%
associate-*r*77.2%
neg-mul-177.2%
associate-*r/91.8%
fma-def92.2%
Simplified92.2%
Final simplification92.2%
(FPCore (x y z t a)
:precision binary64
(if (or (<= y -1.7e+39) (not (<= y 4.1e+79)))
(+ x (/ (- y x) (/ (- a t) (- z t))))
(+
(* x (- (+ 1.0 (/ t (- a t))) (/ z (- a t))))
(/ (* y (- z t)) (- a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.7e+39) || !(y <= 4.1e+79)) {
tmp = x + ((y - x) / ((a - t) / (z - t)));
} else {
tmp = (x * ((1.0 + (t / (a - t))) - (z / (a - t)))) + ((y * (z - t)) / (a - 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 ((y <= (-1.7d+39)) .or. (.not. (y <= 4.1d+79))) then
tmp = x + ((y - x) / ((a - t) / (z - t)))
else
tmp = (x * ((1.0d0 + (t / (a - t))) - (z / (a - t)))) + ((y * (z - t)) / (a - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.7e+39) || !(y <= 4.1e+79)) {
tmp = x + ((y - x) / ((a - t) / (z - t)));
} else {
tmp = (x * ((1.0 + (t / (a - t))) - (z / (a - t)))) + ((y * (z - t)) / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.7e+39) or not (y <= 4.1e+79): tmp = x + ((y - x) / ((a - t) / (z - t))) else: tmp = (x * ((1.0 + (t / (a - t))) - (z / (a - t)))) + ((y * (z - t)) / (a - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.7e+39) || !(y <= 4.1e+79)) tmp = Float64(x + Float64(Float64(y - x) / Float64(Float64(a - t) / Float64(z - t)))); else tmp = Float64(Float64(x * Float64(Float64(1.0 + Float64(t / Float64(a - t))) - Float64(z / Float64(a - t)))) + Float64(Float64(y * Float64(z - t)) / Float64(a - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.7e+39) || ~((y <= 4.1e+79))) tmp = x + ((y - x) / ((a - t) / (z - t))); else tmp = (x * ((1.0 + (t / (a - t))) - (z / (a - t)))) + ((y * (z - t)) / (a - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.7e+39], N[Not[LessEqual[y, 4.1e+79]], $MachinePrecision]], N[(x + N[(N[(y - x), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[(1.0 + N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{+39} \lor \neg \left(y \leq 4.1 \cdot 10^{+79}\right):\\
\;\;\;\;x + \frac{y - x}{\frac{a - t}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\left(1 + \frac{t}{a - t}\right) - \frac{z}{a - t}\right) + \frac{y \cdot \left(z - t\right)}{a - t}\\
\end{array}
\end{array}
if y < -1.6999999999999999e39 or 4.1e79 < y Initial program 59.2%
associate-/l*95.3%
Simplified95.3%
if -1.6999999999999999e39 < y < 4.1e79Initial program 80.0%
+-commutative80.0%
*-commutative80.0%
associate-/l*74.7%
associate-/r/81.6%
fma-def81.6%
Simplified81.6%
Taylor expanded in x around -inf 90.3%
Final simplification92.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ z a)))))
(if (<= t -3.3e+27)
y
(if (<= t -1.25e-222)
t_1
(if (<= t -1.35e-265)
(* z (/ y (- a t)))
(if (<= t -3e-307)
(- x (* z (/ x a)))
(if (<= t 1.7e-100)
(* z (/ (- y x) a))
(if (<= t 1.8e+21)
t_1
(if (<= t 5.5e+67)
(/ (* z y) (- a t))
(if (<= t 3e+117)
(- x (/ t (/ a y)))
(if (<= t 7e+122) (* z (/ x t)) y)))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (z / a));
double tmp;
if (t <= -3.3e+27) {
tmp = y;
} else if (t <= -1.25e-222) {
tmp = t_1;
} else if (t <= -1.35e-265) {
tmp = z * (y / (a - t));
} else if (t <= -3e-307) {
tmp = x - (z * (x / a));
} else if (t <= 1.7e-100) {
tmp = z * ((y - x) / a);
} else if (t <= 1.8e+21) {
tmp = t_1;
} else if (t <= 5.5e+67) {
tmp = (z * y) / (a - t);
} else if (t <= 3e+117) {
tmp = x - (t / (a / y));
} else if (t <= 7e+122) {
tmp = z * (x / t);
} else {
tmp = 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) :: t_1
real(8) :: tmp
t_1 = x * (1.0d0 - (z / a))
if (t <= (-3.3d+27)) then
tmp = y
else if (t <= (-1.25d-222)) then
tmp = t_1
else if (t <= (-1.35d-265)) then
tmp = z * (y / (a - t))
else if (t <= (-3d-307)) then
tmp = x - (z * (x / a))
else if (t <= 1.7d-100) then
tmp = z * ((y - x) / a)
else if (t <= 1.8d+21) then
tmp = t_1
else if (t <= 5.5d+67) then
tmp = (z * y) / (a - t)
else if (t <= 3d+117) then
tmp = x - (t / (a / y))
else if (t <= 7d+122) then
tmp = z * (x / t)
else
tmp = y
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 - (z / a));
double tmp;
if (t <= -3.3e+27) {
tmp = y;
} else if (t <= -1.25e-222) {
tmp = t_1;
} else if (t <= -1.35e-265) {
tmp = z * (y / (a - t));
} else if (t <= -3e-307) {
tmp = x - (z * (x / a));
} else if (t <= 1.7e-100) {
tmp = z * ((y - x) / a);
} else if (t <= 1.8e+21) {
tmp = t_1;
} else if (t <= 5.5e+67) {
tmp = (z * y) / (a - t);
} else if (t <= 3e+117) {
tmp = x - (t / (a / y));
} else if (t <= 7e+122) {
tmp = z * (x / t);
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (1.0 - (z / a)) tmp = 0 if t <= -3.3e+27: tmp = y elif t <= -1.25e-222: tmp = t_1 elif t <= -1.35e-265: tmp = z * (y / (a - t)) elif t <= -3e-307: tmp = x - (z * (x / a)) elif t <= 1.7e-100: tmp = z * ((y - x) / a) elif t <= 1.8e+21: tmp = t_1 elif t <= 5.5e+67: tmp = (z * y) / (a - t) elif t <= 3e+117: tmp = x - (t / (a / y)) elif t <= 7e+122: tmp = z * (x / t) else: tmp = y return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(1.0 - Float64(z / a))) tmp = 0.0 if (t <= -3.3e+27) tmp = y; elseif (t <= -1.25e-222) tmp = t_1; elseif (t <= -1.35e-265) tmp = Float64(z * Float64(y / Float64(a - t))); elseif (t <= -3e-307) tmp = Float64(x - Float64(z * Float64(x / a))); elseif (t <= 1.7e-100) tmp = Float64(z * Float64(Float64(y - x) / a)); elseif (t <= 1.8e+21) tmp = t_1; elseif (t <= 5.5e+67) tmp = Float64(Float64(z * y) / Float64(a - t)); elseif (t <= 3e+117) tmp = Float64(x - Float64(t / Float64(a / y))); elseif (t <= 7e+122) tmp = Float64(z * Float64(x / t)); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (1.0 - (z / a)); tmp = 0.0; if (t <= -3.3e+27) tmp = y; elseif (t <= -1.25e-222) tmp = t_1; elseif (t <= -1.35e-265) tmp = z * (y / (a - t)); elseif (t <= -3e-307) tmp = x - (z * (x / a)); elseif (t <= 1.7e-100) tmp = z * ((y - x) / a); elseif (t <= 1.8e+21) tmp = t_1; elseif (t <= 5.5e+67) tmp = (z * y) / (a - t); elseif (t <= 3e+117) tmp = x - (t / (a / y)); elseif (t <= 7e+122) tmp = z * (x / t); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.3e+27], y, If[LessEqual[t, -1.25e-222], t$95$1, If[LessEqual[t, -1.35e-265], N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3e-307], N[(x - N[(z * N[(x / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.7e-100], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.8e+21], t$95$1, If[LessEqual[t, 5.5e+67], N[(N[(z * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e+117], N[(x - N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e+122], N[(z * N[(x / t), $MachinePrecision]), $MachinePrecision], y]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{if}\;t \leq -3.3 \cdot 10^{+27}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -1.25 \cdot 10^{-222}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.35 \cdot 10^{-265}:\\
\;\;\;\;z \cdot \frac{y}{a - t}\\
\mathbf{elif}\;t \leq -3 \cdot 10^{-307}:\\
\;\;\;\;x - z \cdot \frac{x}{a}\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{-100}:\\
\;\;\;\;z \cdot \frac{y - x}{a}\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{+21}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{+67}:\\
\;\;\;\;\frac{z \cdot y}{a - t}\\
\mathbf{elif}\;t \leq 3 \cdot 10^{+117}:\\
\;\;\;\;x - \frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;t \leq 7 \cdot 10^{+122}:\\
\;\;\;\;z \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -3.2999999999999998e27 or 7.00000000000000028e122 < t Initial program 46.6%
+-commutative46.6%
*-commutative46.6%
associate-/l*66.5%
associate-/r/76.7%
fma-def76.7%
Simplified76.7%
Taylor expanded in t around inf 51.4%
if -3.2999999999999998e27 < t < -1.25000000000000002e-222 or 1.69999999999999988e-100 < t < 1.8e21Initial program 85.9%
associate-/l*91.4%
Simplified91.4%
Taylor expanded in t around 0 65.3%
Taylor expanded in x around inf 51.6%
mul-1-neg51.6%
unsub-neg51.6%
Simplified51.6%
if -1.25000000000000002e-222 < t < -1.3500000000000001e-265Initial program 92.6%
+-commutative92.6%
*-commutative92.6%
associate-/l*92.5%
associate-/r/99.8%
fma-def99.8%
Simplified99.8%
Taylor expanded in z around inf 77.9%
div-sub77.9%
Simplified77.9%
Taylor expanded in y around inf 70.6%
if -1.3500000000000001e-265 < t < -2.9999999999999999e-307Initial program 100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
Taylor expanded in y around 0 85.8%
mul-1-neg85.8%
unsub-neg85.8%
associate-/l*85.7%
associate-/r/85.8%
Simplified85.8%
if -2.9999999999999999e-307 < t < 1.69999999999999988e-100Initial program 90.3%
+-commutative90.3%
*-commutative90.3%
associate-/l*91.5%
associate-/r/90.5%
fma-def90.5%
Simplified90.5%
Taylor expanded in z around inf 70.0%
div-sub70.0%
Simplified70.0%
Taylor expanded in a around inf 61.9%
if 1.8e21 < t < 5.49999999999999968e67Initial program 99.7%
+-commutative99.7%
*-commutative99.7%
associate-/l*99.7%
associate-/r/99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in z around inf 54.1%
div-sub54.1%
Simplified54.1%
Taylor expanded in y around inf 53.9%
if 5.49999999999999968e67 < t < 3e117Initial program 65.4%
+-commutative65.4%
*-commutative65.4%
associate-/l*90.3%
associate-/r/90.6%
fma-def90.6%
Simplified90.6%
Taylor expanded in a around inf 51.6%
associate-/l*66.9%
Simplified66.9%
Taylor expanded in z around 0 43.6%
mul-1-neg43.6%
associate-/l*59.0%
distribute-neg-frac59.0%
Simplified59.0%
Taylor expanded in y around inf 43.4%
mul-1-neg43.4%
associate-/l*51.2%
distribute-neg-frac51.2%
Simplified51.2%
if 3e117 < t < 7.00000000000000028e122Initial program 43.8%
+-commutative43.8%
*-commutative43.8%
associate-/l*100.0%
associate-/r/99.7%
fma-def99.7%
Simplified99.7%
Taylor expanded in t around -inf 43.8%
Taylor expanded in y around 0 23.2%
associate-/l*42.8%
Simplified42.8%
Taylor expanded in z around inf 23.2%
associate-*l/42.8%
*-commutative42.8%
Simplified42.8%
Final simplification55.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* z (/ y (- a t)))) (t_2 (* x (- 1.0 (/ z a)))))
(if (<= t -3.1e+29)
y
(if (<= t -9.5e-223)
t_2
(if (<= t -1.2e-263)
t_1
(if (<= t 2.6e-308)
t_2
(if (<= t 2.35e-164) t_1 (if (<= t 4.05e+40) t_2 y))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = z * (y / (a - t));
double t_2 = x * (1.0 - (z / a));
double tmp;
if (t <= -3.1e+29) {
tmp = y;
} else if (t <= -9.5e-223) {
tmp = t_2;
} else if (t <= -1.2e-263) {
tmp = t_1;
} else if (t <= 2.6e-308) {
tmp = t_2;
} else if (t <= 2.35e-164) {
tmp = t_1;
} else if (t <= 4.05e+40) {
tmp = t_2;
} else {
tmp = 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = z * (y / (a - t))
t_2 = x * (1.0d0 - (z / a))
if (t <= (-3.1d+29)) then
tmp = y
else if (t <= (-9.5d-223)) then
tmp = t_2
else if (t <= (-1.2d-263)) then
tmp = t_1
else if (t <= 2.6d-308) then
tmp = t_2
else if (t <= 2.35d-164) then
tmp = t_1
else if (t <= 4.05d+40) then
tmp = t_2
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = z * (y / (a - t));
double t_2 = x * (1.0 - (z / a));
double tmp;
if (t <= -3.1e+29) {
tmp = y;
} else if (t <= -9.5e-223) {
tmp = t_2;
} else if (t <= -1.2e-263) {
tmp = t_1;
} else if (t <= 2.6e-308) {
tmp = t_2;
} else if (t <= 2.35e-164) {
tmp = t_1;
} else if (t <= 4.05e+40) {
tmp = t_2;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z * (y / (a - t)) t_2 = x * (1.0 - (z / a)) tmp = 0 if t <= -3.1e+29: tmp = y elif t <= -9.5e-223: tmp = t_2 elif t <= -1.2e-263: tmp = t_1 elif t <= 2.6e-308: tmp = t_2 elif t <= 2.35e-164: tmp = t_1 elif t <= 4.05e+40: tmp = t_2 else: tmp = y return tmp
function code(x, y, z, t, a) t_1 = Float64(z * Float64(y / Float64(a - t))) t_2 = Float64(x * Float64(1.0 - Float64(z / a))) tmp = 0.0 if (t <= -3.1e+29) tmp = y; elseif (t <= -9.5e-223) tmp = t_2; elseif (t <= -1.2e-263) tmp = t_1; elseif (t <= 2.6e-308) tmp = t_2; elseif (t <= 2.35e-164) tmp = t_1; elseif (t <= 4.05e+40) tmp = t_2; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = z * (y / (a - t)); t_2 = x * (1.0 - (z / a)); tmp = 0.0; if (t <= -3.1e+29) tmp = y; elseif (t <= -9.5e-223) tmp = t_2; elseif (t <= -1.2e-263) tmp = t_1; elseif (t <= 2.6e-308) tmp = t_2; elseif (t <= 2.35e-164) tmp = t_1; elseif (t <= 4.05e+40) tmp = t_2; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.1e+29], y, If[LessEqual[t, -9.5e-223], t$95$2, If[LessEqual[t, -1.2e-263], t$95$1, If[LessEqual[t, 2.6e-308], t$95$2, If[LessEqual[t, 2.35e-164], t$95$1, If[LessEqual[t, 4.05e+40], t$95$2, y]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{y}{a - t}\\
t_2 := x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{if}\;t \leq -3.1 \cdot 10^{+29}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -9.5 \cdot 10^{-223}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.2 \cdot 10^{-263}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{-308}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 2.35 \cdot 10^{-164}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 4.05 \cdot 10^{+40}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -3.0999999999999999e29 or 4.0499999999999999e40 < t Initial program 51.5%
+-commutative51.5%
*-commutative51.5%
associate-/l*72.3%
associate-/r/80.5%
fma-def80.4%
Simplified80.4%
Taylor expanded in t around inf 48.5%
if -3.0999999999999999e29 < t < -9.49999999999999992e-223 or -1.2e-263 < t < 2.6e-308 or 2.3499999999999998e-164 < t < 4.0499999999999999e40Initial program 87.4%
associate-/l*91.4%
Simplified91.4%
Taylor expanded in t around 0 66.7%
Taylor expanded in x around inf 51.8%
mul-1-neg51.8%
unsub-neg51.8%
Simplified51.8%
if -9.49999999999999992e-223 < t < -1.2e-263 or 2.6e-308 < t < 2.3499999999999998e-164Initial program 93.0%
+-commutative93.0%
*-commutative93.0%
associate-/l*95.2%
associate-/r/95.3%
fma-def95.3%
Simplified95.3%
Taylor expanded in z around inf 76.5%
div-sub76.5%
Simplified76.5%
Taylor expanded in y around inf 64.9%
Final simplification52.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ z a)))))
(if (<= t -3e+28)
y
(if (<= t -9e-223)
t_1
(if (<= t -1.8e-265)
(* z (/ y (- a t)))
(if (<= t -8e-307)
t_1
(if (<= t 3.5e-100)
(* z (/ (- y x) a))
(if (<= t 2.1e+40) t_1 y))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (z / a));
double tmp;
if (t <= -3e+28) {
tmp = y;
} else if (t <= -9e-223) {
tmp = t_1;
} else if (t <= -1.8e-265) {
tmp = z * (y / (a - t));
} else if (t <= -8e-307) {
tmp = t_1;
} else if (t <= 3.5e-100) {
tmp = z * ((y - x) / a);
} else if (t <= 2.1e+40) {
tmp = t_1;
} else {
tmp = 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) :: t_1
real(8) :: tmp
t_1 = x * (1.0d0 - (z / a))
if (t <= (-3d+28)) then
tmp = y
else if (t <= (-9d-223)) then
tmp = t_1
else if (t <= (-1.8d-265)) then
tmp = z * (y / (a - t))
else if (t <= (-8d-307)) then
tmp = t_1
else if (t <= 3.5d-100) then
tmp = z * ((y - x) / a)
else if (t <= 2.1d+40) then
tmp = t_1
else
tmp = y
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 - (z / a));
double tmp;
if (t <= -3e+28) {
tmp = y;
} else if (t <= -9e-223) {
tmp = t_1;
} else if (t <= -1.8e-265) {
tmp = z * (y / (a - t));
} else if (t <= -8e-307) {
tmp = t_1;
} else if (t <= 3.5e-100) {
tmp = z * ((y - x) / a);
} else if (t <= 2.1e+40) {
tmp = t_1;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (1.0 - (z / a)) tmp = 0 if t <= -3e+28: tmp = y elif t <= -9e-223: tmp = t_1 elif t <= -1.8e-265: tmp = z * (y / (a - t)) elif t <= -8e-307: tmp = t_1 elif t <= 3.5e-100: tmp = z * ((y - x) / a) elif t <= 2.1e+40: tmp = t_1 else: tmp = y return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(1.0 - Float64(z / a))) tmp = 0.0 if (t <= -3e+28) tmp = y; elseif (t <= -9e-223) tmp = t_1; elseif (t <= -1.8e-265) tmp = Float64(z * Float64(y / Float64(a - t))); elseif (t <= -8e-307) tmp = t_1; elseif (t <= 3.5e-100) tmp = Float64(z * Float64(Float64(y - x) / a)); elseif (t <= 2.1e+40) tmp = t_1; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (1.0 - (z / a)); tmp = 0.0; if (t <= -3e+28) tmp = y; elseif (t <= -9e-223) tmp = t_1; elseif (t <= -1.8e-265) tmp = z * (y / (a - t)); elseif (t <= -8e-307) tmp = t_1; elseif (t <= 3.5e-100) tmp = z * ((y - x) / a); elseif (t <= 2.1e+40) tmp = t_1; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3e+28], y, If[LessEqual[t, -9e-223], t$95$1, If[LessEqual[t, -1.8e-265], N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -8e-307], t$95$1, If[LessEqual[t, 3.5e-100], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.1e+40], t$95$1, y]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{if}\;t \leq -3 \cdot 10^{+28}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -9 \cdot 10^{-223}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.8 \cdot 10^{-265}:\\
\;\;\;\;z \cdot \frac{y}{a - t}\\
\mathbf{elif}\;t \leq -8 \cdot 10^{-307}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{-100}:\\
\;\;\;\;z \cdot \frac{y - x}{a}\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{+40}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -3.0000000000000001e28 or 2.1000000000000001e40 < t Initial program 51.5%
+-commutative51.5%
*-commutative51.5%
associate-/l*72.3%
associate-/r/80.5%
fma-def80.4%
Simplified80.4%
Taylor expanded in t around inf 48.5%
if -3.0000000000000001e28 < t < -8.99999999999999935e-223 or -1.8000000000000001e-265 < t < -7.99999999999999927e-307 or 3.5000000000000001e-100 < t < 2.1000000000000001e40Initial program 87.9%
associate-/l*92.6%
Simplified92.6%
Taylor expanded in t around 0 66.5%
Taylor expanded in x around inf 53.4%
mul-1-neg53.4%
unsub-neg53.4%
Simplified53.4%
if -8.99999999999999935e-223 < t < -1.8000000000000001e-265Initial program 92.6%
+-commutative92.6%
*-commutative92.6%
associate-/l*92.5%
associate-/r/99.8%
fma-def99.8%
Simplified99.8%
Taylor expanded in z around inf 77.9%
div-sub77.9%
Simplified77.9%
Taylor expanded in y around inf 70.6%
if -7.99999999999999927e-307 < t < 3.5000000000000001e-100Initial program 90.3%
+-commutative90.3%
*-commutative90.3%
associate-/l*91.5%
associate-/r/90.5%
fma-def90.5%
Simplified90.5%
Taylor expanded in z around inf 70.0%
div-sub70.0%
Simplified70.0%
Taylor expanded in a around inf 61.9%
Final simplification53.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ z a)))))
(if (<= t -3.6e+29)
y
(if (<= t -9e-223)
t_1
(if (<= t -5.5e-263)
(* z (/ y (- a t)))
(if (<= t -1.35e-306)
(- x (* z (/ x a)))
(if (<= t 2.2e-99)
(* z (/ (- y x) a))
(if (<= t 4.3e+38) t_1 y))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (z / a));
double tmp;
if (t <= -3.6e+29) {
tmp = y;
} else if (t <= -9e-223) {
tmp = t_1;
} else if (t <= -5.5e-263) {
tmp = z * (y / (a - t));
} else if (t <= -1.35e-306) {
tmp = x - (z * (x / a));
} else if (t <= 2.2e-99) {
tmp = z * ((y - x) / a);
} else if (t <= 4.3e+38) {
tmp = t_1;
} else {
tmp = 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) :: t_1
real(8) :: tmp
t_1 = x * (1.0d0 - (z / a))
if (t <= (-3.6d+29)) then
tmp = y
else if (t <= (-9d-223)) then
tmp = t_1
else if (t <= (-5.5d-263)) then
tmp = z * (y / (a - t))
else if (t <= (-1.35d-306)) then
tmp = x - (z * (x / a))
else if (t <= 2.2d-99) then
tmp = z * ((y - x) / a)
else if (t <= 4.3d+38) then
tmp = t_1
else
tmp = y
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 - (z / a));
double tmp;
if (t <= -3.6e+29) {
tmp = y;
} else if (t <= -9e-223) {
tmp = t_1;
} else if (t <= -5.5e-263) {
tmp = z * (y / (a - t));
} else if (t <= -1.35e-306) {
tmp = x - (z * (x / a));
} else if (t <= 2.2e-99) {
tmp = z * ((y - x) / a);
} else if (t <= 4.3e+38) {
tmp = t_1;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (1.0 - (z / a)) tmp = 0 if t <= -3.6e+29: tmp = y elif t <= -9e-223: tmp = t_1 elif t <= -5.5e-263: tmp = z * (y / (a - t)) elif t <= -1.35e-306: tmp = x - (z * (x / a)) elif t <= 2.2e-99: tmp = z * ((y - x) / a) elif t <= 4.3e+38: tmp = t_1 else: tmp = y return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(1.0 - Float64(z / a))) tmp = 0.0 if (t <= -3.6e+29) tmp = y; elseif (t <= -9e-223) tmp = t_1; elseif (t <= -5.5e-263) tmp = Float64(z * Float64(y / Float64(a - t))); elseif (t <= -1.35e-306) tmp = Float64(x - Float64(z * Float64(x / a))); elseif (t <= 2.2e-99) tmp = Float64(z * Float64(Float64(y - x) / a)); elseif (t <= 4.3e+38) tmp = t_1; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (1.0 - (z / a)); tmp = 0.0; if (t <= -3.6e+29) tmp = y; elseif (t <= -9e-223) tmp = t_1; elseif (t <= -5.5e-263) tmp = z * (y / (a - t)); elseif (t <= -1.35e-306) tmp = x - (z * (x / a)); elseif (t <= 2.2e-99) tmp = z * ((y - x) / a); elseif (t <= 4.3e+38) tmp = t_1; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.6e+29], y, If[LessEqual[t, -9e-223], t$95$1, If[LessEqual[t, -5.5e-263], N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.35e-306], N[(x - N[(z * N[(x / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.2e-99], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.3e+38], t$95$1, y]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{if}\;t \leq -3.6 \cdot 10^{+29}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -9 \cdot 10^{-223}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -5.5 \cdot 10^{-263}:\\
\;\;\;\;z \cdot \frac{y}{a - t}\\
\mathbf{elif}\;t \leq -1.35 \cdot 10^{-306}:\\
\;\;\;\;x - z \cdot \frac{x}{a}\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{-99}:\\
\;\;\;\;z \cdot \frac{y - x}{a}\\
\mathbf{elif}\;t \leq 4.3 \cdot 10^{+38}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -3.59999999999999976e29 or 4.2999999999999997e38 < t Initial program 51.5%
+-commutative51.5%
*-commutative51.5%
associate-/l*72.3%
associate-/r/80.5%
fma-def80.4%
Simplified80.4%
Taylor expanded in t around inf 48.5%
if -3.59999999999999976e29 < t < -8.99999999999999935e-223 or 2.20000000000000004e-99 < t < 4.2999999999999997e38Initial program 86.7%
associate-/l*91.8%
Simplified91.8%
Taylor expanded in t around 0 63.3%
Taylor expanded in x around inf 50.3%
mul-1-neg50.3%
unsub-neg50.3%
Simplified50.3%
if -8.99999999999999935e-223 < t < -5.49999999999999971e-263Initial program 92.6%
+-commutative92.6%
*-commutative92.6%
associate-/l*92.5%
associate-/r/99.8%
fma-def99.8%
Simplified99.8%
Taylor expanded in z around inf 77.9%
div-sub77.9%
Simplified77.9%
Taylor expanded in y around inf 70.6%
if -5.49999999999999971e-263 < t < -1.35000000000000005e-306Initial program 100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
Taylor expanded in y around 0 85.8%
mul-1-neg85.8%
unsub-neg85.8%
associate-/l*85.7%
associate-/r/85.8%
Simplified85.8%
if -1.35000000000000005e-306 < t < 2.20000000000000004e-99Initial program 90.3%
+-commutative90.3%
*-commutative90.3%
associate-/l*91.5%
associate-/r/90.5%
fma-def90.5%
Simplified90.5%
Taylor expanded in z around inf 70.0%
div-sub70.0%
Simplified70.0%
Taylor expanded in a around inf 61.9%
Final simplification53.5%
(FPCore (x y z t a)
:precision binary64
(if (<= t -7.2e+110)
(+ y (* (- z a) (/ x t)))
(if (<= t -2.6e+91)
(* y (/ (- z t) (- a t)))
(if (or (<= t -1.15e-48) (not (<= t 2e-13)))
(- y (/ z (/ t (- y x))))
(- x (/ (- x y) (/ a z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -7.2e+110) {
tmp = y + ((z - a) * (x / t));
} else if (t <= -2.6e+91) {
tmp = y * ((z - t) / (a - t));
} else if ((t <= -1.15e-48) || !(t <= 2e-13)) {
tmp = y - (z / (t / (y - x)));
} else {
tmp = x - ((x - y) / (a / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-7.2d+110)) then
tmp = y + ((z - a) * (x / t))
else if (t <= (-2.6d+91)) then
tmp = y * ((z - t) / (a - t))
else if ((t <= (-1.15d-48)) .or. (.not. (t <= 2d-13))) then
tmp = y - (z / (t / (y - x)))
else
tmp = x - ((x - y) / (a / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -7.2e+110) {
tmp = y + ((z - a) * (x / t));
} else if (t <= -2.6e+91) {
tmp = y * ((z - t) / (a - t));
} else if ((t <= -1.15e-48) || !(t <= 2e-13)) {
tmp = y - (z / (t / (y - x)));
} else {
tmp = x - ((x - y) / (a / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -7.2e+110: tmp = y + ((z - a) * (x / t)) elif t <= -2.6e+91: tmp = y * ((z - t) / (a - t)) elif (t <= -1.15e-48) or not (t <= 2e-13): tmp = y - (z / (t / (y - x))) else: tmp = x - ((x - y) / (a / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -7.2e+110) tmp = Float64(y + Float64(Float64(z - a) * Float64(x / t))); elseif (t <= -2.6e+91) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); elseif ((t <= -1.15e-48) || !(t <= 2e-13)) tmp = Float64(y - Float64(z / Float64(t / Float64(y - x)))); else tmp = Float64(x - Float64(Float64(x - y) / Float64(a / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -7.2e+110) tmp = y + ((z - a) * (x / t)); elseif (t <= -2.6e+91) tmp = y * ((z - t) / (a - t)); elseif ((t <= -1.15e-48) || ~((t <= 2e-13))) tmp = y - (z / (t / (y - x))); else tmp = x - ((x - y) / (a / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -7.2e+110], N[(y + N[(N[(z - a), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.6e+91], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -1.15e-48], N[Not[LessEqual[t, 2e-13]], $MachinePrecision]], N[(y - N[(z / N[(t / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(x - y), $MachinePrecision] / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.2 \cdot 10^{+110}:\\
\;\;\;\;y + \left(z - a\right) \cdot \frac{x}{t}\\
\mathbf{elif}\;t \leq -2.6 \cdot 10^{+91}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{elif}\;t \leq -1.15 \cdot 10^{-48} \lor \neg \left(t \leq 2 \cdot 10^{-13}\right):\\
\;\;\;\;y - \frac{z}{\frac{t}{y - x}}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{x - y}{\frac{a}{z}}\\
\end{array}
\end{array}
if t < -7.1999999999999994e110Initial program 36.6%
+-commutative36.6%
*-commutative36.6%
associate-/l*59.3%
associate-/r/72.1%
fma-def72.1%
Simplified72.1%
Taylor expanded in t around inf 58.7%
cancel-sign-sub-inv58.7%
metadata-eval58.7%
*-lft-identity58.7%
distribute-lft-in58.3%
mul-1-neg58.3%
distribute-rgt-neg-in58.3%
*-commutative58.3%
mul-1-neg58.3%
*-commutative58.3%
cancel-sign-sub58.3%
mul-1-neg58.3%
associate-*r*58.3%
distribute-lft-out--58.3%
associate-*r/58.3%
Simplified85.5%
Taylor expanded in y around 0 70.4%
mul-1-neg70.4%
associate-*l/80.8%
distribute-lft-neg-out80.8%
*-commutative80.8%
distribute-neg-frac80.8%
Simplified80.8%
if -7.1999999999999994e110 < t < -2.6e91Initial program 44.6%
+-commutative44.6%
*-commutative44.6%
associate-/l*99.7%
associate-/r/99.7%
fma-def99.7%
Simplified99.7%
Taylor expanded in y around inf 99.7%
div-sub99.7%
Simplified99.7%
if -2.6e91 < t < -1.15e-48 or 2.0000000000000001e-13 < t Initial program 66.4%
+-commutative66.4%
*-commutative66.4%
associate-/l*80.0%
associate-/r/84.4%
fma-def84.4%
Simplified84.4%
Taylor expanded in t around -inf 67.4%
Taylor expanded in a around 0 66.3%
mul-1-neg66.3%
unsub-neg66.3%
associate-/l*75.1%
Simplified75.1%
if -1.15e-48 < t < 2.0000000000000001e-13Initial program 89.9%
associate-/l*93.8%
Simplified93.8%
Taylor expanded in t around 0 77.8%
Final simplification77.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.2e+199) (not (<= t 2.55e+161))) (+ y (/ (- x y) (/ t (- z a)))) (+ x (* (- z t) (/ (- y x) (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.2e+199) || !(t <= 2.55e+161)) {
tmp = y + ((x - y) / (t / (z - a)));
} else {
tmp = x + ((z - t) * ((y - x) / (a - 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 ((t <= (-1.2d+199)) .or. (.not. (t <= 2.55d+161))) then
tmp = y + ((x - y) / (t / (z - a)))
else
tmp = x + ((z - t) * ((y - x) / (a - t)))
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.2e+199) || !(t <= 2.55e+161)) {
tmp = y + ((x - y) / (t / (z - a)));
} else {
tmp = x + ((z - t) * ((y - x) / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.2e+199) or not (t <= 2.55e+161): tmp = y + ((x - y) / (t / (z - a))) else: tmp = x + ((z - t) * ((y - x) / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.2e+199) || !(t <= 2.55e+161)) tmp = Float64(y + Float64(Float64(x - y) / Float64(t / Float64(z - a)))); else tmp = Float64(x + Float64(Float64(z - t) * Float64(Float64(y - x) / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.2e+199) || ~((t <= 2.55e+161))) tmp = y + ((x - y) / (t / (z - a))); else tmp = x + ((z - t) * ((y - x) / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.2e+199], N[Not[LessEqual[t, 2.55e+161]], $MachinePrecision]], N[(y + N[(N[(x - y), $MachinePrecision] / N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{+199} \lor \neg \left(t \leq 2.55 \cdot 10^{+161}\right):\\
\;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\
\mathbf{else}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y - x}{a - t}\\
\end{array}
\end{array}
if t < -1.20000000000000007e199 or 2.54999999999999982e161 < t Initial program 34.2%
+-commutative34.2%
*-commutative34.2%
associate-/l*53.4%
associate-/r/70.8%
fma-def70.8%
Simplified70.8%
Taylor expanded in t around inf 59.6%
cancel-sign-sub-inv59.6%
metadata-eval59.6%
*-lft-identity59.6%
distribute-lft-in59.2%
mul-1-neg59.2%
distribute-rgt-neg-in59.2%
*-commutative59.2%
mul-1-neg59.2%
*-commutative59.2%
cancel-sign-sub59.2%
mul-1-neg59.2%
associate-*r*59.2%
distribute-lft-out--59.2%
associate-*r/59.2%
Simplified90.2%
if -1.20000000000000007e199 < t < 2.54999999999999982e161Initial program 82.0%
associate-*l/89.8%
Simplified89.8%
Final simplification89.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.3e+223) (not (<= t 7.2e+157))) (+ y (/ (- x y) (/ t (- z a)))) (+ x (/ (- y x) (/ (- a t) (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.3e+223) || !(t <= 7.2e+157)) {
tmp = y + ((x - y) / (t / (z - a)));
} else {
tmp = x + ((y - x) / ((a - t) / (z - 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 ((t <= (-2.3d+223)) .or. (.not. (t <= 7.2d+157))) then
tmp = y + ((x - y) / (t / (z - a)))
else
tmp = x + ((y - x) / ((a - t) / (z - t)))
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.3e+223) || !(t <= 7.2e+157)) {
tmp = y + ((x - y) / (t / (z - a)));
} else {
tmp = x + ((y - x) / ((a - t) / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.3e+223) or not (t <= 7.2e+157): tmp = y + ((x - y) / (t / (z - a))) else: tmp = x + ((y - x) / ((a - t) / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.3e+223) || !(t <= 7.2e+157)) tmp = Float64(y + Float64(Float64(x - y) / Float64(t / Float64(z - a)))); else tmp = Float64(x + Float64(Float64(y - x) / Float64(Float64(a - t) / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.3e+223) || ~((t <= 7.2e+157))) tmp = y + ((x - y) / (t / (z - a))); else tmp = x + ((y - x) / ((a - t) / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.3e+223], N[Not[LessEqual[t, 7.2e+157]], $MachinePrecision]], N[(y + N[(N[(x - y), $MachinePrecision] / N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.3 \cdot 10^{+223} \lor \neg \left(t \leq 7.2 \cdot 10^{+157}\right):\\
\;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - x}{\frac{a - t}{z - t}}\\
\end{array}
\end{array}
if t < -2.30000000000000004e223 or 7.20000000000000049e157 < t Initial program 32.2%
+-commutative32.2%
*-commutative32.2%
associate-/l*52.6%
associate-/r/69.2%
fma-def69.1%
Simplified69.1%
Taylor expanded in t around inf 59.5%
cancel-sign-sub-inv59.5%
metadata-eval59.5%
*-lft-identity59.5%
distribute-lft-in59.1%
mul-1-neg59.1%
distribute-rgt-neg-in59.1%
*-commutative59.1%
mul-1-neg59.1%
*-commutative59.1%
cancel-sign-sub59.1%
mul-1-neg59.1%
associate-*r*59.1%
distribute-lft-out--59.1%
associate-*r/59.1%
Simplified90.0%
if -2.30000000000000004e223 < t < 7.20000000000000049e157Initial program 81.9%
associate-/l*91.5%
Simplified91.5%
Final simplification91.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.65e+172)
(/ (- z) (/ t (- y x)))
(if (<= z -0.49)
(* z (/ y (- a t)))
(if (<= z -4.7e-272)
y
(if (<= z 5.2e+78) (- x (/ t (/ a y))) (/ y (/ (- a t) z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.65e+172) {
tmp = -z / (t / (y - x));
} else if (z <= -0.49) {
tmp = z * (y / (a - t));
} else if (z <= -4.7e-272) {
tmp = y;
} else if (z <= 5.2e+78) {
tmp = x - (t / (a / y));
} else {
tmp = y / ((a - t) / 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+172)) then
tmp = -z / (t / (y - x))
else if (z <= (-0.49d0)) then
tmp = z * (y / (a - t))
else if (z <= (-4.7d-272)) then
tmp = y
else if (z <= 5.2d+78) then
tmp = x - (t / (a / y))
else
tmp = y / ((a - t) / 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+172) {
tmp = -z / (t / (y - x));
} else if (z <= -0.49) {
tmp = z * (y / (a - t));
} else if (z <= -4.7e-272) {
tmp = y;
} else if (z <= 5.2e+78) {
tmp = x - (t / (a / y));
} else {
tmp = y / ((a - t) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.65e+172: tmp = -z / (t / (y - x)) elif z <= -0.49: tmp = z * (y / (a - t)) elif z <= -4.7e-272: tmp = y elif z <= 5.2e+78: tmp = x - (t / (a / y)) else: tmp = y / ((a - t) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.65e+172) tmp = Float64(Float64(-z) / Float64(t / Float64(y - x))); elseif (z <= -0.49) tmp = Float64(z * Float64(y / Float64(a - t))); elseif (z <= -4.7e-272) tmp = y; elseif (z <= 5.2e+78) tmp = Float64(x - Float64(t / Float64(a / y))); else tmp = Float64(y / Float64(Float64(a - t) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.65e+172) tmp = -z / (t / (y - x)); elseif (z <= -0.49) tmp = z * (y / (a - t)); elseif (z <= -4.7e-272) tmp = y; elseif (z <= 5.2e+78) tmp = x - (t / (a / y)); else tmp = y / ((a - t) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.65e+172], N[((-z) / N[(t / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -0.49], N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.7e-272], y, If[LessEqual[z, 5.2e+78], N[(x - N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{+172}:\\
\;\;\;\;\frac{-z}{\frac{t}{y - x}}\\
\mathbf{elif}\;z \leq -0.49:\\
\;\;\;\;z \cdot \frac{y}{a - t}\\
\mathbf{elif}\;z \leq -4.7 \cdot 10^{-272}:\\
\;\;\;\;y\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+78}:\\
\;\;\;\;x - \frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{a - t}{z}}\\
\end{array}
\end{array}
if z < -1.64999999999999991e172Initial program 76.4%
+-commutative76.4%
*-commutative76.4%
associate-/l*90.7%
associate-/r/97.7%
fma-def97.6%
Simplified97.6%
Taylor expanded in t around -inf 65.7%
Taylor expanded in z around inf 58.8%
mul-1-neg58.8%
associate-/l*72.0%
distribute-neg-frac72.0%
Simplified72.0%
if -1.64999999999999991e172 < z < -0.48999999999999999Initial program 71.4%
+-commutative71.4%
*-commutative71.4%
associate-/l*90.7%
associate-/r/90.8%
fma-def90.8%
Simplified90.8%
Taylor expanded in z around inf 56.6%
div-sub56.6%
Simplified56.6%
Taylor expanded in y around inf 45.1%
if -0.48999999999999999 < z < -4.6999999999999998e-272Initial program 68.7%
+-commutative68.7%
*-commutative68.7%
associate-/l*75.6%
associate-/r/82.4%
fma-def82.4%
Simplified82.4%
Taylor expanded in t around inf 46.4%
if -4.6999999999999998e-272 < z < 5.2e78Initial program 73.3%
+-commutative73.3%
*-commutative73.3%
associate-/l*73.7%
associate-/r/82.1%
fma-def82.1%
Simplified82.1%
Taylor expanded in a around inf 50.6%
associate-/l*54.6%
Simplified54.6%
Taylor expanded in z around 0 40.8%
mul-1-neg40.8%
associate-/l*46.2%
distribute-neg-frac46.2%
Simplified46.2%
Taylor expanded in y around inf 43.7%
mul-1-neg43.7%
associate-/l*46.4%
distribute-neg-frac46.4%
Simplified46.4%
if 5.2e78 < z Initial program 71.1%
+-commutative71.1%
*-commutative71.1%
associate-/l*89.6%
associate-/r/89.7%
fma-def89.7%
Simplified89.7%
Taylor expanded in z around inf 84.1%
div-sub84.2%
Simplified84.2%
Taylor expanded in y around inf 45.3%
associate-/l*55.6%
Simplified55.6%
Final simplification51.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1e+171) (not (<= z 2.65e+132))) (* z (/ (- y x) (- a t))) (+ x (/ y (/ (- a t) (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1e+171) || !(z <= 2.65e+132)) {
tmp = z * ((y - x) / (a - t));
} else {
tmp = x + (y / ((a - t) / (z - 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 <= (-1d+171)) .or. (.not. (z <= 2.65d+132))) then
tmp = z * ((y - x) / (a - t))
else
tmp = x + (y / ((a - t) / (z - 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 <= -1e+171) || !(z <= 2.65e+132)) {
tmp = z * ((y - x) / (a - t));
} else {
tmp = x + (y / ((a - t) / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1e+171) or not (z <= 2.65e+132): tmp = z * ((y - x) / (a - t)) else: tmp = x + (y / ((a - t) / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1e+171) || !(z <= 2.65e+132)) tmp = Float64(z * Float64(Float64(y - x) / Float64(a - t))); else tmp = Float64(x + Float64(y / Float64(Float64(a - t) / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1e+171) || ~((z <= 2.65e+132))) tmp = z * ((y - x) / (a - t)); else tmp = x + (y / ((a - t) / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1e+171], N[Not[LessEqual[z, 2.65e+132]], $MachinePrecision]], N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+171} \lor \neg \left(z \leq 2.65 \cdot 10^{+132}\right):\\
\;\;\;\;z \cdot \frac{y - x}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z - t}}\\
\end{array}
\end{array}
if z < -9.99999999999999954e170 or 2.65e132 < z Initial program 74.6%
+-commutative74.6%
*-commutative74.6%
associate-/l*90.8%
associate-/r/92.3%
fma-def92.3%
Simplified92.3%
Taylor expanded in z around inf 89.7%
div-sub89.7%
Simplified89.7%
if -9.99999999999999954e170 < z < 2.65e132Initial program 70.7%
associate-*l/78.6%
Simplified78.6%
*-commutative78.6%
clear-num78.5%
un-div-inv79.1%
Applied egg-rr79.1%
*-un-lft-identity79.1%
div-inv79.0%
times-frac70.4%
Applied egg-rr70.4%
Taylor expanded in y around inf 65.3%
associate-/l*77.2%
Simplified77.2%
Final simplification80.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.8e+31) (not (<= a 35000.0))) (+ x (/ y (/ (- a t) (- z t)))) (+ y (/ (- x y) (/ t (- z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.8e+31) || !(a <= 35000.0)) {
tmp = x + (y / ((a - t) / (z - t)));
} else {
tmp = y + ((x - y) / (t / (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 ((a <= (-3.8d+31)) .or. (.not. (a <= 35000.0d0))) then
tmp = x + (y / ((a - t) / (z - t)))
else
tmp = y + ((x - y) / (t / (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 ((a <= -3.8e+31) || !(a <= 35000.0)) {
tmp = x + (y / ((a - t) / (z - t)));
} else {
tmp = y + ((x - y) / (t / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3.8e+31) or not (a <= 35000.0): tmp = x + (y / ((a - t) / (z - t))) else: tmp = y + ((x - y) / (t / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.8e+31) || !(a <= 35000.0)) tmp = Float64(x + Float64(y / Float64(Float64(a - t) / Float64(z - t)))); else tmp = Float64(y + Float64(Float64(x - y) / Float64(t / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3.8e+31) || ~((a <= 35000.0))) tmp = x + (y / ((a - t) / (z - t))); else tmp = y + ((x - y) / (t / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.8e+31], N[Not[LessEqual[a, 35000.0]], $MachinePrecision]], N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(N[(x - y), $MachinePrecision] / N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.8 \cdot 10^{+31} \lor \neg \left(a \leq 35000\right):\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\
\end{array}
\end{array}
if a < -3.8000000000000001e31 or 35000 < a Initial program 68.5%
associate-*l/90.2%
Simplified90.2%
*-commutative90.2%
clear-num90.2%
un-div-inv90.2%
Applied egg-rr90.2%
*-un-lft-identity90.2%
div-inv90.2%
times-frac68.5%
Applied egg-rr68.5%
Taylor expanded in y around inf 65.5%
associate-/l*85.9%
Simplified85.9%
if -3.8000000000000001e31 < a < 35000Initial program 74.5%
+-commutative74.5%
*-commutative74.5%
associate-/l*75.7%
associate-/r/80.1%
fma-def80.1%
Simplified80.1%
Taylor expanded in t around inf 74.0%
cancel-sign-sub-inv74.0%
metadata-eval74.0%
*-lft-identity74.0%
distribute-lft-in74.0%
mul-1-neg74.0%
distribute-rgt-neg-in74.0%
*-commutative74.0%
mul-1-neg74.0%
*-commutative74.0%
cancel-sign-sub74.0%
mul-1-neg74.0%
associate-*r*74.0%
distribute-lft-out--74.0%
associate-*r/74.0%
Simplified80.0%
Final simplification82.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -8000000000.0) (not (<= t 80000000000000.0))) (* y (/ (- z t) (- a t))) (+ x (/ z (/ a (- y x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -8000000000.0) || !(t <= 80000000000000.0)) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x + (z / (a / (y - 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 ((t <= (-8000000000.0d0)) .or. (.not. (t <= 80000000000000.0d0))) then
tmp = y * ((z - t) / (a - t))
else
tmp = x + (z / (a / (y - x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -8000000000.0) || !(t <= 80000000000000.0)) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x + (z / (a / (y - x)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -8000000000.0) or not (t <= 80000000000000.0): tmp = y * ((z - t) / (a - t)) else: tmp = x + (z / (a / (y - x))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -8000000000.0) || !(t <= 80000000000000.0)) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); else tmp = Float64(x + Float64(z / Float64(a / Float64(y - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -8000000000.0) || ~((t <= 80000000000000.0))) tmp = y * ((z - t) / (a - t)); else tmp = x + (z / (a / (y - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -8000000000.0], N[Not[LessEqual[t, 80000000000000.0]], $MachinePrecision]], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z / N[(a / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8000000000 \lor \neg \left(t \leq 80000000000000\right):\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\
\end{array}
\end{array}
if t < -8e9 or 8e13 < t Initial program 53.8%
+-commutative53.8%
*-commutative53.8%
associate-/l*73.3%
associate-/r/80.9%
fma-def80.9%
Simplified80.9%
Taylor expanded in y around inf 67.9%
div-sub67.9%
Simplified67.9%
if -8e9 < t < 8e13Initial program 89.2%
+-commutative89.2%
*-commutative89.2%
associate-/l*91.1%
associate-/r/92.9%
fma-def92.9%
Simplified92.9%
Taylor expanded in t around 0 70.1%
associate-/l*73.7%
Simplified73.7%
Final simplification70.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.15e+14) (not (<= t 65000000000000.0))) (* y (/ (- z t) (- a t))) (- x (/ (- x y) (/ a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.15e+14) || !(t <= 65000000000000.0)) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x - ((x - y) / (a / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-1.15d+14)) .or. (.not. (t <= 65000000000000.0d0))) then
tmp = y * ((z - t) / (a - t))
else
tmp = x - ((x - y) / (a / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.15e+14) || !(t <= 65000000000000.0)) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x - ((x - y) / (a / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.15e+14) or not (t <= 65000000000000.0): tmp = y * ((z - t) / (a - t)) else: tmp = x - ((x - y) / (a / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.15e+14) || !(t <= 65000000000000.0)) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); else tmp = Float64(x - Float64(Float64(x - y) / Float64(a / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.15e+14) || ~((t <= 65000000000000.0))) tmp = y * ((z - t) / (a - t)); else tmp = x - ((x - y) / (a / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.15e+14], N[Not[LessEqual[t, 65000000000000.0]], $MachinePrecision]], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(x - y), $MachinePrecision] / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{+14} \lor \neg \left(t \leq 65000000000000\right):\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{x - y}{\frac{a}{z}}\\
\end{array}
\end{array}
if t < -1.15e14 or 6.5e13 < t Initial program 53.8%
+-commutative53.8%
*-commutative53.8%
associate-/l*73.3%
associate-/r/80.9%
fma-def80.9%
Simplified80.9%
Taylor expanded in y around inf 67.9%
div-sub67.9%
Simplified67.9%
if -1.15e14 < t < 6.5e13Initial program 89.2%
associate-/l*92.8%
Simplified92.8%
Taylor expanded in t around 0 75.1%
Final simplification71.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.4e-36) (not (<= t 2.8e-13))) (- y (/ z (/ t (- y x)))) (- x (/ (- x y) (/ a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.4e-36) || !(t <= 2.8e-13)) {
tmp = y - (z / (t / (y - x)));
} else {
tmp = x - ((x - y) / (a / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-2.4d-36)) .or. (.not. (t <= 2.8d-13))) then
tmp = y - (z / (t / (y - x)))
else
tmp = x - ((x - y) / (a / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.4e-36) || !(t <= 2.8e-13)) {
tmp = y - (z / (t / (y - x)));
} else {
tmp = x - ((x - y) / (a / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.4e-36) or not (t <= 2.8e-13): tmp = y - (z / (t / (y - x))) else: tmp = x - ((x - y) / (a / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.4e-36) || !(t <= 2.8e-13)) tmp = Float64(y - Float64(z / Float64(t / Float64(y - x)))); else tmp = Float64(x - Float64(Float64(x - y) / Float64(a / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.4e-36) || ~((t <= 2.8e-13))) tmp = y - (z / (t / (y - x))); else tmp = x - ((x - y) / (a / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.4e-36], N[Not[LessEqual[t, 2.8e-13]], $MachinePrecision]], N[(y - N[(z / N[(t / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(x - y), $MachinePrecision] / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.4 \cdot 10^{-36} \lor \neg \left(t \leq 2.8 \cdot 10^{-13}\right):\\
\;\;\;\;y - \frac{z}{\frac{t}{y - x}}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{x - y}{\frac{a}{z}}\\
\end{array}
\end{array}
if t < -2.4e-36 or 2.8000000000000002e-13 < t Initial program 55.8%
+-commutative55.8%
*-commutative55.8%
associate-/l*73.8%
associate-/r/80.9%
fma-def80.9%
Simplified80.9%
Taylor expanded in t around -inf 62.9%
Taylor expanded in a around 0 61.5%
mul-1-neg61.5%
unsub-neg61.5%
associate-/l*73.8%
Simplified73.8%
if -2.4e-36 < t < 2.8000000000000002e-13Initial program 89.9%
associate-/l*93.8%
Simplified93.8%
Taylor expanded in t around 0 77.8%
Final simplification75.6%
(FPCore (x y z t a) :precision binary64 (if (<= x -2.2e+85) (* x (- 1.0 (/ z a))) (if (<= x 1.3e+109) (* y (/ (- z t) (- a t))) (- x (* z (/ x a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -2.2e+85) {
tmp = x * (1.0 - (z / a));
} else if (x <= 1.3e+109) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x - (z * (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 (x <= (-2.2d+85)) then
tmp = x * (1.0d0 - (z / a))
else if (x <= 1.3d+109) then
tmp = y * ((z - t) / (a - t))
else
tmp = x - (z * (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 (x <= -2.2e+85) {
tmp = x * (1.0 - (z / a));
} else if (x <= 1.3e+109) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x - (z * (x / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -2.2e+85: tmp = x * (1.0 - (z / a)) elif x <= 1.3e+109: tmp = y * ((z - t) / (a - t)) else: tmp = x - (z * (x / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -2.2e+85) tmp = Float64(x * Float64(1.0 - Float64(z / a))); elseif (x <= 1.3e+109) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); else tmp = Float64(x - Float64(z * Float64(x / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -2.2e+85) tmp = x * (1.0 - (z / a)); elseif (x <= 1.3e+109) tmp = y * ((z - t) / (a - t)); else tmp = x - (z * (x / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -2.2e+85], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.3e+109], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(z * N[(x / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.2 \cdot 10^{+85}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{elif}\;x \leq 1.3 \cdot 10^{+109}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x - z \cdot \frac{x}{a}\\
\end{array}
\end{array}
if x < -2.2000000000000002e85Initial program 62.1%
associate-/l*77.0%
Simplified77.0%
Taylor expanded in t around 0 52.9%
Taylor expanded in x around inf 47.8%
mul-1-neg47.8%
unsub-neg47.8%
Simplified47.8%
if -2.2000000000000002e85 < x < 1.2999999999999999e109Initial program 76.7%
+-commutative76.7%
*-commutative76.7%
associate-/l*86.1%
associate-/r/91.6%
fma-def91.6%
Simplified91.6%
Taylor expanded in y around inf 72.4%
div-sub72.4%
Simplified72.4%
if 1.2999999999999999e109 < x Initial program 59.3%
associate-/l*76.3%
Simplified76.3%
Taylor expanded in t around 0 62.2%
Taylor expanded in y around 0 48.5%
mul-1-neg48.5%
unsub-neg48.5%
associate-/l*53.0%
associate-/r/54.6%
Simplified54.6%
Final simplification65.9%
(FPCore (x y z t a)
:precision binary64
(if (<= a -4.6e+96)
x
(if (<= a 2.6e-307)
y
(if (<= a 1.85e-259) (/ x (/ t z)) (if (<= a 1.45e+32) y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.6e+96) {
tmp = x;
} else if (a <= 2.6e-307) {
tmp = y;
} else if (a <= 1.85e-259) {
tmp = x / (t / z);
} else if (a <= 1.45e+32) {
tmp = y;
} 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 <= (-4.6d+96)) then
tmp = x
else if (a <= 2.6d-307) then
tmp = y
else if (a <= 1.85d-259) then
tmp = x / (t / z)
else if (a <= 1.45d+32) then
tmp = y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.6e+96) {
tmp = x;
} else if (a <= 2.6e-307) {
tmp = y;
} else if (a <= 1.85e-259) {
tmp = x / (t / z);
} else if (a <= 1.45e+32) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.6e+96: tmp = x elif a <= 2.6e-307: tmp = y elif a <= 1.85e-259: tmp = x / (t / z) elif a <= 1.45e+32: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.6e+96) tmp = x; elseif (a <= 2.6e-307) tmp = y; elseif (a <= 1.85e-259) tmp = Float64(x / Float64(t / z)); elseif (a <= 1.45e+32) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -4.6e+96) tmp = x; elseif (a <= 2.6e-307) tmp = y; elseif (a <= 1.85e-259) tmp = x / (t / z); elseif (a <= 1.45e+32) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.6e+96], x, If[LessEqual[a, 2.6e-307], y, If[LessEqual[a, 1.85e-259], N[(x / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.45e+32], y, x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.6 \cdot 10^{+96}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.6 \cdot 10^{-307}:\\
\;\;\;\;y\\
\mathbf{elif}\;a \leq 1.85 \cdot 10^{-259}:\\
\;\;\;\;\frac{x}{\frac{t}{z}}\\
\mathbf{elif}\;a \leq 1.45 \cdot 10^{+32}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -4.6000000000000003e96 or 1.45000000000000001e32 < a Initial program 69.5%
+-commutative69.5%
*-commutative69.5%
associate-/l*92.4%
associate-/r/97.3%
fma-def97.3%
Simplified97.3%
Taylor expanded in a around inf 46.2%
if -4.6000000000000003e96 < a < 2.59999999999999996e-307 or 1.84999999999999996e-259 < a < 1.45000000000000001e32Initial program 72.7%
+-commutative72.7%
*-commutative72.7%
associate-/l*76.3%
associate-/r/80.7%
fma-def80.6%
Simplified80.6%
Taylor expanded in t around inf 36.0%
if 2.59999999999999996e-307 < a < 1.84999999999999996e-259Initial program 78.8%
+-commutative78.8%
*-commutative78.8%
associate-/l*72.3%
associate-/r/79.0%
fma-def79.0%
Simplified79.0%
Taylor expanded in t around -inf 92.8%
Taylor expanded in y around 0 49.2%
associate-/l*62.6%
Simplified62.6%
Taylor expanded in z around inf 49.2%
associate-/l*62.6%
Simplified62.6%
Final simplification41.4%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.7e+112)
(* x (+ 1.0 (/ t a)))
(if (<= a 2.45e-304)
y
(if (<= a 1.7e-259) (/ x (/ t z)) (if (<= a 1.5e+32) y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.7e+112) {
tmp = x * (1.0 + (t / a));
} else if (a <= 2.45e-304) {
tmp = y;
} else if (a <= 1.7e-259) {
tmp = x / (t / z);
} else if (a <= 1.5e+32) {
tmp = y;
} 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 <= (-1.7d+112)) then
tmp = x * (1.0d0 + (t / a))
else if (a <= 2.45d-304) then
tmp = y
else if (a <= 1.7d-259) then
tmp = x / (t / z)
else if (a <= 1.5d+32) then
tmp = y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.7e+112) {
tmp = x * (1.0 + (t / a));
} else if (a <= 2.45e-304) {
tmp = y;
} else if (a <= 1.7e-259) {
tmp = x / (t / z);
} else if (a <= 1.5e+32) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.7e+112: tmp = x * (1.0 + (t / a)) elif a <= 2.45e-304: tmp = y elif a <= 1.7e-259: tmp = x / (t / z) elif a <= 1.5e+32: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.7e+112) tmp = Float64(x * Float64(1.0 + Float64(t / a))); elseif (a <= 2.45e-304) tmp = y; elseif (a <= 1.7e-259) tmp = Float64(x / Float64(t / z)); elseif (a <= 1.5e+32) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.7e+112) tmp = x * (1.0 + (t / a)); elseif (a <= 2.45e-304) tmp = y; elseif (a <= 1.7e-259) tmp = x / (t / z); elseif (a <= 1.5e+32) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.7e+112], N[(x * N[(1.0 + N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.45e-304], y, If[LessEqual[a, 1.7e-259], N[(x / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.5e+32], y, x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.7 \cdot 10^{+112}:\\
\;\;\;\;x \cdot \left(1 + \frac{t}{a}\right)\\
\mathbf{elif}\;a \leq 2.45 \cdot 10^{-304}:\\
\;\;\;\;y\\
\mathbf{elif}\;a \leq 1.7 \cdot 10^{-259}:\\
\;\;\;\;\frac{x}{\frac{t}{z}}\\
\mathbf{elif}\;a \leq 1.5 \cdot 10^{+32}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.69999999999999997e112Initial program 68.3%
+-commutative68.3%
*-commutative68.3%
associate-/l*91.8%
associate-/r/97.2%
fma-def97.2%
Simplified97.2%
Taylor expanded in a around inf 65.4%
associate-/l*88.2%
Simplified88.2%
Taylor expanded in z around 0 52.0%
mul-1-neg52.0%
associate-/l*62.0%
distribute-neg-frac62.0%
Simplified62.0%
Taylor expanded in x around inf 49.0%
if -1.69999999999999997e112 < a < 2.4500000000000002e-304 or 1.70000000000000006e-259 < a < 1.5e32Initial program 73.2%
+-commutative73.2%
*-commutative73.2%
associate-/l*76.8%
associate-/r/81.1%
fma-def81.0%
Simplified81.0%
Taylor expanded in t around inf 36.0%
if 2.4500000000000002e-304 < a < 1.70000000000000006e-259Initial program 78.8%
+-commutative78.8%
*-commutative78.8%
associate-/l*72.3%
associate-/r/79.0%
fma-def79.0%
Simplified79.0%
Taylor expanded in t around -inf 92.8%
Taylor expanded in y around 0 49.2%
associate-/l*62.6%
Simplified62.6%
Taylor expanded in z around inf 49.2%
associate-/l*62.6%
Simplified62.6%
if 1.5e32 < a Initial program 68.7%
+-commutative68.7%
*-commutative68.7%
associate-/l*92.4%
associate-/r/97.2%
fma-def97.2%
Simplified97.2%
Taylor expanded in a around inf 45.3%
Final simplification41.5%
(FPCore (x y z t a) :precision binary64 (if (<= t -4.2e+27) y (if (<= t 3.7e+39) (* x (- 1.0 (/ z a))) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.2e+27) {
tmp = y;
} else if (t <= 3.7e+39) {
tmp = x * (1.0 - (z / a));
} else {
tmp = 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 (t <= (-4.2d+27)) then
tmp = y
else if (t <= 3.7d+39) then
tmp = x * (1.0d0 - (z / a))
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.2e+27) {
tmp = y;
} else if (t <= 3.7e+39) {
tmp = x * (1.0 - (z / a));
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -4.2e+27: tmp = y elif t <= 3.7e+39: tmp = x * (1.0 - (z / a)) else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4.2e+27) tmp = y; elseif (t <= 3.7e+39) tmp = Float64(x * Float64(1.0 - Float64(z / a))); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -4.2e+27) tmp = y; elseif (t <= 3.7e+39) tmp = x * (1.0 - (z / a)); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.2e+27], y, If[LessEqual[t, 3.7e+39], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.2 \cdot 10^{+27}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 3.7 \cdot 10^{+39}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -4.19999999999999989e27 or 3.70000000000000012e39 < t Initial program 51.5%
+-commutative51.5%
*-commutative51.5%
associate-/l*72.3%
associate-/r/80.5%
fma-def80.4%
Simplified80.4%
Taylor expanded in t around inf 48.5%
if -4.19999999999999989e27 < t < 3.70000000000000012e39Initial program 89.1%
associate-/l*92.5%
Simplified92.5%
Taylor expanded in t around 0 72.4%
Taylor expanded in x around inf 47.2%
mul-1-neg47.2%
unsub-neg47.2%
Simplified47.2%
Final simplification47.8%
(FPCore (x y z t a) :precision binary64 (if (<= a -5.1e+95) x (if (<= a 1.3e+32) y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.1e+95) {
tmp = x;
} else if (a <= 1.3e+32) {
tmp = y;
} 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 <= (-5.1d+95)) then
tmp = x
else if (a <= 1.3d+32) then
tmp = y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.1e+95) {
tmp = x;
} else if (a <= 1.3e+32) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5.1e+95: tmp = x elif a <= 1.3e+32: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5.1e+95) tmp = x; elseif (a <= 1.3e+32) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -5.1e+95) tmp = x; elseif (a <= 1.3e+32) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.1e+95], x, If[LessEqual[a, 1.3e+32], y, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.1 \cdot 10^{+95}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.3 \cdot 10^{+32}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -5.10000000000000003e95 or 1.3000000000000001e32 < a Initial program 69.5%
+-commutative69.5%
*-commutative69.5%
associate-/l*92.4%
associate-/r/97.3%
fma-def97.3%
Simplified97.3%
Taylor expanded in a around inf 46.2%
if -5.10000000000000003e95 < a < 1.3000000000000001e32Initial program 73.2%
+-commutative73.2%
*-commutative73.2%
associate-/l*76.0%
associate-/r/80.5%
fma-def80.5%
Simplified80.5%
Taylor expanded in t around inf 35.5%
Final simplification39.6%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
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
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 71.8%
+-commutative71.8%
*-commutative71.8%
associate-/l*82.3%
associate-/r/87.0%
fma-def87.0%
Simplified87.0%
Taylor expanded in a around inf 22.5%
Final simplification22.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))
(if (< a -1.6153062845442575e-142)
t_1
(if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
double tmp;
if (a < -1.6153062845442575e-142) {
tmp = t_1;
} else if (a < 3.774403170083174e-182) {
tmp = y - ((z / t) * (y - 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 = x + (((y - x) / 1.0d0) * ((z - t) / (a - t)))
if (a < (-1.6153062845442575d-142)) then
tmp = t_1
else if (a < 3.774403170083174d-182) then
tmp = y - ((z / t) * (y - 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 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
double tmp;
if (a < -1.6153062845442575e-142) {
tmp = t_1;
} else if (a < 3.774403170083174e-182) {
tmp = y - ((z / t) * (y - x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t))) tmp = 0 if a < -1.6153062845442575e-142: tmp = t_1 elif a < 3.774403170083174e-182: tmp = y - ((z / t) * (y - x)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - x) / 1.0) * Float64(Float64(z - t) / Float64(a - t)))) tmp = 0.0 if (a < -1.6153062845442575e-142) tmp = t_1; elseif (a < 3.774403170083174e-182) tmp = Float64(y - Float64(Float64(z / t) * Float64(y - x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t))); tmp = 0.0; if (a < -1.6153062845442575e-142) tmp = t_1; elseif (a < 3.774403170083174e-182) tmp = y - ((z / t) * (y - x)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] / 1.0), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[a, -1.6153062845442575e-142], t$95$1, If[Less[a, 3.774403170083174e-182], N[(y - N[(N[(z / t), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\
\;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
herbie shell --seed 2023333
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
:precision binary64
:herbie-target
(if (< a -1.6153062845442575e-142) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t)))) (if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))
(+ x (/ (* (- y x) (- z t)) (- a t))))