
(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 17 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.15e-11) (not (<= t 3e+144))) (+ y (* (- y x) (/ (- a z) t))) (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.15e-11) || !(t <= 3e+144)) {
tmp = y + ((y - x) * ((a - z) / t));
} 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.15e-11) || !(t <= 3e+144)) tmp = Float64(y + Float64(Float64(y - x) * Float64(Float64(a - z) / t))); 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.15e-11], N[Not[LessEqual[t, 3e+144]], $MachinePrecision]], N[(y + N[(N[(y - x), $MachinePrecision] * N[(N[(a - z), $MachinePrecision] / t), $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.15 \cdot 10^{-11} \lor \neg \left(t \leq 3 \cdot 10^{+144}\right):\\
\;\;\;\;y + \left(y - x\right) \cdot \frac{a - z}{t}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\
\end{array}
\end{array}
if t < -1.15000000000000007e-11 or 2.9999999999999999e144 < t Initial program 36.0%
Taylor expanded in t around inf 63.0%
associate--l+63.0%
associate-*r/63.0%
associate-*r/63.0%
div-sub63.0%
distribute-lft-out--63.0%
associate-*r/63.0%
mul-1-neg63.0%
unsub-neg63.0%
distribute-rgt-out--63.1%
associate-/l*86.5%
Simplified86.5%
if -1.15000000000000007e-11 < t < 2.9999999999999999e144Initial program 87.5%
+-commutative87.5%
associate-/l*94.1%
fma-define94.1%
Simplified94.1%
Final simplification91.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (or (<= t_1 (- INFINITY))
(and (not (<= t_1 -2e-306))
(or (<= t_1 0.0) (not (<= t_1 2e+281)))))
(+ y (* (- y x) (/ (- a z) t)))
t_1)))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if ((t_1 <= -((double) INFINITY)) || (!(t_1 <= -2e-306) && ((t_1 <= 0.0) || !(t_1 <= 2e+281)))) {
tmp = y + ((y - x) * ((a - z) / t));
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || (!(t_1 <= -2e-306) && ((t_1 <= 0.0) || !(t_1 <= 2e+281)))) {
tmp = y + ((y - x) * ((a - z) / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - x) * (z - t)) / (a - t)) tmp = 0 if (t_1 <= -math.inf) or (not (t_1 <= -2e-306) and ((t_1 <= 0.0) or not (t_1 <= 2e+281))): tmp = y + ((y - x) * ((a - z) / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || (!(t_1 <= -2e-306) && ((t_1 <= 0.0) || !(t_1 <= 2e+281)))) tmp = Float64(y + Float64(Float64(y - x) * Float64(Float64(a - z) / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - x) * (z - t)) / (a - t)); tmp = 0.0; if ((t_1 <= -Inf) || (~((t_1 <= -2e-306)) && ((t_1 <= 0.0) || ~((t_1 <= 2e+281))))) tmp = y + ((y - x) * ((a - z) / t)); 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] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], And[N[Not[LessEqual[t$95$1, -2e-306]], $MachinePrecision], Or[LessEqual[t$95$1, 0.0], N[Not[LessEqual[t$95$1, 2e+281]], $MachinePrecision]]]], N[(y + N[(N[(y - x), $MachinePrecision] * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq -2 \cdot 10^{-306}\right) \land \left(t\_1 \leq 0 \lor \neg \left(t\_1 \leq 2 \cdot 10^{+281}\right)\right):\\
\;\;\;\;y + \left(y - x\right) \cdot \frac{a - z}{t}\\
\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.00000000000000006e-306 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0 or 2.0000000000000001e281 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 31.5%
Taylor expanded in t around inf 60.2%
associate--l+60.2%
associate-*r/60.2%
associate-*r/60.2%
div-sub60.2%
distribute-lft-out--60.2%
associate-*r/60.2%
mul-1-neg60.2%
unsub-neg60.2%
distribute-rgt-out--61.2%
associate-/l*81.1%
Simplified81.1%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -2.00000000000000006e-306 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 2.0000000000000001e281Initial program 97.9%
Final simplification90.7%
(FPCore (x y z t a)
:precision binary64
(if (<= t -6.6e-7)
y
(if (<= t -3.15e-114)
(* x (- 1.0 (/ z a)))
(if (<= t 1.2e-286)
(+ x (/ (* y z) a))
(if (<= t 7e+132) (+ x (* z (/ y a))) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.6e-7) {
tmp = y;
} else if (t <= -3.15e-114) {
tmp = x * (1.0 - (z / a));
} else if (t <= 1.2e-286) {
tmp = x + ((y * z) / a);
} else if (t <= 7e+132) {
tmp = x + (z * (y / 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 <= (-6.6d-7)) then
tmp = y
else if (t <= (-3.15d-114)) then
tmp = x * (1.0d0 - (z / a))
else if (t <= 1.2d-286) then
tmp = x + ((y * z) / a)
else if (t <= 7d+132) then
tmp = x + (z * (y / 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 <= -6.6e-7) {
tmp = y;
} else if (t <= -3.15e-114) {
tmp = x * (1.0 - (z / a));
} else if (t <= 1.2e-286) {
tmp = x + ((y * z) / a);
} else if (t <= 7e+132) {
tmp = x + (z * (y / a));
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -6.6e-7: tmp = y elif t <= -3.15e-114: tmp = x * (1.0 - (z / a)) elif t <= 1.2e-286: tmp = x + ((y * z) / a) elif t <= 7e+132: tmp = x + (z * (y / a)) else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6.6e-7) tmp = y; elseif (t <= -3.15e-114) tmp = Float64(x * Float64(1.0 - Float64(z / a))); elseif (t <= 1.2e-286) tmp = Float64(x + Float64(Float64(y * z) / a)); elseif (t <= 7e+132) tmp = Float64(x + Float64(z * Float64(y / a))); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -6.6e-7) tmp = y; elseif (t <= -3.15e-114) tmp = x * (1.0 - (z / a)); elseif (t <= 1.2e-286) tmp = x + ((y * z) / a); elseif (t <= 7e+132) tmp = x + (z * (y / a)); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.6e-7], y, If[LessEqual[t, -3.15e-114], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.2e-286], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e+132], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.6 \cdot 10^{-7}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -3.15 \cdot 10^{-114}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{-286}:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\
\mathbf{elif}\;t \leq 7 \cdot 10^{+132}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -6.6000000000000003e-7 or 7.00000000000000041e132 < t Initial program 36.7%
Taylor expanded in t around inf 57.2%
if -6.6000000000000003e-7 < t < -3.15000000000000007e-114Initial program 76.2%
Taylor expanded in t around 0 48.4%
associate-/l*54.8%
Simplified54.8%
Taylor expanded in x around inf 51.3%
mul-1-neg51.3%
unsub-neg51.3%
Simplified51.3%
if -3.15000000000000007e-114 < t < 1.19999999999999997e-286Initial program 96.1%
Taylor expanded in y around inf 81.0%
*-commutative81.0%
associate-/l*79.5%
Simplified79.5%
Taylor expanded in t around 0 74.7%
if 1.19999999999999997e-286 < t < 7.00000000000000041e132Initial program 84.3%
Taylor expanded in t around 0 58.8%
associate-/l*65.2%
Simplified65.2%
clear-num65.2%
un-div-inv65.2%
Applied egg-rr65.2%
Taylor expanded in y around inf 54.6%
associate-*l/58.8%
*-commutative58.8%
Simplified58.8%
Final simplification60.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ y (* z (/ x t)))))
(if (<= t -1.4e-56)
t_1
(if (<= t 4e-146)
(+ x (* z (/ (- y x) a)))
(if (<= t 4.8e+138) (+ x (* z (/ y (- a t)))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y + (z * (x / t));
double tmp;
if (t <= -1.4e-56) {
tmp = t_1;
} else if (t <= 4e-146) {
tmp = x + (z * ((y - x) / a));
} else if (t <= 4.8e+138) {
tmp = x + (z * (y / (a - t)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y + (z * (x / t))
if (t <= (-1.4d-56)) then
tmp = t_1
else if (t <= 4d-146) then
tmp = x + (z * ((y - x) / a))
else if (t <= 4.8d+138) then
tmp = x + (z * (y / (a - t)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y + (z * (x / t));
double tmp;
if (t <= -1.4e-56) {
tmp = t_1;
} else if (t <= 4e-146) {
tmp = x + (z * ((y - x) / a));
} else if (t <= 4.8e+138) {
tmp = x + (z * (y / (a - t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y + (z * (x / t)) tmp = 0 if t <= -1.4e-56: tmp = t_1 elif t <= 4e-146: tmp = x + (z * ((y - x) / a)) elif t <= 4.8e+138: tmp = x + (z * (y / (a - t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y + Float64(z * Float64(x / t))) tmp = 0.0 if (t <= -1.4e-56) tmp = t_1; elseif (t <= 4e-146) tmp = Float64(x + Float64(z * Float64(Float64(y - x) / a))); elseif (t <= 4.8e+138) tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y + (z * (x / t)); tmp = 0.0; if (t <= -1.4e-56) tmp = t_1; elseif (t <= 4e-146) tmp = x + (z * ((y - x) / a)); elseif (t <= 4.8e+138) tmp = x + (z * (y / (a - t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y + N[(z * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.4e-56], t$95$1, If[LessEqual[t, 4e-146], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.8e+138], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \frac{x}{t}\\
\mathbf{if}\;t \leq -1.4 \cdot 10^{-56}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4 \cdot 10^{-146}:\\
\;\;\;\;x + z \cdot \frac{y - x}{a}\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{+138}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.39999999999999997e-56 or 4.8000000000000002e138 < t Initial program 41.7%
Taylor expanded in t around inf 64.2%
associate--l+64.2%
associate-*r/64.2%
associate-*r/64.2%
div-sub64.2%
distribute-lft-out--64.2%
associate-*r/64.2%
mul-1-neg64.2%
unsub-neg64.2%
distribute-rgt-out--64.3%
associate-/l*84.0%
Simplified84.0%
Taylor expanded in z around inf 60.2%
associate-/l*75.4%
Simplified75.4%
Taylor expanded in y around 0 57.5%
associate-*r/57.5%
*-commutative57.5%
neg-mul-157.5%
distribute-rgt-neg-in57.5%
associate-/l*66.5%
distribute-neg-frac66.5%
distribute-neg-frac266.5%
Simplified66.5%
if -1.39999999999999997e-56 < t < 4.0000000000000001e-146Initial program 95.5%
Taylor expanded in t around 0 88.4%
associate-/l*91.1%
Simplified91.1%
if 4.0000000000000001e-146 < t < 4.8000000000000002e138Initial program 80.5%
Taylor expanded in z around inf 68.5%
associate-/l*76.1%
Simplified76.1%
Taylor expanded in y around inf 63.9%
Final simplification74.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ y (* z (/ x t)))))
(if (<= t -3.15e-56)
t_1
(if (<= t 1.55e-136)
(+ x (/ z (/ a (- y x))))
(if (<= t 7.8e+132) (+ x (* z (/ y (- a t)))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y + (z * (x / t));
double tmp;
if (t <= -3.15e-56) {
tmp = t_1;
} else if (t <= 1.55e-136) {
tmp = x + (z / (a / (y - x)));
} else if (t <= 7.8e+132) {
tmp = x + (z * (y / (a - t)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y + (z * (x / t))
if (t <= (-3.15d-56)) then
tmp = t_1
else if (t <= 1.55d-136) then
tmp = x + (z / (a / (y - x)))
else if (t <= 7.8d+132) then
tmp = x + (z * (y / (a - t)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y + (z * (x / t));
double tmp;
if (t <= -3.15e-56) {
tmp = t_1;
} else if (t <= 1.55e-136) {
tmp = x + (z / (a / (y - x)));
} else if (t <= 7.8e+132) {
tmp = x + (z * (y / (a - t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y + (z * (x / t)) tmp = 0 if t <= -3.15e-56: tmp = t_1 elif t <= 1.55e-136: tmp = x + (z / (a / (y - x))) elif t <= 7.8e+132: tmp = x + (z * (y / (a - t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y + Float64(z * Float64(x / t))) tmp = 0.0 if (t <= -3.15e-56) tmp = t_1; elseif (t <= 1.55e-136) tmp = Float64(x + Float64(z / Float64(a / Float64(y - x)))); elseif (t <= 7.8e+132) tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y + (z * (x / t)); tmp = 0.0; if (t <= -3.15e-56) tmp = t_1; elseif (t <= 1.55e-136) tmp = x + (z / (a / (y - x))); elseif (t <= 7.8e+132) tmp = x + (z * (y / (a - t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y + N[(z * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.15e-56], t$95$1, If[LessEqual[t, 1.55e-136], N[(x + N[(z / N[(a / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.8e+132], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \frac{x}{t}\\
\mathbf{if}\;t \leq -3.15 \cdot 10^{-56}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{-136}:\\
\;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{+132}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.1499999999999999e-56 or 7.80000000000000002e132 < t Initial program 41.7%
Taylor expanded in t around inf 64.2%
associate--l+64.2%
associate-*r/64.2%
associate-*r/64.2%
div-sub64.2%
distribute-lft-out--64.2%
associate-*r/64.2%
mul-1-neg64.2%
unsub-neg64.2%
distribute-rgt-out--64.3%
associate-/l*84.0%
Simplified84.0%
Taylor expanded in z around inf 60.2%
associate-/l*75.4%
Simplified75.4%
Taylor expanded in y around 0 57.5%
associate-*r/57.5%
*-commutative57.5%
neg-mul-157.5%
distribute-rgt-neg-in57.5%
associate-/l*66.5%
distribute-neg-frac66.5%
distribute-neg-frac266.5%
Simplified66.5%
if -3.1499999999999999e-56 < t < 1.55e-136Initial program 94.7%
Taylor expanded in t around 0 86.8%
associate-/l*90.4%
Simplified90.4%
clear-num90.4%
un-div-inv90.4%
Applied egg-rr90.4%
if 1.55e-136 < t < 7.80000000000000002e132Initial program 80.8%
Taylor expanded in z around inf 69.7%
associate-/l*76.2%
Simplified76.2%
Taylor expanded in y around inf 63.1%
Final simplification74.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ y (* z (/ (- x y) t)))))
(if (<= t -2e-56)
t_1
(if (<= t 1.9e-136)
(+ x (/ z (/ a (- y x))))
(if (<= t 8.6e+132) (+ x (* z (/ y (- a t)))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y + (z * ((x - y) / t));
double tmp;
if (t <= -2e-56) {
tmp = t_1;
} else if (t <= 1.9e-136) {
tmp = x + (z / (a / (y - x)));
} else if (t <= 8.6e+132) {
tmp = x + (z * (y / (a - t)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y + (z * ((x - y) / t))
if (t <= (-2d-56)) then
tmp = t_1
else if (t <= 1.9d-136) then
tmp = x + (z / (a / (y - x)))
else if (t <= 8.6d+132) then
tmp = x + (z * (y / (a - t)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y + (z * ((x - y) / t));
double tmp;
if (t <= -2e-56) {
tmp = t_1;
} else if (t <= 1.9e-136) {
tmp = x + (z / (a / (y - x)));
} else if (t <= 8.6e+132) {
tmp = x + (z * (y / (a - t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y + (z * ((x - y) / t)) tmp = 0 if t <= -2e-56: tmp = t_1 elif t <= 1.9e-136: tmp = x + (z / (a / (y - x))) elif t <= 8.6e+132: tmp = x + (z * (y / (a - t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y + Float64(z * Float64(Float64(x - y) / t))) tmp = 0.0 if (t <= -2e-56) tmp = t_1; elseif (t <= 1.9e-136) tmp = Float64(x + Float64(z / Float64(a / Float64(y - x)))); elseif (t <= 8.6e+132) tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y + (z * ((x - y) / t)); tmp = 0.0; if (t <= -2e-56) tmp = t_1; elseif (t <= 1.9e-136) tmp = x + (z / (a / (y - x))); elseif (t <= 8.6e+132) tmp = x + (z * (y / (a - t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y + N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2e-56], t$95$1, If[LessEqual[t, 1.9e-136], N[(x + N[(z / N[(a / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.6e+132], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \frac{x - y}{t}\\
\mathbf{if}\;t \leq -2 \cdot 10^{-56}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-136}:\\
\;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\
\mathbf{elif}\;t \leq 8.6 \cdot 10^{+132}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.0000000000000001e-56 or 8.59999999999999964e132 < t Initial program 41.7%
Taylor expanded in t around inf 64.2%
associate--l+64.2%
associate-*r/64.2%
associate-*r/64.2%
div-sub64.2%
distribute-lft-out--64.2%
associate-*r/64.2%
mul-1-neg64.2%
unsub-neg64.2%
distribute-rgt-out--64.3%
associate-/l*84.0%
Simplified84.0%
Taylor expanded in z around inf 60.2%
associate-/l*75.4%
Simplified75.4%
if -2.0000000000000001e-56 < t < 1.9000000000000001e-136Initial program 94.7%
Taylor expanded in t around 0 86.8%
associate-/l*90.4%
Simplified90.4%
clear-num90.4%
un-div-inv90.4%
Applied egg-rr90.4%
if 1.9000000000000001e-136 < t < 8.59999999999999964e132Initial program 80.8%
Taylor expanded in z around inf 69.7%
associate-/l*76.2%
Simplified76.2%
Taylor expanded in y around inf 63.1%
Final simplification78.0%
(FPCore (x y z t a)
:precision binary64
(if (<= t -2.35e-58)
(+ y (/ z (/ t (- x y))))
(if (<= t 1.7e-136)
(+ x (/ z (/ a (- y x))))
(if (<= t 7e+132) (+ x (* z (/ y (- a t)))) (+ y (* z (/ (- x y) t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.35e-58) {
tmp = y + (z / (t / (x - y)));
} else if (t <= 1.7e-136) {
tmp = x + (z / (a / (y - x)));
} else if (t <= 7e+132) {
tmp = x + (z * (y / (a - t)));
} else {
tmp = y + (z * ((x - y) / 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.35d-58)) then
tmp = y + (z / (t / (x - y)))
else if (t <= 1.7d-136) then
tmp = x + (z / (a / (y - x)))
else if (t <= 7d+132) then
tmp = x + (z * (y / (a - t)))
else
tmp = y + (z * ((x - y) / 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.35e-58) {
tmp = y + (z / (t / (x - y)));
} else if (t <= 1.7e-136) {
tmp = x + (z / (a / (y - x)));
} else if (t <= 7e+132) {
tmp = x + (z * (y / (a - t)));
} else {
tmp = y + (z * ((x - y) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.35e-58: tmp = y + (z / (t / (x - y))) elif t <= 1.7e-136: tmp = x + (z / (a / (y - x))) elif t <= 7e+132: tmp = x + (z * (y / (a - t))) else: tmp = y + (z * ((x - y) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.35e-58) tmp = Float64(y + Float64(z / Float64(t / Float64(x - y)))); elseif (t <= 1.7e-136) tmp = Float64(x + Float64(z / Float64(a / Float64(y - x)))); elseif (t <= 7e+132) tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); else tmp = Float64(y + Float64(z * Float64(Float64(x - y) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.35e-58) tmp = y + (z / (t / (x - y))); elseif (t <= 1.7e-136) tmp = x + (z / (a / (y - x))); elseif (t <= 7e+132) tmp = x + (z * (y / (a - t))); else tmp = y + (z * ((x - y) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.35e-58], N[(y + N[(z / N[(t / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.7e-136], N[(x + N[(z / N[(a / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e+132], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.35 \cdot 10^{-58}:\\
\;\;\;\;y + \frac{z}{\frac{t}{x - y}}\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{-136}:\\
\;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\
\mathbf{elif}\;t \leq 7 \cdot 10^{+132}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;y + z \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if t < -2.34999999999999997e-58Initial program 52.4%
Taylor expanded in t around inf 67.5%
associate--l+67.5%
associate-*r/67.5%
associate-*r/67.5%
div-sub67.5%
distribute-lft-out--67.5%
associate-*r/67.5%
mul-1-neg67.5%
unsub-neg67.5%
distribute-rgt-out--67.5%
associate-/l*82.2%
Simplified82.2%
Taylor expanded in z around inf 65.4%
associate-/l*72.8%
Simplified72.8%
clear-num72.7%
un-div-inv73.8%
Applied egg-rr73.8%
if -2.34999999999999997e-58 < t < 1.7e-136Initial program 94.7%
Taylor expanded in t around 0 86.8%
associate-/l*90.4%
Simplified90.4%
clear-num90.4%
un-div-inv90.4%
Applied egg-rr90.4%
if 1.7e-136 < t < 7.00000000000000041e132Initial program 80.8%
Taylor expanded in z around inf 69.7%
associate-/l*76.2%
Simplified76.2%
Taylor expanded in y around inf 63.1%
if 7.00000000000000041e132 < t Initial program 24.5%
Taylor expanded in t around inf 58.9%
associate--l+58.9%
associate-*r/58.9%
associate-*r/58.9%
div-sub58.9%
distribute-lft-out--58.9%
associate-*r/58.9%
mul-1-neg58.9%
unsub-neg58.9%
distribute-rgt-out--59.1%
associate-/l*86.8%
Simplified86.8%
Taylor expanded in z around inf 51.8%
associate-/l*79.7%
Simplified79.7%
Final simplification78.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3.15e-56) (not (<= t 3.75e+133))) (+ y (* (- y x) (/ (- a z) t))) (+ x (* z (/ (- y x) (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.15e-56) || !(t <= 3.75e+133)) {
tmp = y + ((y - x) * ((a - z) / t));
} else {
tmp = x + (z * ((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 <= (-3.15d-56)) .or. (.not. (t <= 3.75d+133))) then
tmp = y + ((y - x) * ((a - z) / t))
else
tmp = x + (z * ((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 <= -3.15e-56) || !(t <= 3.75e+133)) {
tmp = y + ((y - x) * ((a - z) / t));
} else {
tmp = x + (z * ((y - x) / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -3.15e-56) or not (t <= 3.75e+133): tmp = y + ((y - x) * ((a - z) / t)) else: tmp = x + (z * ((y - x) / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -3.15e-56) || !(t <= 3.75e+133)) tmp = Float64(y + Float64(Float64(y - x) * Float64(Float64(a - z) / t))); else tmp = Float64(x + Float64(z * 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 <= -3.15e-56) || ~((t <= 3.75e+133))) tmp = y + ((y - x) * ((a - z) / t)); else tmp = x + (z * ((y - x) / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.15e-56], N[Not[LessEqual[t, 3.75e+133]], $MachinePrecision]], N[(y + N[(N[(y - x), $MachinePrecision] * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.15 \cdot 10^{-56} \lor \neg \left(t \leq 3.75 \cdot 10^{+133}\right):\\
\;\;\;\;y + \left(y - x\right) \cdot \frac{a - z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y - x}{a - t}\\
\end{array}
\end{array}
if t < -3.1499999999999999e-56 or 3.74999999999999996e133 < t Initial program 41.7%
Taylor expanded in t around inf 64.2%
associate--l+64.2%
associate-*r/64.2%
associate-*r/64.2%
div-sub64.2%
distribute-lft-out--64.2%
associate-*r/64.2%
mul-1-neg64.2%
unsub-neg64.2%
distribute-rgt-out--64.3%
associate-/l*84.0%
Simplified84.0%
if -3.1499999999999999e-56 < t < 3.74999999999999996e133Initial program 89.3%
Taylor expanded in z around inf 82.4%
associate-/l*86.9%
Simplified86.9%
Final simplification85.7%
(FPCore (x y z t a)
:precision binary64
(if (<= t -6e-7)
(+ y (/ z (/ t (- x y))))
(if (<= t 7e+132)
(+ x (* z (/ (- y x) (- a t))))
(+ y (* z (/ (- x y) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6e-7) {
tmp = y + (z / (t / (x - y)));
} else if (t <= 7e+132) {
tmp = x + (z * ((y - x) / (a - t)));
} else {
tmp = y + (z * ((x - y) / 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 <= (-6d-7)) then
tmp = y + (z / (t / (x - y)))
else if (t <= 7d+132) then
tmp = x + (z * ((y - x) / (a - t)))
else
tmp = y + (z * ((x - y) / 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 <= -6e-7) {
tmp = y + (z / (t / (x - y)));
} else if (t <= 7e+132) {
tmp = x + (z * ((y - x) / (a - t)));
} else {
tmp = y + (z * ((x - y) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -6e-7: tmp = y + (z / (t / (x - y))) elif t <= 7e+132: tmp = x + (z * ((y - x) / (a - t))) else: tmp = y + (z * ((x - y) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6e-7) tmp = Float64(y + Float64(z / Float64(t / Float64(x - y)))); elseif (t <= 7e+132) tmp = Float64(x + Float64(z * Float64(Float64(y - x) / Float64(a - t)))); else tmp = Float64(y + Float64(z * Float64(Float64(x - y) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -6e-7) tmp = y + (z / (t / (x - y))); elseif (t <= 7e+132) tmp = x + (z * ((y - x) / (a - t))); else tmp = y + (z * ((x - y) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6e-7], N[(y + N[(z / N[(t / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e+132], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6 \cdot 10^{-7}:\\
\;\;\;\;y + \frac{z}{\frac{t}{x - y}}\\
\mathbf{elif}\;t \leq 7 \cdot 10^{+132}:\\
\;\;\;\;x + z \cdot \frac{y - x}{a - t}\\
\mathbf{else}:\\
\;\;\;\;y + z \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if t < -5.9999999999999997e-7Initial program 47.3%
Taylor expanded in t around inf 67.0%
associate--l+67.0%
associate-*r/67.0%
associate-*r/67.0%
div-sub67.0%
distribute-lft-out--67.0%
associate-*r/67.0%
mul-1-neg67.0%
unsub-neg67.0%
distribute-rgt-out--67.0%
associate-/l*87.6%
Simplified87.6%
Taylor expanded in z around inf 68.0%
associate-/l*80.3%
Simplified80.3%
clear-num80.3%
un-div-inv80.3%
Applied egg-rr80.3%
if -5.9999999999999997e-7 < t < 7.00000000000000041e132Initial program 86.5%
Taylor expanded in z around inf 78.5%
associate-/l*83.7%
Simplified83.7%
if 7.00000000000000041e132 < t Initial program 24.5%
Taylor expanded in t around inf 58.9%
associate--l+58.9%
associate-*r/58.9%
associate-*r/58.9%
div-sub58.9%
distribute-lft-out--58.9%
associate-*r/58.9%
mul-1-neg58.9%
unsub-neg58.9%
distribute-rgt-out--59.1%
associate-/l*86.8%
Simplified86.8%
Taylor expanded in z around inf 51.8%
associate-/l*79.7%
Simplified79.7%
Final simplification82.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3.15e-56) (not (<= t 5.7e+133))) (+ y (* z (/ x t))) (+ x (* y (/ (- z t) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.15e-56) || !(t <= 5.7e+133)) {
tmp = y + (z * (x / 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 ((t <= (-3.15d-56)) .or. (.not. (t <= 5.7d+133))) then
tmp = y + (z * (x / 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 ((t <= -3.15e-56) || !(t <= 5.7e+133)) {
tmp = y + (z * (x / t));
} else {
tmp = x + (y * ((z - t) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -3.15e-56) or not (t <= 5.7e+133): tmp = y + (z * (x / t)) else: tmp = x + (y * ((z - t) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -3.15e-56) || !(t <= 5.7e+133)) tmp = Float64(y + Float64(z * Float64(x / 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 ((t <= -3.15e-56) || ~((t <= 5.7e+133))) tmp = y + (z * (x / t)); else tmp = x + (y * ((z - t) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.15e-56], N[Not[LessEqual[t, 5.7e+133]], $MachinePrecision]], N[(y + N[(z * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.15 \cdot 10^{-56} \lor \neg \left(t \leq 5.7 \cdot 10^{+133}\right):\\
\;\;\;\;y + z \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - t}{a}\\
\end{array}
\end{array}
if t < -3.1499999999999999e-56 or 5.69999999999999977e133 < t Initial program 41.7%
Taylor expanded in t around inf 64.2%
associate--l+64.2%
associate-*r/64.2%
associate-*r/64.2%
div-sub64.2%
distribute-lft-out--64.2%
associate-*r/64.2%
mul-1-neg64.2%
unsub-neg64.2%
distribute-rgt-out--64.3%
associate-/l*84.0%
Simplified84.0%
Taylor expanded in z around inf 60.2%
associate-/l*75.4%
Simplified75.4%
Taylor expanded in y around 0 57.5%
associate-*r/57.5%
*-commutative57.5%
neg-mul-157.5%
distribute-rgt-neg-in57.5%
associate-/l*66.5%
distribute-neg-frac66.5%
distribute-neg-frac266.5%
Simplified66.5%
if -3.1499999999999999e-56 < t < 5.69999999999999977e133Initial program 89.3%
Taylor expanded in y around inf 74.5%
*-commutative74.5%
associate-/l*78.4%
Simplified78.4%
Taylor expanded in a around inf 66.1%
associate-/l*71.0%
Simplified71.0%
Final simplification69.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3.15e-56) (not (<= t 7.8e+132))) (- y (* z (/ y t))) (+ x (* y (/ z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.15e-56) || !(t <= 7.8e+132)) {
tmp = y - (z * (y / t));
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-3.15d-56)) .or. (.not. (t <= 7.8d+132))) then
tmp = y - (z * (y / t))
else
tmp = x + (y * (z / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.15e-56) || !(t <= 7.8e+132)) {
tmp = y - (z * (y / t));
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -3.15e-56) or not (t <= 7.8e+132): tmp = y - (z * (y / t)) else: tmp = x + (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -3.15e-56) || !(t <= 7.8e+132)) tmp = Float64(y - Float64(z * Float64(y / t))); else tmp = Float64(x + Float64(y * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -3.15e-56) || ~((t <= 7.8e+132))) tmp = y - (z * (y / t)); else tmp = x + (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.15e-56], N[Not[LessEqual[t, 7.8e+132]], $MachinePrecision]], N[(y - N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.15 \cdot 10^{-56} \lor \neg \left(t \leq 7.8 \cdot 10^{+132}\right):\\
\;\;\;\;y - z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if t < -3.1499999999999999e-56 or 7.80000000000000002e132 < t Initial program 41.7%
Taylor expanded in t around inf 64.2%
associate--l+64.2%
associate-*r/64.2%
associate-*r/64.2%
div-sub64.2%
distribute-lft-out--64.2%
associate-*r/64.2%
mul-1-neg64.2%
unsub-neg64.2%
distribute-rgt-out--64.3%
associate-/l*84.0%
Simplified84.0%
Taylor expanded in z around inf 60.2%
associate-/l*75.4%
Simplified75.4%
Taylor expanded in y around inf 60.0%
if -3.1499999999999999e-56 < t < 7.80000000000000002e132Initial program 89.3%
Taylor expanded in y around inf 74.5%
*-commutative74.5%
associate-/l*78.4%
Simplified78.4%
Taylor expanded in t around 0 61.7%
+-commutative61.7%
associate-/l*65.3%
Simplified65.3%
Final simplification63.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3.15e-56) (not (<= t 7e+132))) (+ y (* z (/ x t))) (+ x (* y (/ z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.15e-56) || !(t <= 7e+132)) {
tmp = y + (z * (x / t));
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-3.15d-56)) .or. (.not. (t <= 7d+132))) then
tmp = y + (z * (x / t))
else
tmp = x + (y * (z / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.15e-56) || !(t <= 7e+132)) {
tmp = y + (z * (x / t));
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -3.15e-56) or not (t <= 7e+132): tmp = y + (z * (x / t)) else: tmp = x + (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -3.15e-56) || !(t <= 7e+132)) tmp = Float64(y + Float64(z * Float64(x / t))); else tmp = Float64(x + Float64(y * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -3.15e-56) || ~((t <= 7e+132))) tmp = y + (z * (x / t)); else tmp = x + (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.15e-56], N[Not[LessEqual[t, 7e+132]], $MachinePrecision]], N[(y + N[(z * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.15 \cdot 10^{-56} \lor \neg \left(t \leq 7 \cdot 10^{+132}\right):\\
\;\;\;\;y + z \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if t < -3.1499999999999999e-56 or 7.00000000000000041e132 < t Initial program 41.7%
Taylor expanded in t around inf 64.2%
associate--l+64.2%
associate-*r/64.2%
associate-*r/64.2%
div-sub64.2%
distribute-lft-out--64.2%
associate-*r/64.2%
mul-1-neg64.2%
unsub-neg64.2%
distribute-rgt-out--64.3%
associate-/l*84.0%
Simplified84.0%
Taylor expanded in z around inf 60.2%
associate-/l*75.4%
Simplified75.4%
Taylor expanded in y around 0 57.5%
associate-*r/57.5%
*-commutative57.5%
neg-mul-157.5%
distribute-rgt-neg-in57.5%
associate-/l*66.5%
distribute-neg-frac66.5%
distribute-neg-frac266.5%
Simplified66.5%
if -3.1499999999999999e-56 < t < 7.00000000000000041e132Initial program 89.3%
Taylor expanded in y around inf 74.5%
*-commutative74.5%
associate-/l*78.4%
Simplified78.4%
Taylor expanded in t around 0 61.7%
+-commutative61.7%
associate-/l*65.3%
Simplified65.3%
Final simplification65.8%
(FPCore (x y z t a) :precision binary64 (if (<= t -3.4e-7) y (if (<= t 7.5e+132) (* x (- 1.0 (/ z a))) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.4e-7) {
tmp = y;
} else if (t <= 7.5e+132) {
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 <= (-3.4d-7)) then
tmp = y
else if (t <= 7.5d+132) 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 <= -3.4e-7) {
tmp = y;
} else if (t <= 7.5e+132) {
tmp = x * (1.0 - (z / a));
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3.4e-7: tmp = y elif t <= 7.5e+132: tmp = x * (1.0 - (z / a)) else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.4e-7) tmp = y; elseif (t <= 7.5e+132) 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 <= -3.4e-7) tmp = y; elseif (t <= 7.5e+132) tmp = x * (1.0 - (z / a)); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.4e-7], y, If[LessEqual[t, 7.5e+132], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.4 \cdot 10^{-7}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{+132}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -3.39999999999999974e-7 or 7.50000000000000017e132 < t Initial program 36.7%
Taylor expanded in t around inf 57.2%
if -3.39999999999999974e-7 < t < 7.50000000000000017e132Initial program 86.5%
Taylor expanded in t around 0 65.9%
associate-/l*70.7%
Simplified70.7%
Taylor expanded in x around inf 52.4%
mul-1-neg52.4%
unsub-neg52.4%
Simplified52.4%
Final simplification54.0%
(FPCore (x y z t a) :precision binary64 (if (<= t -6.5e-7) y (if (<= t 3.75e+133) (+ x (* z (/ y a))) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.5e-7) {
tmp = y;
} else if (t <= 3.75e+133) {
tmp = x + (z * (y / 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 <= (-6.5d-7)) then
tmp = y
else if (t <= 3.75d+133) then
tmp = x + (z * (y / 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 <= -6.5e-7) {
tmp = y;
} else if (t <= 3.75e+133) {
tmp = x + (z * (y / a));
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -6.5e-7: tmp = y elif t <= 3.75e+133: tmp = x + (z * (y / a)) else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6.5e-7) tmp = y; elseif (t <= 3.75e+133) tmp = Float64(x + Float64(z * Float64(y / a))); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -6.5e-7) tmp = y; elseif (t <= 3.75e+133) tmp = x + (z * (y / a)); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.5e-7], y, If[LessEqual[t, 3.75e+133], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{-7}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 3.75 \cdot 10^{+133}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -6.50000000000000024e-7 or 3.74999999999999996e133 < t Initial program 36.7%
Taylor expanded in t around inf 57.2%
if -6.50000000000000024e-7 < t < 3.74999999999999996e133Initial program 86.5%
Taylor expanded in t around 0 65.9%
associate-/l*70.7%
Simplified70.7%
clear-num70.7%
un-div-inv70.7%
Applied egg-rr70.7%
Taylor expanded in y around inf 56.8%
associate-*l/59.9%
*-commutative59.9%
Simplified59.9%
Final simplification59.0%
(FPCore (x y z t a) :precision binary64 (if (<= t -6.6e-7) y (if (<= t 1.05e+133) (+ x (* y (/ z a))) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.6e-7) {
tmp = y;
} else if (t <= 1.05e+133) {
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 <= (-6.6d-7)) then
tmp = y
else if (t <= 1.05d+133) 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 <= -6.6e-7) {
tmp = y;
} else if (t <= 1.05e+133) {
tmp = x + (y * (z / a));
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -6.6e-7: tmp = y elif t <= 1.05e+133: tmp = x + (y * (z / a)) else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6.6e-7) tmp = y; elseif (t <= 1.05e+133) 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 <= -6.6e-7) tmp = y; elseif (t <= 1.05e+133) tmp = x + (y * (z / a)); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.6e-7], y, If[LessEqual[t, 1.05e+133], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.6 \cdot 10^{-7}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{+133}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -6.6000000000000003e-7 or 1.05e133 < t Initial program 36.7%
Taylor expanded in t around inf 57.2%
if -6.6000000000000003e-7 < t < 1.05e133Initial program 86.5%
Taylor expanded in y around inf 70.9%
*-commutative70.9%
associate-/l*75.5%
Simplified75.5%
Taylor expanded in t around 0 56.8%
+-commutative56.8%
associate-/l*61.2%
Simplified61.2%
Final simplification59.8%
(FPCore (x y z t a) :precision binary64 (if (<= t -3.15e-56) y (if (<= t 7e+132) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.15e-56) {
tmp = y;
} else if (t <= 7e+132) {
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 <= (-3.15d-56)) then
tmp = y
else if (t <= 7d+132) 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 <= -3.15e-56) {
tmp = y;
} else if (t <= 7e+132) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3.15e-56: tmp = y elif t <= 7e+132: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.15e-56) tmp = y; elseif (t <= 7e+132) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -3.15e-56) tmp = y; elseif (t <= 7e+132) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.15e-56], y, If[LessEqual[t, 7e+132], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.15 \cdot 10^{-56}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 7 \cdot 10^{+132}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -3.1499999999999999e-56 or 7.00000000000000041e132 < t Initial program 41.7%
Taylor expanded in t around inf 51.2%
if -3.1499999999999999e-56 < t < 7.00000000000000041e132Initial program 89.3%
Taylor expanded in a around inf 38.5%
Final simplification43.8%
(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.4%
Taylor expanded in a around inf 27.0%
Final simplification27.0%
(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 2024050
(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))))