
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((y - z) * (t - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((y - z) * (t - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.75e-123)
(fma (- t x) (/ (- y z) (- a z)) x)
(if (<= a 9.2e-112)
(fma (- x t) (/ y z) t)
(fma (/ (- t x) (- a z)) (- y z) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.75e-123) {
tmp = fma((t - x), ((y - z) / (a - z)), x);
} else if (a <= 9.2e-112) {
tmp = fma((x - t), (y / z), t);
} else {
tmp = fma(((t - x) / (a - z)), (y - z), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.75e-123) tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); elseif (a <= 9.2e-112) tmp = fma(Float64(x - t), Float64(y / z), t); else tmp = fma(Float64(Float64(t - x) / Float64(a - z)), Float64(y - z), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.75e-123], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 9.2e-112], N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision] + t), $MachinePrecision], N[(N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.75 \cdot 10^{-123}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\mathbf{elif}\;a \leq 9.2 \cdot 10^{-112}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a - z}, y - z, x\right)\\
\end{array}
\end{array}
if a < -1.7499999999999999e-123Initial program 81.5%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-/.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6498.8
Applied egg-rr98.8%
if -1.7499999999999999e-123 < a < 9.19999999999999963e-112Initial program 61.4%
Taylor expanded in z 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
Simplified93.7%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f6493.7
Simplified93.7%
if 9.19999999999999963e-112 < a Initial program 72.7%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-/.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6488.1
Applied egg-rr88.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (/ y z))))
(if (<= z -1.1e+162)
(fma t (/ a z) t)
(if (<= z -1.02e-151)
t_1
(if (<= z 8.4e-100)
(* t (/ y a))
(if (<= z 4.9e+143) t_1 (+ t (- x x))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (y / z);
double tmp;
if (z <= -1.1e+162) {
tmp = fma(t, (a / z), t);
} else if (z <= -1.02e-151) {
tmp = t_1;
} else if (z <= 8.4e-100) {
tmp = t * (y / a);
} else if (z <= 4.9e+143) {
tmp = t_1;
} else {
tmp = t + (x - x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x * Float64(y / z)) tmp = 0.0 if (z <= -1.1e+162) tmp = fma(t, Float64(a / z), t); elseif (z <= -1.02e-151) tmp = t_1; elseif (z <= 8.4e-100) tmp = Float64(t * Float64(y / a)); elseif (z <= 4.9e+143) tmp = t_1; else tmp = Float64(t + Float64(x - x)); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.1e+162], N[(t * N[(a / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, -1.02e-151], t$95$1, If[LessEqual[z, 8.4e-100], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.9e+143], t$95$1, N[(t + N[(x - x), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{z}\\
\mathbf{if}\;z \leq -1.1 \cdot 10^{+162}:\\
\;\;\;\;\mathsf{fma}\left(t, \frac{a}{z}, t\right)\\
\mathbf{elif}\;z \leq -1.02 \cdot 10^{-151}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 8.4 \cdot 10^{-100}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 4.9 \cdot 10^{+143}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t + \left(x - x\right)\\
\end{array}
\end{array}
if z < -1.1000000000000001e162Initial program 46.7%
Taylor expanded in z 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
Simplified85.8%
Taylor expanded in y around 0
+-commutativeN/A
mul-1-negN/A
associate-/l*N/A
div-subN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
div-subN/A
lower-/.f64N/A
lower--.f64N/A
lower-neg.f6470.5
Simplified70.5%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
associate-*r/N/A
lower-fma.f64N/A
lower-/.f6463.3
Simplified63.3%
if -1.1000000000000001e162 < z < -1.0200000000000001e-151 or 8.40000000000000037e-100 < z < 4.89999999999999986e143Initial program 77.5%
Taylor expanded in z 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.4%
Taylor expanded in x around inf
div-subN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6433.1
Simplified33.1%
Taylor expanded in y around inf
lower-/.f6431.4
Simplified31.4%
if -1.0200000000000001e-151 < z < 8.40000000000000037e-100Initial program 91.3%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6493.7
Simplified93.7%
Taylor expanded in t around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f6438.6
Simplified38.6%
if 4.89999999999999986e143 < z Initial program 22.4%
Taylor expanded in z around inf
lower--.f6451.0
Simplified51.0%
lift--.f64N/A
+-commutativeN/A
lift--.f64N/A
associate-+l-N/A
lower--.f64N/A
lower--.f6465.6
Applied egg-rr65.6%
Final simplification40.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (/ y z))) (t_2 (+ t (- x x))))
(if (<= z -1.1e+162)
t_2
(if (<= z -1.02e-151)
t_1
(if (<= z 8.4e-100) (* t (/ y a)) (if (<= z 4.9e+143) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (y / z);
double t_2 = t + (x - x);
double tmp;
if (z <= -1.1e+162) {
tmp = t_2;
} else if (z <= -1.02e-151) {
tmp = t_1;
} else if (z <= 8.4e-100) {
tmp = t * (y / a);
} else if (z <= 4.9e+143) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * (y / z)
t_2 = t + (x - x)
if (z <= (-1.1d+162)) then
tmp = t_2
else if (z <= (-1.02d-151)) then
tmp = t_1
else if (z <= 8.4d-100) then
tmp = t * (y / a)
else if (z <= 4.9d+143) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x * (y / z);
double t_2 = t + (x - x);
double tmp;
if (z <= -1.1e+162) {
tmp = t_2;
} else if (z <= -1.02e-151) {
tmp = t_1;
} else if (z <= 8.4e-100) {
tmp = t * (y / a);
} else if (z <= 4.9e+143) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (y / z) t_2 = t + (x - x) tmp = 0 if z <= -1.1e+162: tmp = t_2 elif z <= -1.02e-151: tmp = t_1 elif z <= 8.4e-100: tmp = t * (y / a) elif z <= 4.9e+143: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(y / z)) t_2 = Float64(t + Float64(x - x)) tmp = 0.0 if (z <= -1.1e+162) tmp = t_2; elseif (z <= -1.02e-151) tmp = t_1; elseif (z <= 8.4e-100) tmp = Float64(t * Float64(y / a)); elseif (z <= 4.9e+143) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (y / z); t_2 = t + (x - x); tmp = 0.0; if (z <= -1.1e+162) tmp = t_2; elseif (z <= -1.02e-151) tmp = t_1; elseif (z <= 8.4e-100) tmp = t * (y / a); elseif (z <= 4.9e+143) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t + N[(x - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.1e+162], t$95$2, If[LessEqual[z, -1.02e-151], t$95$1, If[LessEqual[z, 8.4e-100], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.9e+143], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{z}\\
t_2 := t + \left(x - x\right)\\
\mathbf{if}\;z \leq -1.1 \cdot 10^{+162}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.02 \cdot 10^{-151}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 8.4 \cdot 10^{-100}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 4.9 \cdot 10^{+143}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.1000000000000001e162 or 4.89999999999999986e143 < z Initial program 34.6%
Taylor expanded in z around inf
lower--.f6452.1
Simplified52.1%
lift--.f64N/A
+-commutativeN/A
lift--.f64N/A
associate-+l-N/A
lower--.f64N/A
lower--.f6464.0
Applied egg-rr64.0%
if -1.1000000000000001e162 < z < -1.0200000000000001e-151 or 8.40000000000000037e-100 < z < 4.89999999999999986e143Initial program 77.5%
Taylor expanded in z 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.4%
Taylor expanded in x around inf
div-subN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6433.1
Simplified33.1%
Taylor expanded in y around inf
lower-/.f6431.4
Simplified31.4%
if -1.0200000000000001e-151 < z < 8.40000000000000037e-100Initial program 91.3%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6493.7
Simplified93.7%
Taylor expanded in t around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f6438.6
Simplified38.6%
Final simplification40.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- t x) (/ (- y z) (- a z)) x)))
(if (<= a -1.75e-123)
t_1
(if (<= a 9.2e-112) (fma (- x t) (/ y z) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((t - x), ((y - z) / (a - z)), x);
double tmp;
if (a <= -1.75e-123) {
tmp = t_1;
} else if (a <= 9.2e-112) {
tmp = fma((x - t), (y / z), t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x) tmp = 0.0 if (a <= -1.75e-123) tmp = t_1; elseif (a <= 9.2e-112) tmp = fma(Float64(x - t), Float64(y / z), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -1.75e-123], t$95$1, If[LessEqual[a, 9.2e-112], N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\mathbf{if}\;a \leq -1.75 \cdot 10^{-123}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 9.2 \cdot 10^{-112}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.7499999999999999e-123 or 9.19999999999999963e-112 < a Initial program 77.0%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-/.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6493.3
Applied egg-rr93.3%
if -1.7499999999999999e-123 < a < 9.19999999999999963e-112Initial program 61.4%
Taylor expanded in z 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
Simplified93.7%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f6493.7
Simplified93.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- t) (/ y z) t)))
(if (<= z -1.1e+162)
t_1
(if (<= z -3.8e-74)
(* y (/ (- x t) z))
(if (<= z 7.2e+81) (fma y (/ t a) x) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(-t, (y / z), t);
double tmp;
if (z <= -1.1e+162) {
tmp = t_1;
} else if (z <= -3.8e-74) {
tmp = y * ((x - t) / z);
} else if (z <= 7.2e+81) {
tmp = fma(y, (t / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(-t), Float64(y / z), t) tmp = 0.0 if (z <= -1.1e+162) tmp = t_1; elseif (z <= -3.8e-74) tmp = Float64(y * Float64(Float64(x - t) / z)); elseif (z <= 7.2e+81) tmp = fma(y, Float64(t / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-t) * N[(y / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -1.1e+162], t$95$1, If[LessEqual[z, -3.8e-74], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.2e+81], N[(y * N[(t / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-t, \frac{y}{z}, t\right)\\
\mathbf{if}\;z \leq -1.1 \cdot 10^{+162}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-74}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{+81}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.1000000000000001e162 or 7.20000000000000011e81 < z Initial program 35.1%
Taylor expanded in z 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
Simplified83.5%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f6477.7
Simplified77.7%
Taylor expanded in x around 0
mul-1-negN/A
lower-neg.f6463.4
Simplified63.4%
if -1.1000000000000001e162 < z < -3.7999999999999996e-74Initial program 73.7%
Taylor expanded in z 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
Simplified62.6%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f6459.2
Simplified59.2%
Taylor expanded in y around inf
div-subN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6444.0
Simplified44.0%
if -3.7999999999999996e-74 < z < 7.20000000000000011e81Initial program 90.2%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6477.3
Simplified77.3%
Taylor expanded in t around inf
lower-/.f6464.0
Simplified64.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma y (/ t a) x)))
(if (<= a -9.8e-70)
t_1
(if (<= a 3.2e-135)
(* y (/ (- x t) z))
(if (<= a 9.2e+60) (/ (* (- t x) y) a) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(y, (t / a), x);
double tmp;
if (a <= -9.8e-70) {
tmp = t_1;
} else if (a <= 3.2e-135) {
tmp = y * ((x - t) / z);
} else if (a <= 9.2e+60) {
tmp = ((t - x) * y) / a;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(y, Float64(t / a), x) tmp = 0.0 if (a <= -9.8e-70) tmp = t_1; elseif (a <= 3.2e-135) tmp = Float64(y * Float64(Float64(x - t) / z)); elseif (a <= 9.2e+60) tmp = Float64(Float64(Float64(t - x) * y) / a); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(t / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -9.8e-70], t$95$1, If[LessEqual[a, 3.2e-135], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.2e+60], N[(N[(N[(t - x), $MachinePrecision] * y), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, \frac{t}{a}, x\right)\\
\mathbf{if}\;a \leq -9.8 \cdot 10^{-70}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3.2 \cdot 10^{-135}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\
\mathbf{elif}\;a \leq 9.2 \cdot 10^{+60}:\\
\;\;\;\;\frac{\left(t - x\right) \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -9.8000000000000001e-70 or 9.20000000000000068e60 < a Initial program 79.2%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6474.5
Simplified74.5%
Taylor expanded in t around inf
lower-/.f6467.2
Simplified67.2%
if -9.8000000000000001e-70 < a < 3.2e-135Initial program 63.2%
Taylor expanded in z 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
Simplified92.5%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f6492.5
Simplified92.5%
Taylor expanded in y around inf
div-subN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6458.3
Simplified58.3%
if 3.2e-135 < a < 9.20000000000000068e60Initial program 69.8%
Taylor expanded in y 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
lower-/.f64N/A
lower-*.f64N/A
lower--.f6445.6
Simplified45.6%
Final simplification60.2%
(FPCore (x y z t a)
:precision binary64
(if (<= a -7.8e-116)
(fma (- y z) (/ t (- a z)) x)
(if (<= a 6e+23)
(fma (- x t) (/ (- y a) z) t)
(fma (- t x) (/ (- y z) a) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -7.8e-116) {
tmp = fma((y - z), (t / (a - z)), x);
} else if (a <= 6e+23) {
tmp = fma((x - t), ((y - a) / z), t);
} else {
tmp = fma((t - x), ((y - z) / a), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -7.8e-116) tmp = fma(Float64(y - z), Float64(t / Float64(a - z)), x); elseif (a <= 6e+23) tmp = fma(Float64(x - t), Float64(Float64(y - a) / z), t); else tmp = fma(Float64(t - x), Float64(Float64(y - z) / a), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -7.8e-116], N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 6e+23], N[(N[(x - t), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.8 \cdot 10^{-116}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t}{a - z}, x\right)\\
\mathbf{elif}\;a \leq 6 \cdot 10^{+23}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y - a}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a}, x\right)\\
\end{array}
\end{array}
if a < -7.8000000000000001e-116Initial program 81.5%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-/.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6498.8
Applied egg-rr98.8%
lift--.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-/.f64N/A
*-commutativeN/A
lift-/.f64N/A
div-invN/A
lift-/.f64N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f6494.1
Applied egg-rr94.1%
Taylor expanded in t around inf
lower-/.f64N/A
lower--.f6483.3
Simplified83.3%
if -7.8000000000000001e-116 < a < 6.0000000000000002e23Initial program 63.7%
Taylor expanded in z 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
Simplified80.8%
if 6.0000000000000002e23 < a Initial program 75.2%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-/.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6494.7
Applied egg-rr94.7%
Taylor expanded in a around inf
lower-/.f64N/A
lower--.f6485.3
Simplified85.3%
Final simplification82.7%
(FPCore (x y z t a) :precision binary64 (if (<= a -6.6e-116) (fma (- y z) (/ t (- a z)) x) (if (<= a 6.8e-34) (fma (- x t) (/ y z) t) (fma (- t x) (/ (- y z) a) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.6e-116) {
tmp = fma((y - z), (t / (a - z)), x);
} else if (a <= 6.8e-34) {
tmp = fma((x - t), (y / z), t);
} else {
tmp = fma((t - x), ((y - z) / a), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -6.6e-116) tmp = fma(Float64(y - z), Float64(t / Float64(a - z)), x); elseif (a <= 6.8e-34) tmp = fma(Float64(x - t), Float64(y / z), t); else tmp = fma(Float64(t - x), Float64(Float64(y - z) / a), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6.6e-116], N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 6.8e-34], N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision] + t), $MachinePrecision], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.6 \cdot 10^{-116}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t}{a - z}, x\right)\\
\mathbf{elif}\;a \leq 6.8 \cdot 10^{-34}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a}, x\right)\\
\end{array}
\end{array}
if a < -6.60000000000000002e-116Initial program 81.5%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-/.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6498.8
Applied egg-rr98.8%
lift--.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-/.f64N/A
*-commutativeN/A
lift-/.f64N/A
div-invN/A
lift-/.f64N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f6494.1
Applied egg-rr94.1%
Taylor expanded in t around inf
lower-/.f64N/A
lower--.f6483.3
Simplified83.3%
if -6.60000000000000002e-116 < a < 6.8000000000000001e-34Initial program 63.4%
Taylor expanded in z 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.3%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f6483.0
Simplified83.0%
if 6.8000000000000001e-34 < a Initial program 73.3%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-/.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6491.6
Applied egg-rr91.6%
Taylor expanded in a around inf
lower-/.f64N/A
lower--.f6478.6
Simplified78.6%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- t x) (/ (- y z) a) x))) (if (<= a -6.5e-70) t_1 (if (<= a 6.8e-34) (fma (- x t) (/ y z) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((t - x), ((y - z) / a), x);
double tmp;
if (a <= -6.5e-70) {
tmp = t_1;
} else if (a <= 6.8e-34) {
tmp = fma((x - t), (y / z), t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(t - x), Float64(Float64(y - z) / a), x) tmp = 0.0 if (a <= -6.5e-70) tmp = t_1; elseif (a <= 6.8e-34) tmp = fma(Float64(x - t), Float64(y / z), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -6.5e-70], t$95$1, If[LessEqual[a, 6.8e-34], N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(t - x, \frac{y - z}{a}, x\right)\\
\mathbf{if}\;a \leq -6.5 \cdot 10^{-70}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 6.8 \cdot 10^{-34}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -6.5000000000000005e-70 or 6.8000000000000001e-34 < a Initial program 77.6%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-/.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6495.4
Applied egg-rr95.4%
Taylor expanded in a around inf
lower-/.f64N/A
lower--.f6478.5
Simplified78.5%
if -6.5000000000000005e-70 < a < 6.8000000000000001e-34Initial program 64.9%
Taylor expanded in z 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
Simplified83.6%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f6482.4
Simplified82.4%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.9e-69) (fma y (/ (- t x) a) x) (if (<= a 3.8e-53) (fma (- x t) (/ y z) t) (fma (- t x) (/ y a) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.9e-69) {
tmp = fma(y, ((t - x) / a), x);
} else if (a <= 3.8e-53) {
tmp = fma((x - t), (y / z), t);
} else {
tmp = fma((t - x), (y / a), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.9e-69) tmp = fma(y, Float64(Float64(t - x) / a), x); elseif (a <= 3.8e-53) tmp = fma(Float64(x - t), Float64(y / z), t); else tmp = fma(Float64(t - x), Float64(y / a), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.9e-69], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 3.8e-53], N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision] + t), $MachinePrecision], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.9 \cdot 10^{-69}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\
\mathbf{elif}\;a \leq 3.8 \cdot 10^{-53}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
\end{array}
\end{array}
if a < -1.8999999999999999e-69Initial program 81.4%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6473.6
Simplified73.6%
if -1.8999999999999999e-69 < a < 3.7999999999999998e-53Initial program 64.8%
Taylor expanded in z 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
Simplified85.6%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f6484.4
Simplified84.4%
if 3.7999999999999998e-53 < a Initial program 72.8%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-/.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6489.7
Applied egg-rr89.7%
Taylor expanded in z around 0
lower-/.f6471.2
Simplified71.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- t) (/ y z) t)))
(if (<= z -1.25e+153)
t_1
(if (<= z 4.7e+116) (fma (- t x) (/ y a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(-t, (y / z), t);
double tmp;
if (z <= -1.25e+153) {
tmp = t_1;
} else if (z <= 4.7e+116) {
tmp = fma((t - x), (y / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(-t), Float64(y / z), t) tmp = 0.0 if (z <= -1.25e+153) tmp = t_1; elseif (z <= 4.7e+116) tmp = fma(Float64(t - x), Float64(y / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-t) * N[(y / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -1.25e+153], t$95$1, If[LessEqual[z, 4.7e+116], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-t, \frac{y}{z}, t\right)\\
\mathbf{if}\;z \leq -1.25 \cdot 10^{+153}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{+116}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.25000000000000005e153 or 4.7000000000000003e116 < z Initial program 32.9%
Taylor expanded in z 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
Simplified86.6%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f6480.5
Simplified80.5%
Taylor expanded in x around 0
mul-1-negN/A
lower-neg.f6465.2
Simplified65.2%
if -1.25000000000000005e153 < z < 4.7000000000000003e116Initial program 85.7%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-/.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6492.5
Applied egg-rr92.5%
Taylor expanded in z around 0
lower-/.f6468.9
Simplified68.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- t) (/ y z) t)))
(if (<= z -1.25e+153)
t_1
(if (<= z 4.7e+116) (fma y (/ (- t x) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(-t, (y / z), t);
double tmp;
if (z <= -1.25e+153) {
tmp = t_1;
} else if (z <= 4.7e+116) {
tmp = fma(y, ((t - x) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(-t), Float64(y / z), t) tmp = 0.0 if (z <= -1.25e+153) tmp = t_1; elseif (z <= 4.7e+116) tmp = fma(y, Float64(Float64(t - x) / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-t) * N[(y / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -1.25e+153], t$95$1, If[LessEqual[z, 4.7e+116], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-t, \frac{y}{z}, t\right)\\
\mathbf{if}\;z \leq -1.25 \cdot 10^{+153}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{+116}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.25000000000000005e153 or 4.7000000000000003e116 < z Initial program 32.9%
Taylor expanded in z 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
Simplified86.6%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f6480.5
Simplified80.5%
Taylor expanded in x around 0
mul-1-negN/A
lower-neg.f6465.2
Simplified65.2%
if -1.25000000000000005e153 < z < 4.7000000000000003e116Initial program 85.7%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6468.3
Simplified68.3%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma y (/ t a) x))) (if (<= a -9.8e-70) t_1 (if (<= a 6.2e-110) (* y (/ (- x t) z)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(y, (t / a), x);
double tmp;
if (a <= -9.8e-70) {
tmp = t_1;
} else if (a <= 6.2e-110) {
tmp = y * ((x - t) / z);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(y, Float64(t / a), x) tmp = 0.0 if (a <= -9.8e-70) tmp = t_1; elseif (a <= 6.2e-110) tmp = Float64(y * Float64(Float64(x - t) / z)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(t / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -9.8e-70], t$95$1, If[LessEqual[a, 6.2e-110], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, \frac{t}{a}, x\right)\\
\mathbf{if}\;a \leq -9.8 \cdot 10^{-70}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 6.2 \cdot 10^{-110}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -9.8000000000000001e-70 or 6.20000000000000014e-110 < a Initial program 76.8%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6469.7
Simplified69.7%
Taylor expanded in t around inf
lower-/.f6458.3
Simplified58.3%
if -9.8000000000000001e-70 < a < 6.20000000000000014e-110Initial program 63.5%
Taylor expanded in z 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
Simplified91.9%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f6491.9
Simplified91.9%
Taylor expanded in y around inf
div-subN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6457.8
Simplified57.8%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma t (/ a z) t))) (if (<= z -1.1e+172) t_1 (if (<= z 9.5e+89) (fma y (/ t a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(t, (a / z), t);
double tmp;
if (z <= -1.1e+172) {
tmp = t_1;
} else if (z <= 9.5e+89) {
tmp = fma(y, (t / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(t, Float64(a / z), t) tmp = 0.0 if (z <= -1.1e+172) tmp = t_1; elseif (z <= 9.5e+89) tmp = fma(y, Float64(t / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(a / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -1.1e+172], t$95$1, If[LessEqual[z, 9.5e+89], N[(y * N[(t / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(t, \frac{a}{z}, t\right)\\
\mathbf{if}\;z \leq -1.1 \cdot 10^{+172}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{+89}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.1000000000000001e172 or 9.5000000000000003e89 < z Initial program 33.5%
Taylor expanded in z 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
Simplified85.0%
Taylor expanded in y around 0
+-commutativeN/A
mul-1-negN/A
associate-/l*N/A
div-subN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
div-subN/A
lower-/.f64N/A
lower--.f64N/A
lower-neg.f6465.2
Simplified65.2%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
associate-*r/N/A
lower-fma.f64N/A
lower-/.f6459.4
Simplified59.4%
if -1.1000000000000001e172 < z < 9.5000000000000003e89Initial program 85.2%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6467.0
Simplified67.0%
Taylor expanded in t around inf
lower-/.f6455.4
Simplified55.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ t (- x x)))) (if (<= z -2e-34) t_1 (if (<= z 1.45e-9) (* t (/ y a)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + (x - x);
double tmp;
if (z <= -2e-34) {
tmp = t_1;
} else if (z <= 1.45e-9) {
tmp = t * (y / 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 = t + (x - x)
if (z <= (-2d-34)) then
tmp = t_1
else if (z <= 1.45d-9) then
tmp = t * (y / 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 = t + (x - x);
double tmp;
if (z <= -2e-34) {
tmp = t_1;
} else if (z <= 1.45e-9) {
tmp = t * (y / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + (x - x) tmp = 0 if z <= -2e-34: tmp = t_1 elif z <= 1.45e-9: tmp = t * (y / a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(x - x)) tmp = 0.0 if (z <= -2e-34) tmp = t_1; elseif (z <= 1.45e-9) tmp = Float64(t * Float64(y / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + (x - x); tmp = 0.0; if (z <= -2e-34) tmp = t_1; elseif (z <= 1.45e-9) tmp = t * (y / a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(x - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2e-34], t$95$1, If[LessEqual[z, 1.45e-9], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \left(x - x\right)\\
\mathbf{if}\;z \leq -2 \cdot 10^{-34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-9}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.99999999999999986e-34 or 1.44999999999999996e-9 < z Initial program 56.3%
Taylor expanded in z around inf
lower--.f6429.3
Simplified29.3%
lift--.f64N/A
+-commutativeN/A
lift--.f64N/A
associate-+l-N/A
lower--.f64N/A
lower--.f6437.5
Applied egg-rr37.5%
if -1.99999999999999986e-34 < z < 1.44999999999999996e-9Initial program 90.0%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6483.4
Simplified83.4%
Taylor expanded in t around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f6432.2
Simplified32.2%
Final simplification34.9%
(FPCore (x y z t a) :precision binary64 (+ t (- x x)))
double code(double x, double y, double z, double t, double a) {
return t + (x - 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 = t + (x - x)
end function
public static double code(double x, double y, double z, double t, double a) {
return t + (x - x);
}
def code(x, y, z, t, a): return t + (x - x)
function code(x, y, z, t, a) return Float64(t + Float64(x - x)) end
function tmp = code(x, y, z, t, a) tmp = t + (x - x); end
code[x_, y_, z_, t_, a_] := N[(t + N[(x - x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
t + \left(x - x\right)
\end{array}
Initial program 72.5%
Taylor expanded in z around inf
lower--.f6416.7
Simplified16.7%
lift--.f64N/A
+-commutativeN/A
lift--.f64N/A
associate-+l-N/A
lower--.f64N/A
lower--.f6421.0
Applied egg-rr21.0%
Final simplification21.0%
(FPCore (x y z t a) :precision binary64 (+ x (- t x)))
double code(double x, double y, double z, double t, double a) {
return x + (t - 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 + (t - x)
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (t - x);
}
def code(x, y, z, t, a): return x + (t - x)
function code(x, y, z, t, a) return Float64(x + Float64(t - x)) end
function tmp = code(x, y, z, t, a) tmp = x + (t - x); end
code[x_, y_, z_, t_, a_] := N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(t - x\right)
\end{array}
Initial program 72.5%
Taylor expanded in z around inf
lower--.f6416.7
Simplified16.7%
(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 72.5%
Taylor expanded in z around inf
lower--.f6416.7
Simplified16.7%
Taylor expanded in t around 0
mul-1-negN/A
lower-neg.f642.6
Simplified2.6%
unsub-negN/A
+-inverses2.6
Applied egg-rr2.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (/ y z) (- t x)))))
(if (< z -1.2536131056095036e+188)
t_1
(if (< z 4.446702369113811e+64)
(+ x (/ (- y z) (/ (- a z) (- t x))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - 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 = t - ((y / z) * (t - x))
if (z < (-1.2536131056095036d+188)) then
tmp = t_1
else if (z < 4.446702369113811d+64) then
tmp = x + ((y - z) / ((a - z) / (t - 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 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - ((y / z) * (t - x)) tmp = 0 if z < -1.2536131056095036e+188: tmp = t_1 elif z < 4.446702369113811e+64: tmp = x + ((y - z) / ((a - z) / (t - x))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x))) tmp = 0.0 if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - ((y / z) * (t - x)); tmp = 0.0; if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = x + ((y - z) / ((a - z) / (t - x))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024207
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (if (< z -125361310560950360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- t (* (/ y z) (- t x))) (if (< z 44467023691138110000000000000000000000000000000000000000000000000) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x))))))
(+ x (/ (* (- y z) (- t x)) (- a z))))