
(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 12 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 (/ (- x y) t) (- z a) y)))
(if (<= t -1.36e+141)
t_1
(if (<= t 9e+107) (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) / t), (z - a), y);
double tmp;
if (t <= -1.36e+141) {
tmp = t_1;
} else if (t <= 9e+107) {
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(Float64(x - y) / t), Float64(z - a), y) tmp = 0.0 if (t <= -1.36e+141) tmp = t_1; elseif (t <= 9e+107) 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[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -1.36e+141], t$95$1, If[LessEqual[t, 9e+107], 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(\frac{x - y}{t}, z - a, y\right)\\
\mathbf{if}\;t \leq -1.36 \cdot 10^{+141}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 9 \cdot 10^{+107}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.36e141 or 9e107 < t Initial program 33.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
accelerator-lowering-fma.f64N/A
Simplified89.3%
if -1.36e141 < t < 9e107Initial program 83.1%
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6492.5%
Applied egg-rr92.5%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.85e+136)
(* y (- 1.0 (/ z t)))
(if (<= t -7.6e+104)
(fma (- t z) (/ x (- a t)) x)
(if (<= t -1.45e-76)
(/ (* y (- z t)) (- a t))
(if (<= t 2.5e-55)
(fma z (/ (- y x) a) x)
(if (<= t 1.8e+118)
(fma (- x y) (+ (/ z t) -1.0) x)
(fma a (/ (- y x) t) y)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.85e+136) {
tmp = y * (1.0 - (z / t));
} else if (t <= -7.6e+104) {
tmp = fma((t - z), (x / (a - t)), x);
} else if (t <= -1.45e-76) {
tmp = (y * (z - t)) / (a - t);
} else if (t <= 2.5e-55) {
tmp = fma(z, ((y - x) / a), x);
} else if (t <= 1.8e+118) {
tmp = fma((x - y), ((z / t) + -1.0), x);
} else {
tmp = fma(a, ((y - x) / t), y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.85e+136) tmp = Float64(y * Float64(1.0 - Float64(z / t))); elseif (t <= -7.6e+104) tmp = fma(Float64(t - z), Float64(x / Float64(a - t)), x); elseif (t <= -1.45e-76) tmp = Float64(Float64(y * Float64(z - t)) / Float64(a - t)); elseif (t <= 2.5e-55) tmp = fma(z, Float64(Float64(y - x) / a), x); elseif (t <= 1.8e+118) tmp = fma(Float64(x - y), Float64(Float64(z / t) + -1.0), x); else tmp = fma(a, Float64(Float64(y - x) / t), y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.85e+136], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -7.6e+104], N[(N[(t - z), $MachinePrecision] * N[(x / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, -1.45e-76], N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.5e-55], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 1.8e+118], N[(N[(x - y), $MachinePrecision] * N[(N[(z / t), $MachinePrecision] + -1.0), $MachinePrecision] + x), $MachinePrecision], N[(a * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.85 \cdot 10^{+136}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{elif}\;t \leq -7.6 \cdot 10^{+104}:\\
\;\;\;\;\mathsf{fma}\left(t - z, \frac{x}{a - t}, x\right)\\
\mathbf{elif}\;t \leq -1.45 \cdot 10^{-76}:\\
\;\;\;\;\frac{y \cdot \left(z - t\right)}{a - t}\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{-55}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{+118}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z}{t} + -1, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{y - x}{t}, y\right)\\
\end{array}
\end{array}
if t < -1.85000000000000005e136Initial program 27.4%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6452.2%
Simplified52.2%
Taylor expanded in x around 0
mul-1-negN/A
distribute-rgt-neg-inN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6476.4%
Simplified76.4%
if -1.85000000000000005e136 < t < -7.59999999999999938e104Initial program 45.1%
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-lft-neg-inN/A
mul-1-negN/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6499.8%
Simplified99.8%
if -7.59999999999999938e104 < t < -1.4500000000000001e-76Initial program 80.0%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6461.7%
Simplified61.7%
if -1.4500000000000001e-76 < t < 2.5000000000000001e-55Initial program 91.5%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6482.7%
Simplified82.7%
if 2.5000000000000001e-55 < t < 1.8e118Initial program 75.2%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6450.8%
Simplified50.8%
if 1.8e118 < t Initial program 35.1%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6444.9%
Simplified44.9%
Taylor expanded in t around -inf
associate-+r+N/A
distribute-lft-out--N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-+l+N/A
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
*-lft-identityN/A
metadata-evalN/A
cancel-sign-sub-invN/A
neg-sub0N/A
mul-1-negN/A
remove-double-negN/A
associate-*r/N/A
Simplified66.9%
Final simplification71.6%
(FPCore (x y z t a)
:precision binary64
(if (<= t -6.5e+134)
(* y (- 1.0 (/ z t)))
(if (<= t -6.8e+104)
(fma (- t z) (/ x (- a t)) x)
(if (<= t -4.2e-77)
(/ (* y (- z t)) (- a t))
(if (<= t 2.8e+88) (fma z (/ (- y x) a) x) (fma a (/ (- y x) t) y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.5e+134) {
tmp = y * (1.0 - (z / t));
} else if (t <= -6.8e+104) {
tmp = fma((t - z), (x / (a - t)), x);
} else if (t <= -4.2e-77) {
tmp = (y * (z - t)) / (a - t);
} else if (t <= 2.8e+88) {
tmp = fma(z, ((y - x) / a), x);
} else {
tmp = fma(a, ((y - x) / t), y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6.5e+134) tmp = Float64(y * Float64(1.0 - Float64(z / t))); elseif (t <= -6.8e+104) tmp = fma(Float64(t - z), Float64(x / Float64(a - t)), x); elseif (t <= -4.2e-77) tmp = Float64(Float64(y * Float64(z - t)) / Float64(a - t)); elseif (t <= 2.8e+88) tmp = fma(z, Float64(Float64(y - x) / a), x); else tmp = fma(a, Float64(Float64(y - x) / t), y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.5e+134], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -6.8e+104], N[(N[(t - z), $MachinePrecision] * N[(x / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, -4.2e-77], N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e+88], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], N[(a * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{+134}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{elif}\;t \leq -6.8 \cdot 10^{+104}:\\
\;\;\;\;\mathsf{fma}\left(t - z, \frac{x}{a - t}, x\right)\\
\mathbf{elif}\;t \leq -4.2 \cdot 10^{-77}:\\
\;\;\;\;\frac{y \cdot \left(z - t\right)}{a - t}\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+88}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{y - x}{t}, y\right)\\
\end{array}
\end{array}
if t < -6.5e134Initial program 27.4%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6452.2%
Simplified52.2%
Taylor expanded in x around 0
mul-1-negN/A
distribute-rgt-neg-inN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6476.4%
Simplified76.4%
if -6.5e134 < t < -6.7999999999999994e104Initial program 45.1%
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-lft-neg-inN/A
mul-1-negN/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6499.8%
Simplified99.8%
if -6.7999999999999994e104 < t < -4.20000000000000031e-77Initial program 80.0%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6461.7%
Simplified61.7%
if -4.20000000000000031e-77 < t < 2.79999999999999989e88Initial program 87.4%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6470.6%
Simplified70.6%
if 2.79999999999999989e88 < t Initial program 42.4%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6446.1%
Simplified46.1%
Taylor expanded in t around -inf
associate-+r+N/A
distribute-lft-out--N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-+l+N/A
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
*-lft-identityN/A
metadata-evalN/A
cancel-sign-sub-invN/A
neg-sub0N/A
mul-1-negN/A
remove-double-negN/A
associate-*r/N/A
Simplified63.4%
(FPCore (x y z t a)
:precision binary64
(if (<= t -6.7e+134)
(* y (- 1.0 (/ z t)))
(if (<= t -8.2e+107)
(+ x (/ (* y z) a))
(if (<= t -7.5e-77)
(/ (* y (- z t)) (- a t))
(if (<= t 3.4e+87) (fma z (/ (- y x) a) x) (fma a (/ (- y x) t) y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.7e+134) {
tmp = y * (1.0 - (z / t));
} else if (t <= -8.2e+107) {
tmp = x + ((y * z) / a);
} else if (t <= -7.5e-77) {
tmp = (y * (z - t)) / (a - t);
} else if (t <= 3.4e+87) {
tmp = fma(z, ((y - x) / a), x);
} else {
tmp = fma(a, ((y - x) / t), y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6.7e+134) tmp = Float64(y * Float64(1.0 - Float64(z / t))); elseif (t <= -8.2e+107) tmp = Float64(x + Float64(Float64(y * z) / a)); elseif (t <= -7.5e-77) tmp = Float64(Float64(y * Float64(z - t)) / Float64(a - t)); elseif (t <= 3.4e+87) tmp = fma(z, Float64(Float64(y - x) / a), x); else tmp = fma(a, Float64(Float64(y - x) / t), y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.7e+134], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -8.2e+107], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -7.5e-77], N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.4e+87], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], N[(a * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.7 \cdot 10^{+134}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{elif}\;t \leq -8.2 \cdot 10^{+107}:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\
\mathbf{elif}\;t \leq -7.5 \cdot 10^{-77}:\\
\;\;\;\;\frac{y \cdot \left(z - t\right)}{a - t}\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{+87}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{y - x}{t}, y\right)\\
\end{array}
\end{array}
if t < -6.6999999999999997e134Initial program 27.4%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6452.2%
Simplified52.2%
Taylor expanded in x around 0
mul-1-negN/A
distribute-rgt-neg-inN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6476.4%
Simplified76.4%
if -6.6999999999999997e134 < t < -8.1999999999999998e107Initial program 36.0%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6435.0%
Simplified35.0%
Taylor expanded in y around inf
Simplified84.4%
if -8.1999999999999998e107 < t < -7.5000000000000006e-77Initial program 80.6%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6460.1%
Simplified60.1%
if -7.5000000000000006e-77 < t < 3.4000000000000002e87Initial program 87.4%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6470.6%
Simplified70.6%
if 3.4000000000000002e87 < t Initial program 42.4%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6446.1%
Simplified46.1%
Taylor expanded in t around -inf
associate-+r+N/A
distribute-lft-out--N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-+l+N/A
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
*-lft-identityN/A
metadata-evalN/A
cancel-sign-sub-invN/A
neg-sub0N/A
mul-1-negN/A
remove-double-negN/A
associate-*r/N/A
Simplified63.4%
Final simplification69.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- x y) t) (- z a) y)))
(if (<= t -1.4e+133)
t_1
(if (<= t -5.6e-208)
(fma (/ (- z t) (- a t)) y x)
(if (<= t 1.6e-67) (fma z (/ (- y x) a) x) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((x - y) / t), (z - a), y);
double tmp;
if (t <= -1.4e+133) {
tmp = t_1;
} else if (t <= -5.6e-208) {
tmp = fma(((z - t) / (a - t)), y, x);
} else if (t <= 1.6e-67) {
tmp = fma(z, ((y - x) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(x - y) / t), Float64(z - a), y) tmp = 0.0 if (t <= -1.4e+133) tmp = t_1; elseif (t <= -5.6e-208) tmp = fma(Float64(Float64(z - t) / Float64(a - t)), y, x); elseif (t <= 1.6e-67) tmp = fma(z, 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[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -1.4e+133], t$95$1, If[LessEqual[t, -5.6e-208], N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * y + x), $MachinePrecision], If[LessEqual[t, 1.6e-67], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x - y}{t}, z - a, y\right)\\
\mathbf{if}\;t \leq -1.4 \cdot 10^{+133}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -5.6 \cdot 10^{-208}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y, x\right)\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-67}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.40000000000000008e133 or 1.60000000000000011e-67 < t Initial program 46.0%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
accelerator-lowering-fma.f64N/A
Simplified80.9%
if -1.40000000000000008e133 < t < -5.60000000000000003e-208Initial program 80.9%
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6490.5%
Applied egg-rr90.5%
Taylor expanded in y around inf
Simplified75.8%
if -5.60000000000000003e-208 < t < 1.60000000000000011e-67Initial program 92.9%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6489.5%
Simplified89.5%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ (- x y) t) (- z a) y))) (if (<= t -3e+54) t_1 (if (<= t 5e-66) (fma z (/ (- y x) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((x - y) / t), (z - a), y);
double tmp;
if (t <= -3e+54) {
tmp = t_1;
} else if (t <= 5e-66) {
tmp = fma(z, ((y - x) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(x - y) / t), Float64(z - a), y) tmp = 0.0 if (t <= -3e+54) tmp = t_1; elseif (t <= 5e-66) tmp = fma(z, 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[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -3e+54], t$95$1, If[LessEqual[t, 5e-66], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x - y}{t}, z - a, y\right)\\
\mathbf{if}\;t \leq -3 \cdot 10^{+54}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-66}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.9999999999999999e54 or 4.99999999999999962e-66 < t Initial program 47.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
accelerator-lowering-fma.f64N/A
Simplified78.6%
if -2.9999999999999999e54 < t < 4.99999999999999962e-66Initial program 90.7%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6475.5%
Simplified75.5%
(FPCore (x y z t a) :precision binary64 (if (<= t -6.5e+134) (* y (- 1.0 (/ z t))) (if (<= t 6.5e+87) (fma z (/ (- y x) a) x) (fma a (/ (- y x) t) y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.5e+134) {
tmp = y * (1.0 - (z / t));
} else if (t <= 6.5e+87) {
tmp = fma(z, ((y - x) / a), x);
} else {
tmp = fma(a, ((y - x) / t), y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6.5e+134) tmp = Float64(y * Float64(1.0 - Float64(z / t))); elseif (t <= 6.5e+87) tmp = fma(z, Float64(Float64(y - x) / a), x); else tmp = fma(a, Float64(Float64(y - x) / t), y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.5e+134], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.5e+87], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], N[(a * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{+134}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{+87}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{y - x}{t}, y\right)\\
\end{array}
\end{array}
if t < -6.5e134Initial program 27.4%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6452.2%
Simplified52.2%
Taylor expanded in x around 0
mul-1-negN/A
distribute-rgt-neg-inN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6476.4%
Simplified76.4%
if -6.5e134 < t < 6.5000000000000002e87Initial program 84.1%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6463.8%
Simplified63.8%
if 6.5000000000000002e87 < t Initial program 42.4%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6446.1%
Simplified46.1%
Taylor expanded in t around -inf
associate-+r+N/A
distribute-lft-out--N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-+l+N/A
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
*-lft-identityN/A
metadata-evalN/A
cancel-sign-sub-invN/A
neg-sub0N/A
mul-1-negN/A
remove-double-negN/A
associate-*r/N/A
Simplified63.4%
(FPCore (x y z t a) :precision binary64 (if (<= t -8e+134) (* y (- 1.0 (/ z t))) (if (<= t 1.2e+53) (fma y (/ z a) x) (fma a (/ (- y x) t) y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -8e+134) {
tmp = y * (1.0 - (z / t));
} else if (t <= 1.2e+53) {
tmp = fma(y, (z / a), x);
} else {
tmp = fma(a, ((y - x) / t), y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -8e+134) tmp = Float64(y * Float64(1.0 - Float64(z / t))); elseif (t <= 1.2e+53) tmp = fma(y, Float64(z / a), x); else tmp = fma(a, Float64(Float64(y - x) / t), y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -8e+134], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.2e+53], N[(y * N[(z / a), $MachinePrecision] + x), $MachinePrecision], N[(a * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8 \cdot 10^{+134}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{+53}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{y - x}{t}, y\right)\\
\end{array}
\end{array}
if t < -7.99999999999999937e134Initial program 27.4%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6452.2%
Simplified52.2%
Taylor expanded in x around 0
mul-1-negN/A
distribute-rgt-neg-inN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6476.4%
Simplified76.4%
if -7.99999999999999937e134 < t < 1.2e53Initial program 86.0%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6462.9%
Simplified62.9%
Taylor expanded in y around inf
Simplified58.8%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6461.1%
Applied egg-rr61.1%
if 1.2e53 < t Initial program 45.9%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6444.8%
Simplified44.8%
Taylor expanded in t around -inf
associate-+r+N/A
distribute-lft-out--N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-+l+N/A
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lftN/A
*-lft-identityN/A
metadata-evalN/A
cancel-sign-sub-invN/A
neg-sub0N/A
mul-1-negN/A
remove-double-negN/A
associate-*r/N/A
Simplified57.3%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* y (- 1.0 (/ z t))))) (if (<= t -6.5e+134) t_1 (if (<= t 2.1e+52) (fma y (/ 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 (t <= -6.5e+134) {
tmp = t_1;
} else if (t <= 2.1e+52) {
tmp = fma(y, (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 (t <= -6.5e+134) tmp = t_1; elseif (t <= 2.1e+52) tmp = fma(y, 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[t, -6.5e+134], t$95$1, If[LessEqual[t, 2.1e+52], N[(y * 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}\;t \leq -6.5 \cdot 10^{+134}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{+52}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.5e134 or 2.1e52 < t Initial program 38.4%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f6449.8%
Simplified49.8%
Taylor expanded in x around 0
mul-1-negN/A
distribute-rgt-neg-inN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6463.1%
Simplified63.1%
if -6.5e134 < t < 2.1e52Initial program 86.0%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6462.9%
Simplified62.9%
Taylor expanded in y around inf
Simplified58.8%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6461.1%
Applied egg-rr61.1%
(FPCore (x y z t a) :precision binary64 (if (<= t -8.5e+134) y (if (<= t 4.7e+54) (fma y (/ z a) x) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -8.5e+134) {
tmp = y;
} else if (t <= 4.7e+54) {
tmp = fma(y, (z / a), x);
} else {
tmp = y;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -8.5e+134) tmp = y; elseif (t <= 4.7e+54) tmp = fma(y, Float64(z / a), x); else tmp = y; end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -8.5e+134], y, If[LessEqual[t, 4.7e+54], N[(y * N[(z / a), $MachinePrecision] + x), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.5 \cdot 10^{+134}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 4.7 \cdot 10^{+54}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -8.50000000000000024e134 or 4.69999999999999993e54 < t Initial program 38.4%
Taylor expanded in t around inf
Simplified58.8%
if -8.50000000000000024e134 < t < 4.69999999999999993e54Initial program 86.0%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6462.9%
Simplified62.9%
Taylor expanded in y around inf
Simplified58.8%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6461.1%
Applied egg-rr61.1%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.3e+129) y (if (<= t 1.15e+54) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.3e+129) {
tmp = y;
} else if (t <= 1.15e+54) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-1.3d+129)) then
tmp = y
else if (t <= 1.15d+54) then
tmp = x
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.3e+129) {
tmp = y;
} else if (t <= 1.15e+54) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.3e+129: tmp = y elif t <= 1.15e+54: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.3e+129) tmp = y; elseif (t <= 1.15e+54) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.3e+129) tmp = y; elseif (t <= 1.15e+54) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.3e+129], y, If[LessEqual[t, 1.15e+54], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.3 \cdot 10^{+129}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+54}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -1.30000000000000006e129 or 1.14999999999999997e54 < t Initial program 38.1%
Taylor expanded in t around inf
Simplified58.3%
if -1.30000000000000006e129 < t < 1.14999999999999997e54Initial program 86.5%
Taylor expanded in a around inf
Simplified33.6%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 66.7%
Taylor expanded in a around inf
Simplified23.4%
(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 2024193
(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))))