
(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 19 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 (if (or (<= t -1.12e+182) (not (<= t 1.2e+133))) (+ y (* (/ (- y x) t) (- a z))) (fma (- y x) (/ (- z t) (- a t)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.12e+182) || !(t <= 1.2e+133)) {
tmp = y + (((y - x) / t) * (a - z));
} else {
tmp = fma((y - x), ((z - t) / (a - t)), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.12e+182) || !(t <= 1.2e+133)) tmp = Float64(y + Float64(Float64(Float64(y - x) / t) * Float64(a - z))); else tmp = fma(Float64(y - x), Float64(Float64(z - t) / Float64(a - t)), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.12e+182], N[Not[LessEqual[t, 1.2e+133]], $MachinePrecision]], N[(y + N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - x), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.12 \cdot 10^{+182} \lor \neg \left(t \leq 1.2 \cdot 10^{+133}\right):\\
\;\;\;\;y + \frac{y - x}{t} \cdot \left(a - z\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\
\end{array}
\end{array}
if t < -1.11999999999999994e182 or 1.1999999999999999e133 < t Initial program 30.8%
clear-num30.8%
inv-pow30.8%
*-commutative30.8%
associate-/r*55.7%
Applied egg-rr55.7%
unpow-155.7%
Applied egg-rr55.7%
Taylor expanded in t around inf 63.0%
associate--l+63.0%
distribute-lft-out--63.0%
div-sub63.0%
mul-1-neg63.0%
unsub-neg63.0%
div-sub63.0%
associate-/l*76.2%
associate-/l*91.5%
distribute-rgt-out--91.5%
Simplified91.5%
if -1.11999999999999994e182 < t < 1.1999999999999999e133Initial program 83.1%
+-commutative83.1%
associate-/l*91.9%
fma-define91.9%
Simplified91.9%
Final simplification91.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ y (* (/ (- y x) t) (- a z))))
(t_2 (- x (/ (* (- y x) (- t z)) (- a t)))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -5e-252)
t_2
(if (<= t_2 0.0)
(+ y (* (- y x) (/ (- a z) t)))
(if (<= t_2 2e+301) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y + (((y - x) / t) * (a - z));
double t_2 = x - (((y - x) * (t - z)) / (a - t));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -5e-252) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = y + ((y - x) * ((a - z) / t));
} else if (t_2 <= 2e+301) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y + (((y - x) / t) * (a - z));
double t_2 = x - (((y - x) * (t - z)) / (a - t));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= -5e-252) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = y + ((y - x) * ((a - z) / t));
} else if (t_2 <= 2e+301) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y + (((y - x) / t) * (a - z)) t_2 = x - (((y - x) * (t - z)) / (a - t)) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -5e-252: tmp = t_2 elif t_2 <= 0.0: tmp = y + ((y - x) * ((a - z) / t)) elif t_2 <= 2e+301: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y + Float64(Float64(Float64(y - x) / t) * Float64(a - z))) t_2 = Float64(x - Float64(Float64(Float64(y - x) * Float64(t - z)) / Float64(a - t))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= -5e-252) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(y + Float64(Float64(y - x) * Float64(Float64(a - z) / t))); elseif (t_2 <= 2e+301) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y + (((y - x) / t) * (a - z)); t_2 = x - (((y - x) * (t - z)) / (a - t)); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -5e-252) tmp = t_2; elseif (t_2 <= 0.0) tmp = y + ((y - x) * ((a - z) / t)); elseif (t_2 <= 2e+301) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y + N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(N[(N[(y - x), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -5e-252], t$95$2, If[LessEqual[t$95$2, 0.0], N[(y + N[(N[(y - x), $MachinePrecision] * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+301], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \frac{y - x}{t} \cdot \left(a - z\right)\\
t_2 := x - \frac{\left(y - x\right) \cdot \left(t - z\right)}{a - t}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-252}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;y + \left(y - x\right) \cdot \frac{a - z}{t}\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+301}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -inf.0 or 2.00000000000000011e301 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 41.3%
clear-num41.3%
inv-pow41.3%
*-commutative41.3%
associate-/r*76.5%
Applied egg-rr76.5%
unpow-176.5%
Applied egg-rr76.5%
Taylor expanded in t around inf 49.7%
associate--l+49.7%
distribute-lft-out--49.7%
div-sub50.9%
mul-1-neg50.9%
unsub-neg50.9%
div-sub49.7%
associate-/l*59.5%
associate-/l*72.4%
distribute-rgt-out--75.7%
Simplified75.7%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -5.00000000000000008e-252 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 2.00000000000000011e301Initial program 99.8%
if -5.00000000000000008e-252 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.3%
Taylor expanded in t around inf 95.3%
associate--l+95.3%
associate-*r/95.3%
associate-*r/95.3%
div-sub95.4%
distribute-lft-out--95.4%
associate-*r/95.4%
mul-1-neg95.4%
unsub-neg95.4%
distribute-rgt-out--95.3%
associate-/l*99.7%
Simplified99.7%
Final simplification90.7%
(FPCore (x y z t a)
:precision binary64
(if (<= a -4.7e+52)
(- x (* x (/ z a)))
(if (<= a 7.5e-209)
(* y (/ (- t z) t))
(if (<= a 4.3e-39)
(/ z (/ t (- x y)))
(if (<= a 5.7e+51)
(+ x (/ (* y z) a))
(if (<= a 1.7e+95) (* t (/ y (- t a))) (+ x (* z (/ y a)))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.7e+52) {
tmp = x - (x * (z / a));
} else if (a <= 7.5e-209) {
tmp = y * ((t - z) / t);
} else if (a <= 4.3e-39) {
tmp = z / (t / (x - y));
} else if (a <= 5.7e+51) {
tmp = x + ((y * z) / a);
} else if (a <= 1.7e+95) {
tmp = t * (y / (t - a));
} else {
tmp = x + (z * (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 (a <= (-4.7d+52)) then
tmp = x - (x * (z / a))
else if (a <= 7.5d-209) then
tmp = y * ((t - z) / t)
else if (a <= 4.3d-39) then
tmp = z / (t / (x - y))
else if (a <= 5.7d+51) then
tmp = x + ((y * z) / a)
else if (a <= 1.7d+95) then
tmp = t * (y / (t - a))
else
tmp = x + (z * (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 (a <= -4.7e+52) {
tmp = x - (x * (z / a));
} else if (a <= 7.5e-209) {
tmp = y * ((t - z) / t);
} else if (a <= 4.3e-39) {
tmp = z / (t / (x - y));
} else if (a <= 5.7e+51) {
tmp = x + ((y * z) / a);
} else if (a <= 1.7e+95) {
tmp = t * (y / (t - a));
} else {
tmp = x + (z * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.7e+52: tmp = x - (x * (z / a)) elif a <= 7.5e-209: tmp = y * ((t - z) / t) elif a <= 4.3e-39: tmp = z / (t / (x - y)) elif a <= 5.7e+51: tmp = x + ((y * z) / a) elif a <= 1.7e+95: tmp = t * (y / (t - a)) else: tmp = x + (z * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.7e+52) tmp = Float64(x - Float64(x * Float64(z / a))); elseif (a <= 7.5e-209) tmp = Float64(y * Float64(Float64(t - z) / t)); elseif (a <= 4.3e-39) tmp = Float64(z / Float64(t / Float64(x - y))); elseif (a <= 5.7e+51) tmp = Float64(x + Float64(Float64(y * z) / a)); elseif (a <= 1.7e+95) tmp = Float64(t * Float64(y / Float64(t - a))); else tmp = Float64(x + Float64(z * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -4.7e+52) tmp = x - (x * (z / a)); elseif (a <= 7.5e-209) tmp = y * ((t - z) / t); elseif (a <= 4.3e-39) tmp = z / (t / (x - y)); elseif (a <= 5.7e+51) tmp = x + ((y * z) / a); elseif (a <= 1.7e+95) tmp = t * (y / (t - a)); else tmp = x + (z * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.7e+52], N[(x - N[(x * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.5e-209], N[(y * N[(N[(t - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.3e-39], N[(z / N[(t / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.7e+51], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.7e+95], N[(t * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.7 \cdot 10^{+52}:\\
\;\;\;\;x - x \cdot \frac{z}{a}\\
\mathbf{elif}\;a \leq 7.5 \cdot 10^{-209}:\\
\;\;\;\;y \cdot \frac{t - z}{t}\\
\mathbf{elif}\;a \leq 4.3 \cdot 10^{-39}:\\
\;\;\;\;\frac{z}{\frac{t}{x - y}}\\
\mathbf{elif}\;a \leq 5.7 \cdot 10^{+51}:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\
\mathbf{elif}\;a \leq 1.7 \cdot 10^{+95}:\\
\;\;\;\;t \cdot \frac{y}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if a < -4.7e52Initial program 65.0%
Taylor expanded in t around 0 61.9%
associate-/l*72.0%
Simplified72.0%
Taylor expanded in y around 0 51.7%
mul-1-neg51.7%
unsub-neg51.7%
associate-/l*61.8%
Simplified61.8%
if -4.7e52 < a < 7.49999999999999965e-209Initial program 72.7%
clear-num72.6%
inv-pow72.6%
*-commutative72.6%
associate-/r*81.2%
Applied egg-rr81.2%
Taylor expanded in x around 0 60.7%
associate-/l*68.4%
Simplified68.4%
Taylor expanded in a around 0 63.2%
associate-*r/63.2%
neg-mul-163.2%
Simplified63.2%
if 7.49999999999999965e-209 < a < 4.2999999999999999e-39Initial program 61.5%
Taylor expanded in z around inf 73.3%
sub-div73.3%
div-inv73.2%
Applied egg-rr73.2%
Taylor expanded in a around 0 47.1%
mul-1-neg47.1%
associate-/l*55.6%
distribute-rgt-neg-in55.6%
distribute-neg-frac255.6%
Simplified55.6%
associate-*r/47.1%
distribute-frac-neg247.1%
add-sqr-sqrt27.7%
sqrt-unprod25.6%
sqr-neg25.6%
sqrt-unprod1.1%
add-sqr-sqrt10.7%
associate-*r/10.8%
clear-num10.8%
un-div-inv10.8%
add-sqr-sqrt1.1%
sqrt-unprod25.8%
sqr-neg25.8%
sqrt-unprod30.5%
add-sqr-sqrt55.8%
Applied egg-rr55.8%
if 4.2999999999999999e-39 < a < 5.7000000000000002e51Initial program 86.5%
Taylor expanded in t around 0 53.0%
associate-/l*52.9%
Simplified52.9%
Taylor expanded in y around inf 53.2%
if 5.7000000000000002e51 < a < 1.70000000000000011e95Initial program 68.9%
clear-num68.9%
inv-pow68.9%
*-commutative68.9%
associate-/r*91.2%
Applied egg-rr91.2%
Taylor expanded in x around 0 52.7%
associate-/l*75.4%
Simplified75.4%
Taylor expanded in z around 0 53.0%
mul-1-neg53.0%
associate-/l*75.1%
distribute-rgt-neg-in75.1%
distribute-frac-neg275.1%
neg-sub075.1%
associate--r-75.1%
neg-sub075.1%
Simplified75.1%
if 1.70000000000000011e95 < a Initial program 66.6%
Taylor expanded in t around 0 53.4%
associate-/l*65.9%
Simplified65.9%
Taylor expanded in y around inf 59.7%
Final simplification61.1%
(FPCore (x y z t a)
:precision binary64
(if (<= a -3.2e+52)
x
(if (<= a -6e-193)
y
(if (<= a 0.00065)
(* x (/ z t))
(if (<= a 9e+108) (* y (/ (- z t) a)) x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.2e+52) {
tmp = x;
} else if (a <= -6e-193) {
tmp = y;
} else if (a <= 0.00065) {
tmp = x * (z / t);
} else if (a <= 9e+108) {
tmp = y * ((z - t) / a);
} 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 <= (-3.2d+52)) then
tmp = x
else if (a <= (-6d-193)) then
tmp = y
else if (a <= 0.00065d0) then
tmp = x * (z / t)
else if (a <= 9d+108) then
tmp = y * ((z - t) / a)
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 <= -3.2e+52) {
tmp = x;
} else if (a <= -6e-193) {
tmp = y;
} else if (a <= 0.00065) {
tmp = x * (z / t);
} else if (a <= 9e+108) {
tmp = y * ((z - t) / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.2e+52: tmp = x elif a <= -6e-193: tmp = y elif a <= 0.00065: tmp = x * (z / t) elif a <= 9e+108: tmp = y * ((z - t) / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.2e+52) tmp = x; elseif (a <= -6e-193) tmp = y; elseif (a <= 0.00065) tmp = Float64(x * Float64(z / t)); elseif (a <= 9e+108) tmp = Float64(y * Float64(Float64(z - t) / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.2e+52) tmp = x; elseif (a <= -6e-193) tmp = y; elseif (a <= 0.00065) tmp = x * (z / t); elseif (a <= 9e+108) tmp = y * ((z - t) / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.2e+52], x, If[LessEqual[a, -6e-193], y, If[LessEqual[a, 0.00065], N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9e+108], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.2 \cdot 10^{+52}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -6 \cdot 10^{-193}:\\
\;\;\;\;y\\
\mathbf{elif}\;a \leq 0.00065:\\
\;\;\;\;x \cdot \frac{z}{t}\\
\mathbf{elif}\;a \leq 9 \cdot 10^{+108}:\\
\;\;\;\;y \cdot \frac{z - t}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.2e52 or 9e108 < a Initial program 67.0%
Taylor expanded in a around inf 50.3%
if -3.2e52 < a < -5.9999999999999998e-193Initial program 74.9%
Taylor expanded in t around inf 41.3%
if -5.9999999999999998e-193 < a < 6.4999999999999997e-4Initial program 68.1%
Taylor expanded in z around inf 62.4%
sub-div62.4%
div-inv62.3%
Applied egg-rr62.3%
Taylor expanded in a around 0 49.3%
mul-1-neg49.3%
associate-/l*54.0%
distribute-rgt-neg-in54.0%
distribute-neg-frac254.0%
Simplified54.0%
Taylor expanded in y around 0 36.2%
associate-/l*42.0%
Simplified42.0%
if 6.4999999999999997e-4 < a < 9e108Initial program 72.9%
clear-num72.8%
inv-pow72.8%
*-commutative72.8%
associate-/r*90.3%
Applied egg-rr90.3%
Taylor expanded in x around 0 50.9%
associate-/l*68.4%
Simplified68.4%
Taylor expanded in a around inf 35.6%
associate-/l*42.8%
Simplified42.8%
Final simplification44.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* z (/ y a)))))
(if (<= a -3.2e-49)
t_1
(if (<= a 2.75e-39)
(/ z (/ t (- x y)))
(if (<= a 2.6e+51)
(+ x (/ (* y z) a))
(if (<= a 1.75e+95) (* t (/ y (- t a))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z * (y / a));
double tmp;
if (a <= -3.2e-49) {
tmp = t_1;
} else if (a <= 2.75e-39) {
tmp = z / (t / (x - y));
} else if (a <= 2.6e+51) {
tmp = x + ((y * z) / a);
} else if (a <= 1.75e+95) {
tmp = t * (y / (t - a));
} 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 + (z * (y / a))
if (a <= (-3.2d-49)) then
tmp = t_1
else if (a <= 2.75d-39) then
tmp = z / (t / (x - y))
else if (a <= 2.6d+51) then
tmp = x + ((y * z) / a)
else if (a <= 1.75d+95) then
tmp = t * (y / (t - a))
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 + (z * (y / a));
double tmp;
if (a <= -3.2e-49) {
tmp = t_1;
} else if (a <= 2.75e-39) {
tmp = z / (t / (x - y));
} else if (a <= 2.6e+51) {
tmp = x + ((y * z) / a);
} else if (a <= 1.75e+95) {
tmp = t * (y / (t - a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (z * (y / a)) tmp = 0 if a <= -3.2e-49: tmp = t_1 elif a <= 2.75e-39: tmp = z / (t / (x - y)) elif a <= 2.6e+51: tmp = x + ((y * z) / a) elif a <= 1.75e+95: tmp = t * (y / (t - a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(z * Float64(y / a))) tmp = 0.0 if (a <= -3.2e-49) tmp = t_1; elseif (a <= 2.75e-39) tmp = Float64(z / Float64(t / Float64(x - y))); elseif (a <= 2.6e+51) tmp = Float64(x + Float64(Float64(y * z) / a)); elseif (a <= 1.75e+95) tmp = Float64(t * Float64(y / Float64(t - a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (z * (y / a)); tmp = 0.0; if (a <= -3.2e-49) tmp = t_1; elseif (a <= 2.75e-39) tmp = z / (t / (x - y)); elseif (a <= 2.6e+51) tmp = x + ((y * z) / a); elseif (a <= 1.75e+95) tmp = t * (y / (t - a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.2e-49], t$95$1, If[LessEqual[a, 2.75e-39], N[(z / N[(t / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.6e+51], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.75e+95], N[(t * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y}{a}\\
\mathbf{if}\;a \leq -3.2 \cdot 10^{-49}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.75 \cdot 10^{-39}:\\
\;\;\;\;\frac{z}{\frac{t}{x - y}}\\
\mathbf{elif}\;a \leq 2.6 \cdot 10^{+51}:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\
\mathbf{elif}\;a \leq 1.75 \cdot 10^{+95}:\\
\;\;\;\;t \cdot \frac{y}{t - a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -3.20000000000000002e-49 or 1.75e95 < a Initial program 69.6%
Taylor expanded in t around 0 55.3%
associate-/l*64.2%
Simplified64.2%
Taylor expanded in y around inf 55.6%
if -3.20000000000000002e-49 < a < 2.75000000000000009e-39Initial program 66.7%
Taylor expanded in z around inf 61.4%
sub-div61.4%
div-inv61.3%
Applied egg-rr61.3%
Taylor expanded in a around 0 50.7%
mul-1-neg50.7%
associate-/l*54.2%
distribute-rgt-neg-in54.2%
distribute-neg-frac254.2%
Simplified54.2%
associate-*r/50.7%
distribute-frac-neg250.7%
add-sqr-sqrt28.1%
sqrt-unprod21.6%
sqr-neg21.6%
sqrt-unprod1.0%
add-sqr-sqrt5.1%
associate-*r/5.2%
clear-num5.2%
un-div-inv5.2%
add-sqr-sqrt1.0%
sqrt-unprod21.7%
sqr-neg21.7%
sqrt-unprod30.6%
add-sqr-sqrt54.2%
Applied egg-rr54.2%
if 2.75000000000000009e-39 < a < 2.6000000000000001e51Initial program 86.5%
Taylor expanded in t around 0 53.0%
associate-/l*52.9%
Simplified52.9%
Taylor expanded in y around inf 53.2%
if 2.6000000000000001e51 < a < 1.75e95Initial program 68.9%
clear-num68.9%
inv-pow68.9%
*-commutative68.9%
associate-/r*91.2%
Applied egg-rr91.2%
Taylor expanded in x around 0 52.7%
associate-/l*75.4%
Simplified75.4%
Taylor expanded in z around 0 53.0%
mul-1-neg53.0%
associate-/l*75.1%
distribute-rgt-neg-in75.1%
distribute-frac-neg275.1%
neg-sub075.1%
associate--r-75.1%
neg-sub075.1%
Simplified75.1%
Final simplification55.7%
(FPCore (x y z t a)
:precision binary64
(if (<= a -3.8e+105)
(+ x (* z (/ (- y x) (- a t))))
(if (or (<= a -1.2e-46) (not (<= a 2.3e-41)))
(+ x (* (- z t) (/ y (- a t))))
(+ y (* (- y x) (/ (- a z) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.8e+105) {
tmp = x + (z * ((y - x) / (a - t)));
} else if ((a <= -1.2e-46) || !(a <= 2.3e-41)) {
tmp = x + ((z - t) * (y / (a - t)));
} else {
tmp = y + ((y - x) * ((a - 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 (a <= (-3.8d+105)) then
tmp = x + (z * ((y - x) / (a - t)))
else if ((a <= (-1.2d-46)) .or. (.not. (a <= 2.3d-41))) then
tmp = x + ((z - t) * (y / (a - t)))
else
tmp = y + ((y - x) * ((a - 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 (a <= -3.8e+105) {
tmp = x + (z * ((y - x) / (a - t)));
} else if ((a <= -1.2e-46) || !(a <= 2.3e-41)) {
tmp = x + ((z - t) * (y / (a - t)));
} else {
tmp = y + ((y - x) * ((a - z) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.8e+105: tmp = x + (z * ((y - x) / (a - t))) elif (a <= -1.2e-46) or not (a <= 2.3e-41): tmp = x + ((z - t) * (y / (a - t))) else: tmp = y + ((y - x) * ((a - z) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.8e+105) tmp = Float64(x + Float64(z * Float64(Float64(y - x) / Float64(a - t)))); elseif ((a <= -1.2e-46) || !(a <= 2.3e-41)) tmp = Float64(x + Float64(Float64(z - t) * Float64(y / Float64(a - t)))); else tmp = Float64(y + Float64(Float64(y - x) * Float64(Float64(a - z) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.8e+105) tmp = x + (z * ((y - x) / (a - t))); elseif ((a <= -1.2e-46) || ~((a <= 2.3e-41))) tmp = x + ((z - t) * (y / (a - t))); else tmp = y + ((y - x) * ((a - z) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.8e+105], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, -1.2e-46], N[Not[LessEqual[a, 2.3e-41]], $MachinePrecision]], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(N[(y - x), $MachinePrecision] * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.8 \cdot 10^{+105}:\\
\;\;\;\;x + z \cdot \frac{y - x}{a - t}\\
\mathbf{elif}\;a \leq -1.2 \cdot 10^{-46} \lor \neg \left(a \leq 2.3 \cdot 10^{-41}\right):\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;y + \left(y - x\right) \cdot \frac{a - z}{t}\\
\end{array}
\end{array}
if a < -3.8e105Initial program 64.1%
Taylor expanded in z around inf 67.3%
associate-/l*89.9%
Simplified89.9%
if -3.8e105 < a < -1.20000000000000007e-46 or 2.3000000000000001e-41 < a Initial program 74.0%
Taylor expanded in y around inf 68.2%
*-commutative68.2%
associate-/l*79.2%
Simplified79.2%
if -1.20000000000000007e-46 < a < 2.3000000000000001e-41Initial program 66.7%
Taylor expanded in t around inf 82.6%
associate--l+82.6%
associate-*r/82.6%
associate-*r/82.6%
div-sub83.6%
distribute-lft-out--83.6%
associate-*r/83.6%
mul-1-neg83.6%
unsub-neg83.6%
distribute-rgt-out--83.6%
associate-/l*87.3%
Simplified87.3%
Final simplification83.8%
(FPCore (x y z t a)
:precision binary64
(if (<= a -3e+52)
(+ x (* z (/ (- y x) a)))
(if (<= a 8.2e-238)
(/ y (/ (- a t) (- z t)))
(if (<= a 2.5e-30)
(* z (* (- y x) (/ -1.0 (- t a))))
(+ x (* y (/ (- z t) a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3e+52) {
tmp = x + (z * ((y - x) / a));
} else if (a <= 8.2e-238) {
tmp = y / ((a - t) / (z - t));
} else if (a <= 2.5e-30) {
tmp = z * ((y - x) * (-1.0 / (t - a)));
} else {
tmp = x + (y * ((z - t) / 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 <= (-3d+52)) then
tmp = x + (z * ((y - x) / a))
else if (a <= 8.2d-238) then
tmp = y / ((a - t) / (z - t))
else if (a <= 2.5d-30) then
tmp = z * ((y - x) * ((-1.0d0) / (t - a)))
else
tmp = x + (y * ((z - t) / 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 <= -3e+52) {
tmp = x + (z * ((y - x) / a));
} else if (a <= 8.2e-238) {
tmp = y / ((a - t) / (z - t));
} else if (a <= 2.5e-30) {
tmp = z * ((y - x) * (-1.0 / (t - a)));
} else {
tmp = x + (y * ((z - t) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3e+52: tmp = x + (z * ((y - x) / a)) elif a <= 8.2e-238: tmp = y / ((a - t) / (z - t)) elif a <= 2.5e-30: tmp = z * ((y - x) * (-1.0 / (t - a))) else: tmp = x + (y * ((z - t) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3e+52) tmp = Float64(x + Float64(z * Float64(Float64(y - x) / a))); elseif (a <= 8.2e-238) tmp = Float64(y / Float64(Float64(a - t) / Float64(z - t))); elseif (a <= 2.5e-30) tmp = Float64(z * Float64(Float64(y - x) * Float64(-1.0 / Float64(t - a)))); else tmp = Float64(x + Float64(y * Float64(Float64(z - t) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3e+52) tmp = x + (z * ((y - x) / a)); elseif (a <= 8.2e-238) tmp = y / ((a - t) / (z - t)); elseif (a <= 2.5e-30) tmp = z * ((y - x) * (-1.0 / (t - a))); else tmp = x + (y * ((z - t) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3e+52], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.2e-238], N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.5e-30], N[(z * N[(N[(y - x), $MachinePrecision] * N[(-1.0 / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3 \cdot 10^{+52}:\\
\;\;\;\;x + z \cdot \frac{y - x}{a}\\
\mathbf{elif}\;a \leq 8.2 \cdot 10^{-238}:\\
\;\;\;\;\frac{y}{\frac{a - t}{z - t}}\\
\mathbf{elif}\;a \leq 2.5 \cdot 10^{-30}:\\
\;\;\;\;z \cdot \left(\left(y - x\right) \cdot \frac{-1}{t - a}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - t}{a}\\
\end{array}
\end{array}
if a < -3e52Initial program 65.0%
Taylor expanded in t around 0 61.9%
associate-/l*72.0%
Simplified72.0%
if -3e52 < a < 8.2000000000000002e-238Initial program 73.0%
clear-num72.9%
inv-pow72.9%
*-commutative72.9%
associate-/r*81.1%
Applied egg-rr81.1%
Taylor expanded in x around 0 62.4%
associate-/l*69.5%
Simplified69.5%
clear-num69.5%
un-div-inv69.5%
Applied egg-rr69.5%
if 8.2000000000000002e-238 < a < 2.49999999999999986e-30Initial program 64.3%
Taylor expanded in z around inf 71.5%
sub-div71.5%
div-inv71.4%
Applied egg-rr71.4%
if 2.49999999999999986e-30 < a Initial program 71.8%
Taylor expanded in a around inf 60.4%
associate-/l*69.4%
Simplified69.4%
Taylor expanded in y around inf 59.6%
associate-/l*66.0%
Simplified66.0%
Final simplification69.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.6e+157) (not (<= t 2.1e+127))) (+ y (* (/ (- y x) t) (- a z))) (+ x (/ -1.0 (/ (/ (- a t) (- z t)) (- x y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.6e+157) || !(t <= 2.1e+127)) {
tmp = y + (((y - x) / t) * (a - z));
} else {
tmp = x + (-1.0 / (((a - t) / (z - t)) / (x - 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 <= (-2.6d+157)) .or. (.not. (t <= 2.1d+127))) then
tmp = y + (((y - x) / t) * (a - z))
else
tmp = x + ((-1.0d0) / (((a - t) / (z - t)) / (x - 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 <= -2.6e+157) || !(t <= 2.1e+127)) {
tmp = y + (((y - x) / t) * (a - z));
} else {
tmp = x + (-1.0 / (((a - t) / (z - t)) / (x - y)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.6e+157) or not (t <= 2.1e+127): tmp = y + (((y - x) / t) * (a - z)) else: tmp = x + (-1.0 / (((a - t) / (z - t)) / (x - y))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.6e+157) || !(t <= 2.1e+127)) tmp = Float64(y + Float64(Float64(Float64(y - x) / t) * Float64(a - z))); else tmp = Float64(x + Float64(-1.0 / Float64(Float64(Float64(a - t) / Float64(z - t)) / Float64(x - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.6e+157) || ~((t <= 2.1e+127))) tmp = y + (((y - x) / t) * (a - z)); else tmp = x + (-1.0 / (((a - t) / (z - t)) / (x - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.6e+157], N[Not[LessEqual[t, 2.1e+127]], $MachinePrecision]], N[(y + N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(-1.0 / N[(N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.6 \cdot 10^{+157} \lor \neg \left(t \leq 2.1 \cdot 10^{+127}\right):\\
\;\;\;\;y + \frac{y - x}{t} \cdot \left(a - z\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{-1}{\frac{\frac{a - t}{z - t}}{x - y}}\\
\end{array}
\end{array}
if t < -2.60000000000000011e157 or 2.09999999999999992e127 < t Initial program 30.2%
clear-num30.3%
inv-pow30.3%
*-commutative30.3%
associate-/r*57.0%
Applied egg-rr57.0%
unpow-157.0%
Applied egg-rr57.0%
Taylor expanded in t around inf 62.6%
associate--l+62.6%
distribute-lft-out--62.6%
div-sub62.6%
mul-1-neg62.6%
unsub-neg62.6%
div-sub62.6%
associate-/l*75.4%
associate-/l*91.8%
distribute-rgt-out--91.8%
Simplified91.8%
if -2.60000000000000011e157 < t < 2.09999999999999992e127Initial program 83.8%
clear-num83.8%
inv-pow83.8%
*-commutative83.8%
associate-/r*91.8%
Applied egg-rr91.8%
unpow-191.8%
Applied egg-rr91.8%
Final simplification91.8%
(FPCore (x y z t a)
:precision binary64
(if (<= x -4.6e+108)
(* x (/ z (- t a)))
(if (<= x -1.65e-51)
(+ x (* z (/ y a)))
(if (<= x 76.0) (* y (/ (- z t) (- a t))) (- x (* x (/ z a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -4.6e+108) {
tmp = x * (z / (t - a));
} else if (x <= -1.65e-51) {
tmp = x + (z * (y / a));
} else if (x <= 76.0) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x - (x * (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 (x <= (-4.6d+108)) then
tmp = x * (z / (t - a))
else if (x <= (-1.65d-51)) then
tmp = x + (z * (y / a))
else if (x <= 76.0d0) then
tmp = y * ((z - t) / (a - t))
else
tmp = x - (x * (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 (x <= -4.6e+108) {
tmp = x * (z / (t - a));
} else if (x <= -1.65e-51) {
tmp = x + (z * (y / a));
} else if (x <= 76.0) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x - (x * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -4.6e+108: tmp = x * (z / (t - a)) elif x <= -1.65e-51: tmp = x + (z * (y / a)) elif x <= 76.0: tmp = y * ((z - t) / (a - t)) else: tmp = x - (x * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -4.6e+108) tmp = Float64(x * Float64(z / Float64(t - a))); elseif (x <= -1.65e-51) tmp = Float64(x + Float64(z * Float64(y / a))); elseif (x <= 76.0) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); else tmp = Float64(x - Float64(x * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -4.6e+108) tmp = x * (z / (t - a)); elseif (x <= -1.65e-51) tmp = x + (z * (y / a)); elseif (x <= 76.0) tmp = y * ((z - t) / (a - t)); else tmp = x - (x * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -4.6e+108], N[(x * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.65e-51], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 76.0], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(x * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.6 \cdot 10^{+108}:\\
\;\;\;\;x \cdot \frac{z}{t - a}\\
\mathbf{elif}\;x \leq -1.65 \cdot 10^{-51}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{elif}\;x \leq 76:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x - x \cdot \frac{z}{a}\\
\end{array}
\end{array}
if x < -4.5999999999999998e108Initial program 44.7%
Taylor expanded in z around inf 48.5%
Taylor expanded in y around 0 32.3%
mul-1-neg32.3%
associate-/l*48.5%
distribute-lft-neg-in48.5%
Simplified48.5%
if -4.5999999999999998e108 < x < -1.64999999999999986e-51Initial program 75.0%
Taylor expanded in t around 0 49.0%
associate-/l*51.0%
Simplified51.0%
Taylor expanded in y around inf 51.6%
if -1.64999999999999986e-51 < x < 76Initial program 79.6%
clear-num79.5%
inv-pow79.5%
*-commutative79.5%
associate-/r*91.0%
Applied egg-rr91.0%
Taylor expanded in x around 0 67.4%
associate-/l*78.9%
Simplified78.9%
if 76 < x Initial program 64.6%
Taylor expanded in t around 0 59.7%
associate-/l*61.1%
Simplified61.1%
Taylor expanded in y around 0 53.6%
mul-1-neg53.6%
unsub-neg53.6%
associate-/l*57.9%
Simplified57.9%
Final simplification65.5%
(FPCore (x y z t a)
:precision binary64
(if (<= x -5.2e+108)
(* x (/ z (- t a)))
(if (<= x -8.8e-54)
(+ x (* y (/ (- z t) a)))
(if (<= x 47.0) (* y (/ (- z t) (- a t))) (- x (* x (/ z a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -5.2e+108) {
tmp = x * (z / (t - a));
} else if (x <= -8.8e-54) {
tmp = x + (y * ((z - t) / a));
} else if (x <= 47.0) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x - (x * (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 (x <= (-5.2d+108)) then
tmp = x * (z / (t - a))
else if (x <= (-8.8d-54)) then
tmp = x + (y * ((z - t) / a))
else if (x <= 47.0d0) then
tmp = y * ((z - t) / (a - t))
else
tmp = x - (x * (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 (x <= -5.2e+108) {
tmp = x * (z / (t - a));
} else if (x <= -8.8e-54) {
tmp = x + (y * ((z - t) / a));
} else if (x <= 47.0) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x - (x * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -5.2e+108: tmp = x * (z / (t - a)) elif x <= -8.8e-54: tmp = x + (y * ((z - t) / a)) elif x <= 47.0: tmp = y * ((z - t) / (a - t)) else: tmp = x - (x * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -5.2e+108) tmp = Float64(x * Float64(z / Float64(t - a))); elseif (x <= -8.8e-54) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / a))); elseif (x <= 47.0) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); else tmp = Float64(x - Float64(x * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -5.2e+108) tmp = x * (z / (t - a)); elseif (x <= -8.8e-54) tmp = x + (y * ((z - t) / a)); elseif (x <= 47.0) tmp = y * ((z - t) / (a - t)); else tmp = x - (x * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -5.2e+108], N[(x * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -8.8e-54], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 47.0], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(x * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.2 \cdot 10^{+108}:\\
\;\;\;\;x \cdot \frac{z}{t - a}\\
\mathbf{elif}\;x \leq -8.8 \cdot 10^{-54}:\\
\;\;\;\;x + y \cdot \frac{z - t}{a}\\
\mathbf{elif}\;x \leq 47:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x - x \cdot \frac{z}{a}\\
\end{array}
\end{array}
if x < -5.2000000000000005e108Initial program 44.7%
Taylor expanded in z around inf 48.5%
Taylor expanded in y around 0 32.3%
mul-1-neg32.3%
associate-/l*48.5%
distribute-lft-neg-in48.5%
Simplified48.5%
if -5.2000000000000005e108 < x < -8.7999999999999998e-54Initial program 75.0%
Taylor expanded in a around inf 52.6%
associate-/l*55.7%
Simplified55.7%
Taylor expanded in y around inf 52.5%
associate-/l*55.4%
Simplified55.4%
if -8.7999999999999998e-54 < x < 47Initial program 79.6%
clear-num79.5%
inv-pow79.5%
*-commutative79.5%
associate-/r*91.0%
Applied egg-rr91.0%
Taylor expanded in x around 0 67.4%
associate-/l*78.9%
Simplified78.9%
if 47 < x Initial program 64.6%
Taylor expanded in t around 0 59.7%
associate-/l*61.1%
Simplified61.1%
Taylor expanded in y around 0 53.6%
mul-1-neg53.6%
unsub-neg53.6%
associate-/l*57.9%
Simplified57.9%
Final simplification66.0%
(FPCore (x y z t a)
:precision binary64
(if (<= a -4.2e+52)
(+ x (* z (/ (- y x) a)))
(if (<= a 4.8e-240)
(/ y (/ (- a t) (- z t)))
(if (<= a 1.6e-32) (/ (* (- y x) z) (- a t)) (+ x (* y (/ (- z t) a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.2e+52) {
tmp = x + (z * ((y - x) / a));
} else if (a <= 4.8e-240) {
tmp = y / ((a - t) / (z - t));
} else if (a <= 1.6e-32) {
tmp = ((y - x) * z) / (a - t);
} else {
tmp = x + (y * ((z - t) / 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 <= (-4.2d+52)) then
tmp = x + (z * ((y - x) / a))
else if (a <= 4.8d-240) then
tmp = y / ((a - t) / (z - t))
else if (a <= 1.6d-32) then
tmp = ((y - x) * z) / (a - t)
else
tmp = x + (y * ((z - t) / 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 <= -4.2e+52) {
tmp = x + (z * ((y - x) / a));
} else if (a <= 4.8e-240) {
tmp = y / ((a - t) / (z - t));
} else if (a <= 1.6e-32) {
tmp = ((y - x) * z) / (a - t);
} else {
tmp = x + (y * ((z - t) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.2e+52: tmp = x + (z * ((y - x) / a)) elif a <= 4.8e-240: tmp = y / ((a - t) / (z - t)) elif a <= 1.6e-32: tmp = ((y - x) * z) / (a - t) else: tmp = x + (y * ((z - t) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.2e+52) tmp = Float64(x + Float64(z * Float64(Float64(y - x) / a))); elseif (a <= 4.8e-240) tmp = Float64(y / Float64(Float64(a - t) / Float64(z - t))); elseif (a <= 1.6e-32) tmp = Float64(Float64(Float64(y - x) * z) / Float64(a - t)); else tmp = Float64(x + Float64(y * Float64(Float64(z - t) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -4.2e+52) tmp = x + (z * ((y - x) / a)); elseif (a <= 4.8e-240) tmp = y / ((a - t) / (z - t)); elseif (a <= 1.6e-32) tmp = ((y - x) * z) / (a - t); else tmp = x + (y * ((z - t) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.2e+52], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.8e-240], N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.6e-32], N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.2 \cdot 10^{+52}:\\
\;\;\;\;x + z \cdot \frac{y - x}{a}\\
\mathbf{elif}\;a \leq 4.8 \cdot 10^{-240}:\\
\;\;\;\;\frac{y}{\frac{a - t}{z - t}}\\
\mathbf{elif}\;a \leq 1.6 \cdot 10^{-32}:\\
\;\;\;\;\frac{\left(y - x\right) \cdot z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - t}{a}\\
\end{array}
\end{array}
if a < -4.2e52Initial program 65.0%
Taylor expanded in t around 0 61.9%
associate-/l*72.0%
Simplified72.0%
if -4.2e52 < a < 4.7999999999999999e-240Initial program 73.0%
clear-num72.9%
inv-pow72.9%
*-commutative72.9%
associate-/r*81.1%
Applied egg-rr81.1%
Taylor expanded in x around 0 62.4%
associate-/l*69.5%
Simplified69.5%
clear-num69.5%
un-div-inv69.5%
Applied egg-rr69.5%
if 4.7999999999999999e-240 < a < 1.6000000000000001e-32Initial program 64.3%
clear-num64.4%
inv-pow64.4%
*-commutative64.4%
associate-/r*67.7%
Applied egg-rr67.7%
Taylor expanded in z around -inf 64.6%
if 1.6000000000000001e-32 < a Initial program 71.8%
Taylor expanded in a around inf 60.4%
associate-/l*69.4%
Simplified69.4%
Taylor expanded in y around inf 59.6%
associate-/l*66.0%
Simplified66.0%
Final simplification68.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.4e-72) (not (<= z 4.5e+172))) (* z (* (- y x) (/ -1.0 (- t a)))) (+ x (* (- z t) (/ y (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.4e-72) || !(z <= 4.5e+172)) {
tmp = z * ((y - x) * (-1.0 / (t - a)));
} else {
tmp = x + ((z - t) * (y / (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 ((z <= (-4.4d-72)) .or. (.not. (z <= 4.5d+172))) then
tmp = z * ((y - x) * ((-1.0d0) / (t - a)))
else
tmp = x + ((z - t) * (y / (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 ((z <= -4.4e-72) || !(z <= 4.5e+172)) {
tmp = z * ((y - x) * (-1.0 / (t - a)));
} else {
tmp = x + ((z - t) * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.4e-72) or not (z <= 4.5e+172): tmp = z * ((y - x) * (-1.0 / (t - a))) else: tmp = x + ((z - t) * (y / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.4e-72) || !(z <= 4.5e+172)) tmp = Float64(z * Float64(Float64(y - x) * Float64(-1.0 / Float64(t - a)))); else tmp = Float64(x + Float64(Float64(z - t) * Float64(y / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -4.4e-72) || ~((z <= 4.5e+172))) tmp = z * ((y - x) * (-1.0 / (t - a))); else tmp = x + ((z - t) * (y / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.4e-72], N[Not[LessEqual[z, 4.5e+172]], $MachinePrecision]], N[(z * N[(N[(y - x), $MachinePrecision] * N[(-1.0 / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{-72} \lor \neg \left(z \leq 4.5 \cdot 10^{+172}\right):\\
\;\;\;\;z \cdot \left(\left(y - x\right) \cdot \frac{-1}{t - a}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if z < -4.40000000000000005e-72 or 4.5000000000000002e172 < z Initial program 68.1%
Taylor expanded in z around inf 79.6%
sub-div79.6%
div-inv79.6%
Applied egg-rr79.6%
if -4.40000000000000005e-72 < z < 4.5000000000000002e172Initial program 70.9%
Taylor expanded in y around inf 66.0%
*-commutative66.0%
associate-/l*73.7%
Simplified73.7%
Final simplification76.0%
(FPCore (x y z t a)
:precision binary64
(if (<= t -4.5e+155)
(/ y (/ (- a t) (- z t)))
(if (<= t 1.52e+47)
(+ x (* z (/ (- y x) (- a t))))
(* y (/ (- z t) (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.5e+155) {
tmp = y / ((a - t) / (z - t));
} else if (t <= 1.52e+47) {
tmp = x + (z * ((y - x) / (a - t)));
} else {
tmp = 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 (t <= (-4.5d+155)) then
tmp = y / ((a - t) / (z - t))
else if (t <= 1.52d+47) then
tmp = x + (z * ((y - x) / (a - t)))
else
tmp = 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 (t <= -4.5e+155) {
tmp = y / ((a - t) / (z - t));
} else if (t <= 1.52e+47) {
tmp = x + (z * ((y - x) / (a - t)));
} else {
tmp = y * ((z - t) / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -4.5e+155: tmp = y / ((a - t) / (z - t)) elif t <= 1.52e+47: tmp = x + (z * ((y - x) / (a - t))) else: tmp = y * ((z - t) / (a - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4.5e+155) tmp = Float64(y / Float64(Float64(a - t) / Float64(z - t))); elseif (t <= 1.52e+47) tmp = Float64(x + Float64(z * Float64(Float64(y - x) / Float64(a - t)))); else tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -4.5e+155) tmp = y / ((a - t) / (z - t)); elseif (t <= 1.52e+47) tmp = x + (z * ((y - x) / (a - t))); else tmp = y * ((z - t) / (a - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.5e+155], N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.52e+47], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{+155}:\\
\;\;\;\;\frac{y}{\frac{a - t}{z - t}}\\
\mathbf{elif}\;t \leq 1.52 \cdot 10^{+47}:\\
\;\;\;\;x + z \cdot \frac{y - x}{a - t}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\end{array}
\end{array}
if t < -4.49999999999999973e155Initial program 30.7%
clear-num30.9%
inv-pow30.9%
*-commutative30.9%
associate-/r*56.1%
Applied egg-rr56.1%
Taylor expanded in x around 0 38.9%
associate-/l*64.4%
Simplified64.4%
clear-num64.4%
un-div-inv64.4%
Applied egg-rr64.4%
if -4.49999999999999973e155 < t < 1.52e47Initial program 83.9%
Taylor expanded in z around inf 70.7%
associate-/l*75.0%
Simplified75.0%
if 1.52e47 < t Initial program 44.6%
clear-num44.6%
inv-pow44.6%
*-commutative44.6%
associate-/r*67.5%
Applied egg-rr67.5%
Taylor expanded in x around 0 34.7%
associate-/l*59.8%
Simplified59.8%
Final simplification70.4%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.3e+52) x (if (<= a -7.5e-192) y (if (<= a 1.15e-31) (* x (/ z t)) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.3e+52) {
tmp = x;
} else if (a <= -7.5e-192) {
tmp = y;
} else if (a <= 1.15e-31) {
tmp = x * (z / t);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-2.3d+52)) then
tmp = x
else if (a <= (-7.5d-192)) then
tmp = y
else if (a <= 1.15d-31) then
tmp = x * (z / t)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.3e+52) {
tmp = x;
} else if (a <= -7.5e-192) {
tmp = y;
} else if (a <= 1.15e-31) {
tmp = x * (z / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.3e+52: tmp = x elif a <= -7.5e-192: tmp = y elif a <= 1.15e-31: tmp = x * (z / t) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.3e+52) tmp = x; elseif (a <= -7.5e-192) tmp = y; elseif (a <= 1.15e-31) tmp = Float64(x * Float64(z / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.3e+52) tmp = x; elseif (a <= -7.5e-192) tmp = y; elseif (a <= 1.15e-31) tmp = x * (z / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.3e+52], x, If[LessEqual[a, -7.5e-192], y, If[LessEqual[a, 1.15e-31], N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.3 \cdot 10^{+52}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -7.5 \cdot 10^{-192}:\\
\;\;\;\;y\\
\mathbf{elif}\;a \leq 1.15 \cdot 10^{-31}:\\
\;\;\;\;x \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.3e52 or 1.1499999999999999e-31 < a Initial program 69.2%
Taylor expanded in a around inf 43.3%
if -2.3e52 < a < -7.5000000000000001e-192Initial program 74.9%
Taylor expanded in t around inf 41.3%
if -7.5000000000000001e-192 < a < 1.1499999999999999e-31Initial program 66.9%
Taylor expanded in z around inf 65.7%
sub-div65.7%
div-inv65.6%
Applied egg-rr65.6%
Taylor expanded in a around 0 52.9%
mul-1-neg52.9%
associate-/l*56.7%
distribute-rgt-neg-in56.7%
distribute-neg-frac256.7%
Simplified56.7%
Taylor expanded in y around 0 38.7%
associate-/l*43.8%
Simplified43.8%
Final simplification43.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -8e-5) (not (<= x 0.0054))) (+ x (* z (/ (- y x) a))) (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -8e-5) || !(x <= 0.0054)) {
tmp = x + (z * ((y - x) / a));
} else {
tmp = 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 ((x <= (-8d-5)) .or. (.not. (x <= 0.0054d0))) then
tmp = x + (z * ((y - x) / a))
else
tmp = 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 ((x <= -8e-5) || !(x <= 0.0054)) {
tmp = x + (z * ((y - x) / a));
} else {
tmp = y * ((z - t) / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -8e-5) or not (x <= 0.0054): tmp = x + (z * ((y - x) / a)) else: tmp = y * ((z - t) / (a - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -8e-5) || !(x <= 0.0054)) tmp = Float64(x + Float64(z * Float64(Float64(y - x) / a))); else tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -8e-5) || ~((x <= 0.0054))) tmp = x + (z * ((y - x) / a)); else tmp = y * ((z - t) / (a - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -8e-5], N[Not[LessEqual[x, 0.0054]], $MachinePrecision]], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8 \cdot 10^{-5} \lor \neg \left(x \leq 0.0054\right):\\
\;\;\;\;x + z \cdot \frac{y - x}{a}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\end{array}
\end{array}
if x < -8.00000000000000065e-5 or 0.0054000000000000003 < x Initial program 60.4%
Taylor expanded in t around 0 50.8%
associate-/l*54.9%
Simplified54.9%
if -8.00000000000000065e-5 < x < 0.0054000000000000003Initial program 79.7%
clear-num79.6%
inv-pow79.6%
*-commutative79.6%
associate-/r*90.5%
Applied egg-rr90.5%
Taylor expanded in x around 0 65.6%
associate-/l*76.6%
Simplified76.6%
Final simplification65.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.7e-49) (not (<= a 1.5e-37))) (+ x (* z (/ y a))) (/ z (/ t (- x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.7e-49) || !(a <= 1.5e-37)) {
tmp = x + (z * (y / a));
} else {
tmp = z / (t / (x - 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 ((a <= (-3.7d-49)) .or. (.not. (a <= 1.5d-37))) then
tmp = x + (z * (y / a))
else
tmp = z / (t / (x - y))
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.7e-49) || !(a <= 1.5e-37)) {
tmp = x + (z * (y / a));
} else {
tmp = z / (t / (x - y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3.7e-49) or not (a <= 1.5e-37): tmp = x + (z * (y / a)) else: tmp = z / (t / (x - y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.7e-49) || !(a <= 1.5e-37)) tmp = Float64(x + Float64(z * Float64(y / a))); else tmp = Float64(z / Float64(t / Float64(x - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3.7e-49) || ~((a <= 1.5e-37))) tmp = x + (z * (y / a)); else tmp = z / (t / (x - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.7e-49], N[Not[LessEqual[a, 1.5e-37]], $MachinePrecision]], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / N[(t / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.7 \cdot 10^{-49} \lor \neg \left(a \leq 1.5 \cdot 10^{-37}\right):\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{\frac{t}{x - y}}\\
\end{array}
\end{array}
if a < -3.7000000000000001e-49 or 1.5e-37 < a Initial program 72.0%
Taylor expanded in t around 0 52.1%
associate-/l*59.0%
Simplified59.0%
Taylor expanded in y around inf 52.4%
if -3.7000000000000001e-49 < a < 1.5e-37Initial program 66.7%
Taylor expanded in z around inf 61.4%
sub-div61.4%
div-inv61.3%
Applied egg-rr61.3%
Taylor expanded in a around 0 50.7%
mul-1-neg50.7%
associate-/l*54.2%
distribute-rgt-neg-in54.2%
distribute-neg-frac254.2%
Simplified54.2%
associate-*r/50.7%
distribute-frac-neg250.7%
add-sqr-sqrt28.1%
sqrt-unprod21.6%
sqr-neg21.6%
sqrt-unprod1.0%
add-sqr-sqrt5.1%
associate-*r/5.2%
clear-num5.2%
un-div-inv5.2%
add-sqr-sqrt1.0%
sqrt-unprod21.7%
sqr-neg21.7%
sqrt-unprod30.6%
add-sqr-sqrt54.2%
Applied egg-rr54.2%
Final simplification53.1%
(FPCore (x y z t a) :precision binary64 (if (<= t -4.5e+139) y (if (<= t 6.2e+49) (+ x (* y (/ z a))) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.5e+139) {
tmp = y;
} else if (t <= 6.2e+49) {
tmp = x + (y * (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.5d+139)) then
tmp = y
else if (t <= 6.2d+49) then
tmp = x + (y * (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.5e+139) {
tmp = y;
} else if (t <= 6.2e+49) {
tmp = x + (y * (z / a));
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -4.5e+139: tmp = y elif t <= 6.2e+49: tmp = x + (y * (z / a)) else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4.5e+139) tmp = y; elseif (t <= 6.2e+49) tmp = Float64(x + Float64(y * 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.5e+139) tmp = y; elseif (t <= 6.2e+49) tmp = x + (y * (z / a)); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.5e+139], y, If[LessEqual[t, 6.2e+49], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{+139}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{+49}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -4.4999999999999999e139 or 6.19999999999999985e49 < t Initial program 40.6%
Taylor expanded in t around inf 50.8%
if -4.4999999999999999e139 < t < 6.19999999999999985e49Initial program 84.3%
Taylor expanded in t around 0 57.0%
associate-/l*61.1%
Simplified61.1%
Taylor expanded in y around inf 49.2%
associate-/l*52.0%
Simplified52.0%
Final simplification51.6%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.3e+96) y (if (<= t 1.9e+51) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.3e+96) {
tmp = y;
} else if (t <= 1.9e+51) {
tmp = x;
} 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 <= (-1.3d+96)) then
tmp = y
else if (t <= 1.9d+51) then
tmp = x
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 <= -1.3e+96) {
tmp = y;
} else if (t <= 1.9e+51) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.3e+96: tmp = y elif t <= 1.9e+51: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.3e+96) tmp = y; elseif (t <= 1.9e+51) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.3e+96) tmp = y; elseif (t <= 1.9e+51) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.3e+96], y, If[LessEqual[t, 1.9e+51], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.3 \cdot 10^{+96}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{+51}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -1.3e96 or 1.8999999999999999e51 < t Initial program 42.9%
Taylor expanded in t around inf 46.0%
if -1.3e96 < t < 1.8999999999999999e51Initial program 87.6%
Taylor expanded in a around inf 34.4%
Final simplification39.0%
(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 69.8%
Taylor expanded in a around inf 24.7%
Final simplification24.7%
(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 2024046
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
:precision binary64
:alt
(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))))