
(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 23 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((y - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- z a) (* (/ 1.0 t) (- x y)) y)))
(if (<= t -2.3e+141)
t_1
(if (<= t 4.7e+120) (fma (/ (- z t) (- a t)) (- y x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((z - a), ((1.0 / t) * (x - y)), y);
double tmp;
if (t <= -2.3e+141) {
tmp = t_1;
} else if (t <= 4.7e+120) {
tmp = fma(((z - t) / (a - t)), (y - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(z - a), Float64(Float64(1.0 / t) * Float64(x - y)), y) tmp = 0.0 if (t <= -2.3e+141) tmp = t_1; elseif (t <= 4.7e+120) tmp = fma(Float64(Float64(z - t) / Float64(a - t)), Float64(y - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - a), $MachinePrecision] * N[(N[(1.0 / t), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -2.3e+141], t$95$1, If[LessEqual[t, 4.7e+120], N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z - a, \frac{1}{t} \cdot \left(x - y\right), y\right)\\
\mathbf{if}\;t \leq -2.3 \cdot 10^{+141}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.7 \cdot 10^{+120}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.3000000000000002e141 or 4.69999999999999993e120 < t Initial program 37.8%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Simplified84.6%
lift--.f64N/A
lift--.f64N/A
lift-/.f64N/A
*-commutativeN/A
lift-/.f64N/A
div-invN/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f6487.2
Applied egg-rr87.2%
if -2.3000000000000002e141 < t < 4.69999999999999993e120Initial program 83.3%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
lift-/.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6492.2
Applied egg-rr92.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- x y) (/ (- z a) t) y)))
(if (<= t -2.3e+142)
t_1
(if (<= t -6e-12)
(* y (/ (- z t) (- a t)))
(if (<= t 1.42e-21) (fma (/ z (- a t)) (- y x) x) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x - y), ((z - a) / t), y);
double tmp;
if (t <= -2.3e+142) {
tmp = t_1;
} else if (t <= -6e-12) {
tmp = y * ((z - t) / (a - t));
} else if (t <= 1.42e-21) {
tmp = fma((z / (a - t)), (y - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x - y), Float64(Float64(z - a) / t), y) tmp = 0.0 if (t <= -2.3e+142) tmp = t_1; elseif (t <= -6e-12) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); elseif (t <= 1.42e-21) tmp = fma(Float64(z / Float64(a - t)), Float64(y - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -2.3e+142], t$95$1, If[LessEqual[t, -6e-12], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.42e-21], N[(N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{if}\;t \leq -2.3 \cdot 10^{+142}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -6 \cdot 10^{-12}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{elif}\;t \leq 1.42 \cdot 10^{-21}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a - t}, y - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.30000000000000002e142 or 1.42e-21 < t Initial program 46.1%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Simplified82.4%
if -2.30000000000000002e142 < t < -6.0000000000000003e-12Initial program 63.7%
Taylor expanded in x around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6455.0
Simplified55.0%
lift--.f64N/A
lift--.f64N/A
associate-/l*N/A
div-invN/A
lift-/.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6471.3
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
div-invN/A
lower-/.f6471.5
Applied egg-rr71.5%
if -6.0000000000000003e-12 < t < 1.42e-21Initial program 90.3%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
lift-/.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6493.6
Applied egg-rr93.6%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f6483.5
Simplified83.5%
Final simplification81.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- x y) (/ (- z a) t) y)))
(if (<= t -2.3e+142)
t_1
(if (<= t -6e-12)
(* y (/ (- z t) (- a t)))
(if (<= t 7.5e-26) (fma (- z t) (/ (- y x) a) x) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x - y), ((z - a) / t), y);
double tmp;
if (t <= -2.3e+142) {
tmp = t_1;
} else if (t <= -6e-12) {
tmp = y * ((z - t) / (a - t));
} else if (t <= 7.5e-26) {
tmp = fma((z - t), ((y - x) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x - y), Float64(Float64(z - a) / t), y) tmp = 0.0 if (t <= -2.3e+142) tmp = t_1; elseif (t <= -6e-12) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); elseif (t <= 7.5e-26) tmp = fma(Float64(z - t), Float64(Float64(y - x) / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -2.3e+142], t$95$1, If[LessEqual[t, -6e-12], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.5e-26], N[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{if}\;t \leq -2.3 \cdot 10^{+142}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -6 \cdot 10^{-12}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{-26}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{y - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.30000000000000002e142 or 7.4999999999999994e-26 < t Initial program 46.1%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Simplified82.4%
if -2.30000000000000002e142 < t < -6.0000000000000003e-12Initial program 63.7%
Taylor expanded in x around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6455.0
Simplified55.0%
lift--.f64N/A
lift--.f64N/A
associate-/l*N/A
div-invN/A
lift-/.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6471.3
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
div-invN/A
lower-/.f6471.5
Applied egg-rr71.5%
if -6.0000000000000003e-12 < t < 7.4999999999999994e-26Initial program 90.3%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6475.7
Simplified75.7%
Final simplification77.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- x y) (/ (- z a) t) y)))
(if (<= t -2.3e+142)
t_1
(if (<= t -2.6e-12)
(* y (/ (- z t) (- a t)))
(if (<= t 7.5e-26) (fma (/ z a) (- y x) x) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x - y), ((z - a) / t), y);
double tmp;
if (t <= -2.3e+142) {
tmp = t_1;
} else if (t <= -2.6e-12) {
tmp = y * ((z - t) / (a - t));
} else if (t <= 7.5e-26) {
tmp = fma((z / a), (y - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x - y), Float64(Float64(z - a) / t), y) tmp = 0.0 if (t <= -2.3e+142) tmp = t_1; elseif (t <= -2.6e-12) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); elseif (t <= 7.5e-26) tmp = fma(Float64(z / a), Float64(y - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -2.3e+142], t$95$1, If[LessEqual[t, -2.6e-12], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.5e-26], N[(N[(z / a), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{if}\;t \leq -2.3 \cdot 10^{+142}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.6 \cdot 10^{-12}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{-26}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.30000000000000002e142 or 7.4999999999999994e-26 < t Initial program 46.1%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Simplified82.4%
if -2.30000000000000002e142 < t < -2.59999999999999983e-12Initial program 63.7%
Taylor expanded in x around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6455.0
Simplified55.0%
lift--.f64N/A
lift--.f64N/A
associate-/l*N/A
div-invN/A
lift-/.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6471.3
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
div-invN/A
lower-/.f6471.5
Applied egg-rr71.5%
if -2.59999999999999983e-12 < t < 7.4999999999999994e-26Initial program 90.3%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
lift-/.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6493.6
Applied egg-rr93.6%
Taylor expanded in t around 0
lower-/.f6473.4
Simplified73.4%
Final simplification76.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma z (/ (- x y) t) y)))
(if (<= t -1.9e+141)
t_1
(if (<= t -2.6e-12)
(* y (/ (- z t) (- a t)))
(if (<= t 1.96e-25) (fma (/ z a) (- y x) x) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(z, ((x - y) / t), y);
double tmp;
if (t <= -1.9e+141) {
tmp = t_1;
} else if (t <= -2.6e-12) {
tmp = y * ((z - t) / (a - t));
} else if (t <= 1.96e-25) {
tmp = fma((z / a), (y - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(z, Float64(Float64(x - y) / t), y) tmp = 0.0 if (t <= -1.9e+141) tmp = t_1; elseif (t <= -2.6e-12) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); elseif (t <= 1.96e-25) tmp = fma(Float64(z / a), Float64(y - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -1.9e+141], t$95$1, If[LessEqual[t, -2.6e-12], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.96e-25], N[(N[(z / a), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, \frac{x - y}{t}, y\right)\\
\mathbf{if}\;t \leq -1.9 \cdot 10^{+141}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.6 \cdot 10^{-12}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{elif}\;t \leq 1.96 \cdot 10^{-25}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.89999999999999988e141 or 1.96e-25 < t Initial program 45.7%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Simplified81.5%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
div-subN/A
lower-fma.f64N/A
div-subN/A
lower-/.f64N/A
lower--.f6469.9
Simplified69.9%
if -1.89999999999999988e141 < t < -2.59999999999999983e-12Initial program 65.3%
Taylor expanded in x around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6456.3
Simplified56.3%
lift--.f64N/A
lift--.f64N/A
associate-/l*N/A
div-invN/A
lift-/.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6473.1
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
div-invN/A
lower-/.f6473.2
Applied egg-rr73.2%
if -2.59999999999999983e-12 < t < 1.96e-25Initial program 90.3%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
lift-/.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6493.6
Applied egg-rr93.6%
Taylor expanded in t around 0
lower-/.f6473.4
Simplified73.4%
Final simplification72.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma z (/ (- x y) t) y)))
(if (<= t -1.85e+141)
t_1
(if (<= t -2.6e-12)
(* (- z t) (/ y (- a t)))
(if (<= t 1.96e-25) (fma (/ z a) (- y x) x) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(z, ((x - y) / t), y);
double tmp;
if (t <= -1.85e+141) {
tmp = t_1;
} else if (t <= -2.6e-12) {
tmp = (z - t) * (y / (a - t));
} else if (t <= 1.96e-25) {
tmp = fma((z / a), (y - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(z, Float64(Float64(x - y) / t), y) tmp = 0.0 if (t <= -1.85e+141) tmp = t_1; elseif (t <= -2.6e-12) tmp = Float64(Float64(z - t) * Float64(y / Float64(a - t))); elseif (t <= 1.96e-25) tmp = fma(Float64(z / a), Float64(y - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -1.85e+141], t$95$1, If[LessEqual[t, -2.6e-12], N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.96e-25], N[(N[(z / a), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, \frac{x - y}{t}, y\right)\\
\mathbf{if}\;t \leq -1.85 \cdot 10^{+141}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.6 \cdot 10^{-12}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\
\mathbf{elif}\;t \leq 1.96 \cdot 10^{-25}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.8500000000000001e141 or 1.96e-25 < t Initial program 45.7%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Simplified81.5%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
div-subN/A
lower-fma.f64N/A
div-subN/A
lower-/.f64N/A
lower--.f6469.9
Simplified69.9%
if -1.8500000000000001e141 < t < -2.59999999999999983e-12Initial program 65.3%
Taylor expanded in x around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6456.3
Simplified56.3%
lift--.f64N/A
*-commutativeN/A
lift--.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6473.1
Applied egg-rr73.1%
if -2.59999999999999983e-12 < t < 1.96e-25Initial program 90.3%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
lift-/.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6493.6
Applied egg-rr93.6%
Taylor expanded in t around 0
lower-/.f6473.4
Simplified73.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- x y) (/ (- z a) t) y)))
(if (<= t -2.8e+150)
t_1
(if (<= t 4.7e+120) (fma (/ (- z t) (- a t)) (- y x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x - y), ((z - a) / t), y);
double tmp;
if (t <= -2.8e+150) {
tmp = t_1;
} else if (t <= 4.7e+120) {
tmp = fma(((z - t) / (a - t)), (y - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x - y), Float64(Float64(z - a) / t), y) tmp = 0.0 if (t <= -2.8e+150) tmp = t_1; elseif (t <= 4.7e+120) tmp = fma(Float64(Float64(z - t) / Float64(a - t)), Float64(y - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -2.8e+150], t$95$1, If[LessEqual[t, 4.7e+120], N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{if}\;t \leq -2.8 \cdot 10^{+150}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.7 \cdot 10^{+120}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.80000000000000009e150 or 4.69999999999999993e120 < t Initial program 37.5%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Simplified84.9%
if -2.80000000000000009e150 < t < 4.69999999999999993e120Initial program 82.2%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
lift-/.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6491.9
Applied egg-rr91.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (- 1.0 (/ z t)))))
(if (<= y -5.7e-72)
t_1
(if (<= y 1.95e-250)
(/ (* (- z a) x) t)
(if (<= y 155000000.0) (fma (- x) (/ z a) x) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (1.0 - (z / t));
double tmp;
if (y <= -5.7e-72) {
tmp = t_1;
} else if (y <= 1.95e-250) {
tmp = ((z - a) * x) / t;
} else if (y <= 155000000.0) {
tmp = fma(-x, (z / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(y * Float64(1.0 - Float64(z / t))) tmp = 0.0 if (y <= -5.7e-72) tmp = t_1; elseif (y <= 1.95e-250) tmp = Float64(Float64(Float64(z - a) * x) / t); elseif (y <= 155000000.0) tmp = fma(Float64(-x), Float64(z / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.7e-72], t$95$1, If[LessEqual[y, 1.95e-250], N[(N[(N[(z - a), $MachinePrecision] * x), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[y, 155000000.0], N[((-x) * N[(z / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{if}\;y \leq -5.7 \cdot 10^{-72}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.95 \cdot 10^{-250}:\\
\;\;\;\;\frac{\left(z - a\right) \cdot x}{t}\\
\mathbf{elif}\;y \leq 155000000:\\
\;\;\;\;\mathsf{fma}\left(-x, \frac{z}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.7000000000000003e-72 or 1.55e8 < y Initial program 66.8%
Taylor expanded in x around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6456.7
Simplified56.7%
Taylor expanded in a around 0
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f6452.2
Simplified52.2%
if -5.7000000000000003e-72 < y < 1.95000000000000014e-250Initial program 70.8%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Simplified57.5%
Taylor expanded in x around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6451.8
Simplified51.8%
if 1.95000000000000014e-250 < y < 1.55e8Initial program 78.8%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
*-lft-identityN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-frac2N/A
lower-/.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
remove-double-negN/A
lower-+.f64N/A
lower-neg.f6468.4
Simplified68.4%
Taylor expanded in t around 0
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f6460.8
Simplified60.8%
lift-*.f64N/A
lift-/.f64N/A
sub-negN/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-/.f6464.3
Applied egg-rr64.3%
Final simplification54.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (- 1.0 (/ z t)))))
(if (<= y -5.7e-72)
t_1
(if (<= y 3.5e-178)
(/ (* (- z a) x) t)
(if (<= y 155000000.0) (- x (/ (* z x) a)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (1.0 - (z / t));
double tmp;
if (y <= -5.7e-72) {
tmp = t_1;
} else if (y <= 3.5e-178) {
tmp = ((z - a) * x) / t;
} else if (y <= 155000000.0) {
tmp = x - ((z * x) / 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 = y * (1.0d0 - (z / t))
if (y <= (-5.7d-72)) then
tmp = t_1
else if (y <= 3.5d-178) then
tmp = ((z - a) * x) / t
else if (y <= 155000000.0d0) then
tmp = x - ((z * x) / 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 = y * (1.0 - (z / t));
double tmp;
if (y <= -5.7e-72) {
tmp = t_1;
} else if (y <= 3.5e-178) {
tmp = ((z - a) * x) / t;
} else if (y <= 155000000.0) {
tmp = x - ((z * x) / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (1.0 - (z / t)) tmp = 0 if y <= -5.7e-72: tmp = t_1 elif y <= 3.5e-178: tmp = ((z - a) * x) / t elif y <= 155000000.0: tmp = x - ((z * x) / a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(1.0 - Float64(z / t))) tmp = 0.0 if (y <= -5.7e-72) tmp = t_1; elseif (y <= 3.5e-178) tmp = Float64(Float64(Float64(z - a) * x) / t); elseif (y <= 155000000.0) tmp = Float64(x - Float64(Float64(z * x) / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (1.0 - (z / t)); tmp = 0.0; if (y <= -5.7e-72) tmp = t_1; elseif (y <= 3.5e-178) tmp = ((z - a) * x) / t; elseif (y <= 155000000.0) tmp = x - ((z * x) / a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.7e-72], t$95$1, If[LessEqual[y, 3.5e-178], N[(N[(N[(z - a), $MachinePrecision] * x), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[y, 155000000.0], N[(x - N[(N[(z * x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{if}\;y \leq -5.7 \cdot 10^{-72}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{-178}:\\
\;\;\;\;\frac{\left(z - a\right) \cdot x}{t}\\
\mathbf{elif}\;y \leq 155000000:\\
\;\;\;\;x - \frac{z \cdot x}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.7000000000000003e-72 or 1.55e8 < y Initial program 66.8%
Taylor expanded in x around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6456.7
Simplified56.7%
Taylor expanded in a around 0
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f6452.2
Simplified52.2%
if -5.7000000000000003e-72 < y < 3.49999999999999983e-178Initial program 68.1%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Simplified53.0%
Taylor expanded in x around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6449.8
Simplified49.8%
if 3.49999999999999983e-178 < y < 1.55e8Initial program 86.3%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
*-lft-identityN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-frac2N/A
lower-/.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
remove-double-negN/A
lower-+.f64N/A
lower-neg.f6472.6
Simplified72.6%
Taylor expanded in t around 0
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f6467.9
Simplified67.9%
Final simplification53.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ (* z x) a))))
(if (<= a -3.1e+95)
t_1
(if (<= a -9.2e-8)
(* z (/ (- y x) a))
(if (<= a 13500000.0) (* y (- 1.0 (/ z t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((z * x) / a);
double tmp;
if (a <= -3.1e+95) {
tmp = t_1;
} else if (a <= -9.2e-8) {
tmp = z * ((y - x) / a);
} else if (a <= 13500000.0) {
tmp = y * (1.0 - (z / 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 = x - ((z * x) / a)
if (a <= (-3.1d+95)) then
tmp = t_1
else if (a <= (-9.2d-8)) then
tmp = z * ((y - x) / a)
else if (a <= 13500000.0d0) then
tmp = y * (1.0d0 - (z / t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((z * x) / a);
double tmp;
if (a <= -3.1e+95) {
tmp = t_1;
} else if (a <= -9.2e-8) {
tmp = z * ((y - x) / a);
} else if (a <= 13500000.0) {
tmp = y * (1.0 - (z / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - ((z * x) / a) tmp = 0 if a <= -3.1e+95: tmp = t_1 elif a <= -9.2e-8: tmp = z * ((y - x) / a) elif a <= 13500000.0: tmp = y * (1.0 - (z / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(z * x) / a)) tmp = 0.0 if (a <= -3.1e+95) tmp = t_1; elseif (a <= -9.2e-8) tmp = Float64(z * Float64(Float64(y - x) / a)); elseif (a <= 13500000.0) tmp = Float64(y * Float64(1.0 - Float64(z / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - ((z * x) / a); tmp = 0.0; if (a <= -3.1e+95) tmp = t_1; elseif (a <= -9.2e-8) tmp = z * ((y - x) / a); elseif (a <= 13500000.0) tmp = y * (1.0 - (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[(z * x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.1e+95], t$95$1, If[LessEqual[a, -9.2e-8], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 13500000.0], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{z \cdot x}{a}\\
\mathbf{if}\;a \leq -3.1 \cdot 10^{+95}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -9.2 \cdot 10^{-8}:\\
\;\;\;\;z \cdot \frac{y - x}{a}\\
\mathbf{elif}\;a \leq 13500000:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -3.1000000000000003e95 or 1.35e7 < a Initial program 68.8%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
*-lft-identityN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-frac2N/A
lower-/.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
remove-double-negN/A
lower-+.f64N/A
lower-neg.f6452.0
Simplified52.0%
Taylor expanded in t around 0
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f6447.4
Simplified47.4%
if -3.1000000000000003e95 < a < -9.2000000000000003e-8Initial program 71.8%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6457.0
Simplified57.0%
Taylor expanded in a around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6448.9
Simplified48.9%
if -9.2000000000000003e-8 < a < 1.35e7Initial program 70.1%
Taylor expanded in x around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6455.2
Simplified55.2%
Taylor expanded in a around 0
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f6456.8
Simplified56.8%
Final simplification52.3%
(FPCore (x y z t a)
:precision binary64
(if (<= t -9.2e-55)
y
(if (<= t 4.6e-221)
(/ (* z y) a)
(if (<= t 9.5e-22) (fma x (/ z t) x) (fma y (/ a t) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -9.2e-55) {
tmp = y;
} else if (t <= 4.6e-221) {
tmp = (z * y) / a;
} else if (t <= 9.5e-22) {
tmp = fma(x, (z / t), x);
} else {
tmp = fma(y, (a / t), y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -9.2e-55) tmp = y; elseif (t <= 4.6e-221) tmp = Float64(Float64(z * y) / a); elseif (t <= 9.5e-22) tmp = fma(x, Float64(z / t), x); else tmp = fma(y, Float64(a / t), y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -9.2e-55], y, If[LessEqual[t, 4.6e-221], N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, 9.5e-22], N[(x * N[(z / t), $MachinePrecision] + x), $MachinePrecision], N[(y * N[(a / t), $MachinePrecision] + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.2 \cdot 10^{-55}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{-221}:\\
\;\;\;\;\frac{z \cdot y}{a}\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{-22}:\\
\;\;\;\;\mathsf{fma}\left(x, \frac{z}{t}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{a}{t}, y\right)\\
\end{array}
\end{array}
if t < -9.20000000000000046e-55Initial program 55.9%
Taylor expanded in t around inf
lower--.f6432.2
Simplified32.2%
lift--.f64N/A
+-commutativeN/A
lift--.f64N/A
associate-+l-N/A
lower--.f64N/A
lower--.f6438.6
Applied egg-rr38.6%
+-inversesN/A
--rgt-identity38.6
Applied egg-rr38.6%
if -9.20000000000000046e-55 < t < 4.6e-221Initial program 93.6%
Taylor expanded in x around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6452.3
Simplified52.3%
Taylor expanded in t around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f6439.6
Simplified39.6%
if 4.6e-221 < t < 9.4999999999999994e-22Initial program 87.6%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
*-lft-identityN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-frac2N/A
lower-/.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
remove-double-negN/A
lower-+.f64N/A
lower-neg.f6460.6
Simplified60.6%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
lower-+.f64N/A
lower-/.f6415.4
Simplified15.4%
Taylor expanded in z around inf
lower-/.f6434.1
Simplified34.1%
if 9.4999999999999994e-22 < t Initial program 52.9%
Taylor expanded in x around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6443.9
Simplified43.9%
Taylor expanded in z around 0
mul-1-negN/A
lower-neg.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6448.0
Simplified48.0%
Taylor expanded in t around inf
sub-negN/A
*-commutativeN/A
associate-/l*N/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
lower-/.f6447.6
Simplified47.6%
(FPCore (x y z t a) :precision binary64 (if (<= t -9.2e-55) y (if (<= t 4.6e-221) (/ (* z y) a) (if (<= t 9.5e-22) (fma x (/ z t) x) y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -9.2e-55) {
tmp = y;
} else if (t <= 4.6e-221) {
tmp = (z * y) / a;
} else if (t <= 9.5e-22) {
tmp = fma(x, (z / t), x);
} else {
tmp = y;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -9.2e-55) tmp = y; elseif (t <= 4.6e-221) tmp = Float64(Float64(z * y) / a); elseif (t <= 9.5e-22) tmp = fma(x, Float64(z / t), x); else tmp = y; end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -9.2e-55], y, If[LessEqual[t, 4.6e-221], N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, 9.5e-22], N[(x * N[(z / t), $MachinePrecision] + x), $MachinePrecision], y]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.2 \cdot 10^{-55}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{-221}:\\
\;\;\;\;\frac{z \cdot y}{a}\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{-22}:\\
\;\;\;\;\mathsf{fma}\left(x, \frac{z}{t}, x\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -9.20000000000000046e-55 or 9.4999999999999994e-22 < t Initial program 54.6%
Taylor expanded in t around inf
lower--.f6434.5
Simplified34.5%
lift--.f64N/A
+-commutativeN/A
lift--.f64N/A
associate-+l-N/A
lower--.f64N/A
lower--.f6442.6
Applied egg-rr42.6%
+-inversesN/A
--rgt-identity42.6
Applied egg-rr42.6%
if -9.20000000000000046e-55 < t < 4.6e-221Initial program 93.6%
Taylor expanded in x around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6452.3
Simplified52.3%
Taylor expanded in t around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f6439.6
Simplified39.6%
if 4.6e-221 < t < 9.4999999999999994e-22Initial program 87.6%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
*-lft-identityN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-frac2N/A
lower-/.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
remove-double-negN/A
lower-+.f64N/A
lower-neg.f6460.6
Simplified60.6%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
lower-+.f64N/A
lower-/.f6415.4
Simplified15.4%
Taylor expanded in z around inf
lower-/.f6434.1
Simplified34.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- z t) (- a t)))))
(if (<= y -1.15e-176)
t_1
(if (<= y 155000000.0) (fma (/ z (- a t)) (- x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / (a - t));
double tmp;
if (y <= -1.15e-176) {
tmp = t_1;
} else if (y <= 155000000.0) {
tmp = fma((z / (a - t)), -x, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t))) tmp = 0.0 if (y <= -1.15e-176) tmp = t_1; elseif (y <= 155000000.0) tmp = fma(Float64(z / Float64(a - t)), Float64(-x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.15e-176], t$95$1, If[LessEqual[y, 155000000.0], N[(N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision] * (-x) + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;y \leq -1.15 \cdot 10^{-176}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 155000000:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a - t}, -x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.1500000000000001e-176 or 1.55e8 < y Initial program 67.5%
Taylor expanded in x around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6455.5
Simplified55.5%
lift--.f64N/A
lift--.f64N/A
associate-/l*N/A
div-invN/A
lift-/.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6473.5
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
div-invN/A
lower-/.f6473.6
Applied egg-rr73.6%
if -1.1500000000000001e-176 < y < 1.55e8Initial program 75.0%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
lift-/.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6476.5
Applied egg-rr76.5%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f6470.5
Simplified70.5%
Taylor expanded in y around 0
mul-1-negN/A
lower-neg.f6464.5
Simplified64.5%
Final simplification70.8%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ z a) (- y x) x))) (if (<= a -2.2e-8) t_1 (if (<= a 2.6) (fma z (/ (- x y) t) y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((z / a), (y - x), x);
double tmp;
if (a <= -2.2e-8) {
tmp = t_1;
} else if (a <= 2.6) {
tmp = fma(z, ((x - y) / t), y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(z / a), Float64(y - x), x) tmp = 0.0 if (a <= -2.2e-8) tmp = t_1; elseif (a <= 2.6) tmp = fma(z, Float64(Float64(x - y) / t), y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z / a), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -2.2e-8], t$95$1, If[LessEqual[a, 2.6], N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\
\mathbf{if}\;a \leq -2.2 \cdot 10^{-8}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.6:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{x - y}{t}, y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.1999999999999998e-8 or 2.60000000000000009 < a Initial program 69.6%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
lift-/.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6489.9
Applied egg-rr89.9%
Taylor expanded in t around 0
lower-/.f6465.4
Simplified65.4%
if -2.1999999999999998e-8 < a < 2.60000000000000009Initial program 69.9%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Simplified77.8%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
div-subN/A
lower-fma.f64N/A
div-subN/A
lower-/.f64N/A
lower--.f6475.1
Simplified75.1%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma z (/ (- y x) a) x))) (if (<= a -2.2e-8) t_1 (if (<= a 2.7) (fma z (/ (- x y) t) y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(z, ((y - x) / a), x);
double tmp;
if (a <= -2.2e-8) {
tmp = t_1;
} else if (a <= 2.7) {
tmp = fma(z, ((x - y) / t), y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(z, Float64(Float64(y - x) / a), x) tmp = 0.0 if (a <= -2.2e-8) tmp = t_1; elseif (a <= 2.7) tmp = fma(z, Float64(Float64(x - y) / t), y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -2.2e-8], t$95$1, If[LessEqual[a, 2.7], N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
\mathbf{if}\;a \leq -2.2 \cdot 10^{-8}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.7:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{x - y}{t}, y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.1999999999999998e-8 or 2.7000000000000002 < a Initial program 69.6%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6464.6
Simplified64.6%
if -2.1999999999999998e-8 < a < 2.7000000000000002Initial program 69.9%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Simplified77.8%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
div-subN/A
lower-fma.f64N/A
div-subN/A
lower-/.f64N/A
lower--.f6475.1
Simplified75.1%
(FPCore (x y z t a) :precision binary64 (if (<= a -7.2e+103) (- x (/ (* z x) a)) (if (<= a 2.1e+139) (fma z (/ (- x y) t) y) (fma (- x) (/ z a) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -7.2e+103) {
tmp = x - ((z * x) / a);
} else if (a <= 2.1e+139) {
tmp = fma(z, ((x - y) / t), y);
} else {
tmp = fma(-x, (z / a), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -7.2e+103) tmp = Float64(x - Float64(Float64(z * x) / a)); elseif (a <= 2.1e+139) tmp = fma(z, Float64(Float64(x - y) / t), y); else tmp = fma(Float64(-x), Float64(z / a), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -7.2e+103], N[(x - N[(N[(z * x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.1e+139], N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], N[((-x) * N[(z / a), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.2 \cdot 10^{+103}:\\
\;\;\;\;x - \frac{z \cdot x}{a}\\
\mathbf{elif}\;a \leq 2.1 \cdot 10^{+139}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{x - y}{t}, y\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-x, \frac{z}{a}, x\right)\\
\end{array}
\end{array}
if a < -7.20000000000000033e103Initial program 71.3%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
*-lft-identityN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-frac2N/A
lower-/.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
remove-double-negN/A
lower-+.f64N/A
lower-neg.f6466.0
Simplified66.0%
Taylor expanded in t around 0
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f6464.0
Simplified64.0%
if -7.20000000000000033e103 < a < 2.0999999999999999e139Initial program 68.3%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Simplified67.9%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
div-subN/A
lower-fma.f64N/A
div-subN/A
lower-/.f64N/A
lower--.f6463.0
Simplified63.0%
if 2.0999999999999999e139 < a Initial program 77.5%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
*-lft-identityN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-frac2N/A
lower-/.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
remove-double-negN/A
lower-+.f64N/A
lower-neg.f6453.9
Simplified53.9%
Taylor expanded in t around 0
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f6449.3
Simplified49.3%
lift-*.f64N/A
lift-/.f64N/A
sub-negN/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-/.f6453.9
Applied egg-rr53.9%
Final simplification62.1%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* y (- 1.0 (/ z t))))) (if (<= t -7.2e-42) t_1 (if (<= t 7.6e-36) (* z (/ (- y x) a)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (1.0 - (z / t));
double tmp;
if (t <= -7.2e-42) {
tmp = t_1;
} else if (t <= 7.6e-36) {
tmp = z * ((y - x) / 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 = y * (1.0d0 - (z / t))
if (t <= (-7.2d-42)) then
tmp = t_1
else if (t <= 7.6d-36) then
tmp = z * ((y - x) / 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 = y * (1.0 - (z / t));
double tmp;
if (t <= -7.2e-42) {
tmp = t_1;
} else if (t <= 7.6e-36) {
tmp = z * ((y - x) / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (1.0 - (z / t)) tmp = 0 if t <= -7.2e-42: tmp = t_1 elif t <= 7.6e-36: tmp = z * ((y - x) / a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(1.0 - Float64(z / t))) tmp = 0.0 if (t <= -7.2e-42) tmp = t_1; elseif (t <= 7.6e-36) tmp = Float64(z * Float64(Float64(y - x) / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (1.0 - (z / t)); tmp = 0.0; if (t <= -7.2e-42) tmp = t_1; elseif (t <= 7.6e-36) tmp = z * ((y - x) / a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.2e-42], t$95$1, If[LessEqual[t, 7.6e-36], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{if}\;t \leq -7.2 \cdot 10^{-42}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7.6 \cdot 10^{-36}:\\
\;\;\;\;z \cdot \frac{y - x}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -7.2000000000000004e-42 or 7.59999999999999942e-36 < t Initial program 54.6%
Taylor expanded in x around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6441.4
Simplified41.4%
Taylor expanded in a around 0
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f6448.8
Simplified48.8%
if -7.2000000000000004e-42 < t < 7.59999999999999942e-36Initial program 91.0%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6454.8
Simplified54.8%
Taylor expanded in a around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6445.7
Simplified45.7%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* y (- 1.0 (/ z t))))) (if (<= t -8.6e-55) t_1 (if (<= t 8e-36) (* y (/ z (- a t))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (1.0 - (z / t));
double tmp;
if (t <= -8.6e-55) {
tmp = t_1;
} else if (t <= 8e-36) {
tmp = y * (z / (a - t));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * (1.0d0 - (z / t))
if (t <= (-8.6d-55)) then
tmp = t_1
else if (t <= 8d-36) then
tmp = y * (z / (a - t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (1.0 - (z / t));
double tmp;
if (t <= -8.6e-55) {
tmp = t_1;
} else if (t <= 8e-36) {
tmp = y * (z / (a - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (1.0 - (z / t)) tmp = 0 if t <= -8.6e-55: tmp = t_1 elif t <= 8e-36: tmp = y * (z / (a - t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(1.0 - Float64(z / t))) tmp = 0.0 if (t <= -8.6e-55) tmp = t_1; elseif (t <= 8e-36) tmp = Float64(y * Float64(z / Float64(a - t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (1.0 - (z / t)); tmp = 0.0; if (t <= -8.6e-55) tmp = t_1; elseif (t <= 8e-36) tmp = y * (z / (a - t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.6e-55], t$95$1, If[LessEqual[t, 8e-36], N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{if}\;t \leq -8.6 \cdot 10^{-55}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 8 \cdot 10^{-36}:\\
\;\;\;\;y \cdot \frac{z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -8.60000000000000021e-55 or 7.9999999999999995e-36 < t Initial program 55.1%
Taylor expanded in x around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6441.0
Simplified41.0%
Taylor expanded in a around 0
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f6448.2
Simplified48.2%
if -8.60000000000000021e-55 < t < 7.9999999999999995e-36Initial program 91.6%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6455.8
Simplified55.8%
Taylor expanded in y around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6442.8
Simplified42.8%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* y (- 1.0 (/ z t))))) (if (<= y -2.5e-72) t_1 (if (<= y 155000000.0) (fma x (/ z t) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (1.0 - (z / t));
double tmp;
if (y <= -2.5e-72) {
tmp = t_1;
} else if (y <= 155000000.0) {
tmp = fma(x, (z / t), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(y * Float64(1.0 - Float64(z / t))) tmp = 0.0 if (y <= -2.5e-72) tmp = t_1; elseif (y <= 155000000.0) tmp = fma(x, Float64(z / t), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.5e-72], t$95$1, If[LessEqual[y, 155000000.0], N[(x * N[(z / t), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{if}\;y \leq -2.5 \cdot 10^{-72}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 155000000:\\
\;\;\;\;\mathsf{fma}\left(x, \frac{z}{t}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.4999999999999998e-72 or 1.55e8 < y Initial program 66.8%
Taylor expanded in x around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6456.7
Simplified56.7%
Taylor expanded in a around 0
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f6452.2
Simplified52.2%
if -2.4999999999999998e-72 < y < 1.55e8Initial program 74.4%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
*-lft-identityN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-frac2N/A
lower-/.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
remove-double-negN/A
lower-+.f64N/A
lower-neg.f6461.4
Simplified61.4%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
lower-+.f64N/A
lower-/.f6419.2
Simplified19.2%
Taylor expanded in z around inf
lower-/.f6431.1
Simplified31.1%
(FPCore (x y z t a) :precision binary64 (if (<= t -9.2e-55) y (if (<= t 1.6e-25) (/ (* z y) a) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -9.2e-55) {
tmp = y;
} else if (t <= 1.6e-25) {
tmp = (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 <= (-9.2d-55)) then
tmp = y
else if (t <= 1.6d-25) then
tmp = (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 <= -9.2e-55) {
tmp = y;
} else if (t <= 1.6e-25) {
tmp = (z * y) / a;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -9.2e-55: tmp = y elif t <= 1.6e-25: tmp = (z * y) / a else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -9.2e-55) tmp = y; elseif (t <= 1.6e-25) tmp = Float64(Float64(z * y) / a); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -9.2e-55) tmp = y; elseif (t <= 1.6e-25) tmp = (z * y) / a; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -9.2e-55], y, If[LessEqual[t, 1.6e-25], N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.2 \cdot 10^{-55}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-25}:\\
\;\;\;\;\frac{z \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -9.20000000000000046e-55 or 1.6000000000000001e-25 < t Initial program 54.6%
Taylor expanded in t around inf
lower--.f6434.5
Simplified34.5%
lift--.f64N/A
+-commutativeN/A
lift--.f64N/A
associate-+l-N/A
lower--.f64N/A
lower--.f6442.6
Applied egg-rr42.6%
+-inversesN/A
--rgt-identity42.6
Applied egg-rr42.6%
if -9.20000000000000046e-55 < t < 1.6000000000000001e-25Initial program 91.0%
Taylor expanded in x around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6444.2
Simplified44.2%
Taylor expanded in t around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f6431.3
Simplified31.3%
(FPCore (x y z t a) :precision binary64 (if (<= y -2.2e-72) y (if (<= y 3.3e-52) (/ (* z x) t) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2.2e-72) {
tmp = y;
} else if (y <= 3.3e-52) {
tmp = (z * x) / t;
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-2.2d-72)) then
tmp = y
else if (y <= 3.3d-52) then
tmp = (z * x) / t
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2.2e-72) {
tmp = y;
} else if (y <= 3.3e-52) {
tmp = (z * x) / t;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -2.2e-72: tmp = y elif y <= 3.3e-52: tmp = (z * x) / t else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -2.2e-72) tmp = y; elseif (y <= 3.3e-52) tmp = Float64(Float64(z * x) / t); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -2.2e-72) tmp = y; elseif (y <= 3.3e-52) tmp = (z * x) / t; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -2.2e-72], y, If[LessEqual[y, 3.3e-52], N[(N[(z * x), $MachinePrecision] / t), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{-72}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{-52}:\\
\;\;\;\;\frac{z \cdot x}{t}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -2.20000000000000002e-72 or 3.29999999999999995e-52 < y Initial program 68.4%
Taylor expanded in t around inf
lower--.f6432.1
Simplified32.1%
lift--.f64N/A
+-commutativeN/A
lift--.f64N/A
associate-+l-N/A
lower--.f64N/A
lower--.f6438.7
Applied egg-rr38.7%
+-inversesN/A
--rgt-identity38.7
Applied egg-rr38.7%
if -2.20000000000000002e-72 < y < 3.29999999999999995e-52Initial program 72.4%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
*-lft-identityN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-frac2N/A
lower-/.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
remove-double-negN/A
lower-+.f64N/A
lower-neg.f6460.9
Simplified60.9%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
lower-+.f64N/A
lower-/.f6421.1
Simplified21.1%
Taylor expanded in x around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f6428.6
Simplified28.6%
(FPCore (x y z t a) :precision binary64 y)
double code(double x, double y, double z, double t, double a) {
return y;
}
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 = y
end function
public static double code(double x, double y, double z, double t, double a) {
return y;
}
def code(x, y, z, t, a): return y
function code(x, y, z, t, a) return y end
function tmp = code(x, y, z, t, a) tmp = y; end
code[x_, y_, z_, t_, a_] := y
\begin{array}{l}
\\
y
\end{array}
Initial program 69.8%
Taylor expanded in t around inf
lower--.f6423.1
Simplified23.1%
lift--.f64N/A
+-commutativeN/A
lift--.f64N/A
associate-+l-N/A
lower--.f64N/A
lower--.f6427.9
Applied egg-rr27.9%
+-inversesN/A
--rgt-identity27.9
Applied egg-rr27.9%
(FPCore (x y z t a) :precision binary64 0.0)
double code(double x, double y, double z, double t, double a) {
return 0.0;
}
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 = 0.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return 0.0;
}
def code(x, y, z, t, a): return 0.0
function code(x, y, z, t, a) return 0.0 end
function tmp = code(x, y, z, t, a) tmp = 0.0; end
code[x_, y_, z_, t_, a_] := 0.0
\begin{array}{l}
\\
0
\end{array}
Initial program 69.8%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
*-lft-identityN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-frac2N/A
lower-/.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
remove-double-negN/A
lower-+.f64N/A
lower-neg.f6437.0
Simplified37.0%
Taylor expanded in t around inf
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lft2.6
Simplified2.6%
(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 2024207
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (if (< a -646122513817703/4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))) (if (< a 1887201585041587/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))))))
(+ x (/ (* (- y x) (- z t)) (- a t))))