
(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 18 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 (- x (/ (* (- t z) (- x y)) (- t a)))))
(if (<= t_1 (- INFINITY))
(fma (/ (- x y) t) (- z a) y)
(if (<= t_1 -5e-284)
t_1
(if (<= t_1 0.0)
(- y (/ (* (- a z) (- x y)) t))
(- x (/ (- x y) (/ (- t a) (- t z)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (((t - z) * (x - y)) / (t - a));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = fma(((x - y) / t), (z - a), y);
} else if (t_1 <= -5e-284) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = y - (((a - z) * (x - y)) / t);
} else {
tmp = x - ((x - y) / ((t - a) / (t - z)));
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(Float64(t - z) * Float64(x - y)) / Float64(t - a))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = fma(Float64(Float64(x - y) / t), Float64(z - a), y); elseif (t_1 <= -5e-284) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(y - Float64(Float64(Float64(a - z) * Float64(x - y)) / t)); else tmp = Float64(x - Float64(Float64(x - y) / Float64(Float64(t - a) / Float64(t - z)))); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(N[(t - z), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[t$95$1, -5e-284], t$95$1, If[LessEqual[t$95$1, 0.0], N[(y - N[(N[(N[(a - z), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(x - y), $MachinePrecision] / N[(N[(t - a), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{\left(t - z\right) \cdot \left(x - y\right)}{t - a}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{t}, z - a, y\right)\\
\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-284}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;y - \frac{\left(a - z\right) \cdot \left(x - y\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{x - y}{\frac{t - a}{t - z}}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -inf.0Initial program 32.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites88.4%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -4.99999999999999973e-284Initial program 97.2%
if -4.99999999999999973e-284 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.4%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift--.f64N/A
flip--N/A
associate-/r/N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
difference-of-squaresN/A
lift--.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-+.f644.6
Applied rewrites4.6%
Taylor expanded in t around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
distribute-lft-out--N/A
associate-*r/N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites99.8%
if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 66.3%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6489.1
Applied rewrites89.1%
Final simplification92.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ (* (- t z) (- x y)) (- t a)))))
(if (<= t_1 (- INFINITY))
(fma (/ (- x y) t) (- z a) y)
(if (<= t_1 -5e-284)
t_1
(if (<= t_1 0.0)
(- y (/ (* (- a z) (- x y)) t))
(fma (- z t) (/ (- x y) (- t a)) x))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (((t - z) * (x - y)) / (t - a));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = fma(((x - y) / t), (z - a), y);
} else if (t_1 <= -5e-284) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = y - (((a - z) * (x - y)) / t);
} else {
tmp = fma((z - t), ((x - y) / (t - a)), x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(Float64(t - z) * Float64(x - y)) / Float64(t - a))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = fma(Float64(Float64(x - y) / t), Float64(z - a), y); elseif (t_1 <= -5e-284) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(y - Float64(Float64(Float64(a - z) * Float64(x - y)) / t)); else tmp = fma(Float64(z - t), Float64(Float64(x - y) / Float64(t - a)), x); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(N[(t - z), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[t$95$1, -5e-284], t$95$1, If[LessEqual[t$95$1, 0.0], N[(y - N[(N[(N[(a - z), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(z - t), $MachinePrecision] * N[(N[(x - y), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{\left(t - z\right) \cdot \left(x - y\right)}{t - a}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{t}, z - a, y\right)\\
\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-284}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;y - \frac{\left(a - z\right) \cdot \left(x - y\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{x - y}{t - a}, x\right)\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -inf.0Initial program 32.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites88.4%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -4.99999999999999973e-284Initial program 97.2%
if -4.99999999999999973e-284 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.4%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift--.f64N/A
flip--N/A
associate-/r/N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
difference-of-squaresN/A
lift--.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-+.f644.6
Applied rewrites4.6%
Taylor expanded in t around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
distribute-lft-out--N/A
associate-*r/N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites99.8%
if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 66.3%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6488.1
Applied rewrites88.1%
Final simplification92.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- y (/ (* a x) t))))
(if (<= a -7e+54)
(fma (- y) (/ t a) x)
(if (<= a -3e-196)
t_1
(if (<= a 1.2e-287)
(* (/ (- x y) t) z)
(if (<= a 2e-124)
t_1
(if (<= a 1.16e+26)
(/ (* z (- y x)) a)
(fma (/ (- x y) a) t x))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y - ((a * x) / t);
double tmp;
if (a <= -7e+54) {
tmp = fma(-y, (t / a), x);
} else if (a <= -3e-196) {
tmp = t_1;
} else if (a <= 1.2e-287) {
tmp = ((x - y) / t) * z;
} else if (a <= 2e-124) {
tmp = t_1;
} else if (a <= 1.16e+26) {
tmp = (z * (y - x)) / a;
} else {
tmp = fma(((x - y) / a), t, x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(y - Float64(Float64(a * x) / t)) tmp = 0.0 if (a <= -7e+54) tmp = fma(Float64(-y), Float64(t / a), x); elseif (a <= -3e-196) tmp = t_1; elseif (a <= 1.2e-287) tmp = Float64(Float64(Float64(x - y) / t) * z); elseif (a <= 2e-124) tmp = t_1; elseif (a <= 1.16e+26) tmp = Float64(Float64(z * Float64(y - x)) / a); else tmp = fma(Float64(Float64(x - y) / a), t, x); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y - N[(N[(a * x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -7e+54], N[((-y) * N[(t / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, -3e-196], t$95$1, If[LessEqual[a, 1.2e-287], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[a, 2e-124], t$95$1, If[LessEqual[a, 1.16e+26], N[(N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(N[(N[(x - y), $MachinePrecision] / a), $MachinePrecision] * t + x), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - \frac{a \cdot x}{t}\\
\mathbf{if}\;a \leq -7 \cdot 10^{+54}:\\
\;\;\;\;\mathsf{fma}\left(-y, \frac{t}{a}, x\right)\\
\mathbf{elif}\;a \leq -3 \cdot 10^{-196}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.2 \cdot 10^{-287}:\\
\;\;\;\;\frac{x - y}{t} \cdot z\\
\mathbf{elif}\;a \leq 2 \cdot 10^{-124}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.16 \cdot 10^{+26}:\\
\;\;\;\;\frac{z \cdot \left(y - x\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{a}, t, x\right)\\
\end{array}
\end{array}
if a < -7.0000000000000002e54Initial program 83.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
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6471.1
Applied rewrites71.1%
Taylor expanded in a around inf
Applied rewrites62.4%
Taylor expanded in y around inf
Applied rewrites62.6%
if -7.0000000000000002e54 < a < -3e-196 or 1.2e-287 < a < 1.99999999999999987e-124Initial program 52.5%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift--.f64N/A
flip--N/A
associate-/r/N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
difference-of-squaresN/A
lift--.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-+.f6457.7
Applied rewrites57.7%
Taylor expanded in t around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
distribute-lft-out--N/A
associate-*r/N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites75.0%
Taylor expanded in y around 0
Applied rewrites74.7%
Taylor expanded in a around inf
Applied rewrites56.4%
if -3e-196 < a < 1.2e-287Initial program 75.0%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift--.f64N/A
flip--N/A
associate-/r/N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
difference-of-squaresN/A
lift--.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-+.f6474.0
Applied rewrites74.0%
Taylor expanded in t around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
distribute-lft-out--N/A
associate-*r/N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites91.4%
Taylor expanded in z around inf
Applied rewrites73.8%
if 1.99999999999999987e-124 < a < 1.15999999999999996e26Initial program 85.1%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift--.f64N/A
flip--N/A
associate-/r/N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
difference-of-squaresN/A
lift--.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-+.f6487.8
Applied rewrites87.8%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6467.1
Applied rewrites67.1%
Taylor expanded in a around inf
Applied rewrites55.2%
if 1.15999999999999996e26 < a Initial program 63.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
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6464.8
Applied rewrites64.8%
Taylor expanded in a around inf
Applied rewrites48.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- y (/ (* a x) t))) (t_2 (fma (- y) (/ t a) x)))
(if (<= a -7e+54)
t_2
(if (<= a -3e-196)
t_1
(if (<= a 1.2e-287)
(* (/ (- x y) t) z)
(if (<= a 2e-124)
t_1
(if (<= a 1.16e+26) (/ (* z (- y x)) a) t_2)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y - ((a * x) / t);
double t_2 = fma(-y, (t / a), x);
double tmp;
if (a <= -7e+54) {
tmp = t_2;
} else if (a <= -3e-196) {
tmp = t_1;
} else if (a <= 1.2e-287) {
tmp = ((x - y) / t) * z;
} else if (a <= 2e-124) {
tmp = t_1;
} else if (a <= 1.16e+26) {
tmp = (z * (y - x)) / a;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(y - Float64(Float64(a * x) / t)) t_2 = fma(Float64(-y), Float64(t / a), x) tmp = 0.0 if (a <= -7e+54) tmp = t_2; elseif (a <= -3e-196) tmp = t_1; elseif (a <= 1.2e-287) tmp = Float64(Float64(Float64(x - y) / t) * z); elseif (a <= 2e-124) tmp = t_1; elseif (a <= 1.16e+26) tmp = Float64(Float64(z * Float64(y - x)) / a); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y - N[(N[(a * x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[((-y) * N[(t / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -7e+54], t$95$2, If[LessEqual[a, -3e-196], t$95$1, If[LessEqual[a, 1.2e-287], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[a, 2e-124], t$95$1, If[LessEqual[a, 1.16e+26], N[(N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - \frac{a \cdot x}{t}\\
t_2 := \mathsf{fma}\left(-y, \frac{t}{a}, x\right)\\
\mathbf{if}\;a \leq -7 \cdot 10^{+54}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -3 \cdot 10^{-196}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.2 \cdot 10^{-287}:\\
\;\;\;\;\frac{x - y}{t} \cdot z\\
\mathbf{elif}\;a \leq 2 \cdot 10^{-124}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.16 \cdot 10^{+26}:\\
\;\;\;\;\frac{z \cdot \left(y - x\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -7.0000000000000002e54 or 1.15999999999999996e26 < a Initial program 72.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
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6467.8
Applied rewrites67.8%
Taylor expanded in a around inf
Applied rewrites55.0%
Taylor expanded in y around inf
Applied rewrites54.9%
if -7.0000000000000002e54 < a < -3e-196 or 1.2e-287 < a < 1.99999999999999987e-124Initial program 52.5%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift--.f64N/A
flip--N/A
associate-/r/N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
difference-of-squaresN/A
lift--.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-+.f6457.7
Applied rewrites57.7%
Taylor expanded in t around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
distribute-lft-out--N/A
associate-*r/N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites75.0%
Taylor expanded in y around 0
Applied rewrites74.7%
Taylor expanded in a around inf
Applied rewrites56.4%
if -3e-196 < a < 1.2e-287Initial program 75.0%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift--.f64N/A
flip--N/A
associate-/r/N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
difference-of-squaresN/A
lift--.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-+.f6474.0
Applied rewrites74.0%
Taylor expanded in t around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
distribute-lft-out--N/A
associate-*r/N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites91.4%
Taylor expanded in z around inf
Applied rewrites73.8%
if 1.99999999999999987e-124 < a < 1.15999999999999996e26Initial program 85.1%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift--.f64N/A
flip--N/A
associate-/r/N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
difference-of-squaresN/A
lift--.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-+.f6487.8
Applied rewrites87.8%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6467.1
Applied rewrites67.1%
Taylor expanded in a around inf
Applied rewrites55.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- y) (/ t a) x)))
(if (<= a -2.5e+50)
t_1
(if (<= a -1.8e-149)
y
(if (<= a 1.2e-287)
(* (/ (- x y) t) z)
(if (<= a 2e-124) y (if (<= a 1.16e+26) (/ (* z (- y x)) 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 <= -2.5e+50) {
tmp = t_1;
} else if (a <= -1.8e-149) {
tmp = y;
} else if (a <= 1.2e-287) {
tmp = ((x - y) / t) * z;
} else if (a <= 2e-124) {
tmp = y;
} else if (a <= 1.16e+26) {
tmp = (z * (y - x)) / a;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(-y), Float64(t / a), x) tmp = 0.0 if (a <= -2.5e+50) tmp = t_1; elseif (a <= -1.8e-149) tmp = y; elseif (a <= 1.2e-287) tmp = Float64(Float64(Float64(x - y) / t) * z); elseif (a <= 2e-124) tmp = y; elseif (a <= 1.16e+26) tmp = Float64(Float64(z * Float64(y - x)) / 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, -2.5e+50], t$95$1, If[LessEqual[a, -1.8e-149], y, If[LessEqual[a, 1.2e-287], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[a, 2e-124], y, If[LessEqual[a, 1.16e+26], N[(N[(z * N[(y - x), $MachinePrecision]), $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 -2.5 \cdot 10^{+50}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.8 \cdot 10^{-149}:\\
\;\;\;\;y\\
\mathbf{elif}\;a \leq 1.2 \cdot 10^{-287}:\\
\;\;\;\;\frac{x - y}{t} \cdot z\\
\mathbf{elif}\;a \leq 2 \cdot 10^{-124}:\\
\;\;\;\;y\\
\mathbf{elif}\;a \leq 1.16 \cdot 10^{+26}:\\
\;\;\;\;\frac{z \cdot \left(y - x\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.5e50 or 1.15999999999999996e26 < a Initial program 72.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
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6467.8
Applied rewrites67.8%
Taylor expanded in a around inf
Applied rewrites55.0%
Taylor expanded in y around inf
Applied rewrites54.9%
if -2.5e50 < a < -1.8000000000000001e-149 or 1.2e-287 < a < 1.99999999999999987e-124Initial program 52.6%
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
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6448.1
Applied rewrites48.1%
Taylor expanded in a around 0
Applied rewrites52.7%
if -1.8000000000000001e-149 < a < 1.2e-287Initial program 68.0%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift--.f64N/A
flip--N/A
associate-/r/N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
difference-of-squaresN/A
lift--.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-+.f6462.0
Applied rewrites62.0%
Taylor expanded in t around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
distribute-lft-out--N/A
associate-*r/N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites82.3%
Taylor expanded in z around inf
Applied rewrites61.4%
if 1.99999999999999987e-124 < a < 1.15999999999999996e26Initial program 85.1%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift--.f64N/A
flip--N/A
associate-/r/N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
difference-of-squaresN/A
lift--.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-+.f6487.8
Applied rewrites87.8%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6467.1
Applied rewrites67.1%
Taylor expanded in a around inf
Applied rewrites55.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ (- x y) t) z)) (t_2 (fma (- y) (/ t a) x)))
(if (<= a -2.5e+50)
t_2
(if (<= a -1.8e-149)
y
(if (<= a 1.2e-287)
t_1
(if (<= a 2.25e-133) y (if (<= a 3.2e+111) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((x - y) / t) * z;
double t_2 = fma(-y, (t / a), x);
double tmp;
if (a <= -2.5e+50) {
tmp = t_2;
} else if (a <= -1.8e-149) {
tmp = y;
} else if (a <= 1.2e-287) {
tmp = t_1;
} else if (a <= 2.25e-133) {
tmp = y;
} else if (a <= 3.2e+111) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(x - y) / t) * z) t_2 = fma(Float64(-y), Float64(t / a), x) tmp = 0.0 if (a <= -2.5e+50) tmp = t_2; elseif (a <= -1.8e-149) tmp = y; elseif (a <= 1.2e-287) tmp = t_1; elseif (a <= 2.25e-133) tmp = y; elseif (a <= 3.2e+111) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * z), $MachinePrecision]}, Block[{t$95$2 = N[((-y) * N[(t / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -2.5e+50], t$95$2, If[LessEqual[a, -1.8e-149], y, If[LessEqual[a, 1.2e-287], t$95$1, If[LessEqual[a, 2.25e-133], y, If[LessEqual[a, 3.2e+111], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x - y}{t} \cdot z\\
t_2 := \mathsf{fma}\left(-y, \frac{t}{a}, x\right)\\
\mathbf{if}\;a \leq -2.5 \cdot 10^{+50}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -1.8 \cdot 10^{-149}:\\
\;\;\;\;y\\
\mathbf{elif}\;a \leq 1.2 \cdot 10^{-287}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.25 \cdot 10^{-133}:\\
\;\;\;\;y\\
\mathbf{elif}\;a \leq 3.2 \cdot 10^{+111}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -2.5e50 or 3.2000000000000001e111 < a Initial program 74.2%
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
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6469.9
Applied rewrites69.9%
Taylor expanded in a around inf
Applied rewrites59.0%
Taylor expanded in y around inf
Applied rewrites58.9%
if -2.5e50 < a < -1.8000000000000001e-149 or 1.2e-287 < a < 2.25000000000000005e-133Initial program 52.6%
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
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6449.5
Applied rewrites49.5%
Taylor expanded in a around 0
Applied rewrites54.2%
if -1.8000000000000001e-149 < a < 1.2e-287 or 2.25000000000000005e-133 < a < 3.2000000000000001e111Initial program 73.3%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift--.f64N/A
flip--N/A
associate-/r/N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
difference-of-squaresN/A
lift--.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-+.f6476.4
Applied rewrites76.4%
Taylor expanded in t around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
distribute-lft-out--N/A
associate-*r/N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites59.2%
Taylor expanded in z around inf
Applied rewrites46.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- x y) t) (- z a) y)))
(if (<= t -1.95e+63)
t_1
(if (<= t 2.5e+109) (fma (- z t) (/ (- x y) (- t 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.95e+63) {
tmp = t_1;
} else if (t <= 2.5e+109) {
tmp = fma((z - t), ((x - y) / (t - 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.95e+63) tmp = t_1; elseif (t <= 2.5e+109) tmp = fma(Float64(z - t), Float64(Float64(x - y) / Float64(t - 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.95e+63], t$95$1, If[LessEqual[t, 2.5e+109], N[(N[(z - t), $MachinePrecision] * N[(N[(x - y), $MachinePrecision] / N[(t - a), $MachinePrecision]), $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.95 \cdot 10^{+63}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{+109}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{x - y}{t - a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.95e63 or 2.5000000000000001e109 < t Initial program 38.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
lower-fma.f64N/A
Applied rewrites85.6%
if -1.95e63 < t < 2.5000000000000001e109Initial program 88.5%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6493.1
Applied rewrites93.1%
Final simplification90.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- x y) t) (- z a) y)))
(if (<= t -1650.0)
t_1
(if (<= t 1.82e+109) (- x (/ (* z (- y x)) (- t a))) 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 <= -1650.0) {
tmp = t_1;
} else if (t <= 1.82e+109) {
tmp = x - ((z * (y - x)) / (t - a));
} 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 <= -1650.0) tmp = t_1; elseif (t <= 1.82e+109) tmp = Float64(x - Float64(Float64(z * Float64(y - x)) / Float64(t - a))); 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, -1650.0], t$95$1, If[LessEqual[t, 1.82e+109], N[(x - N[(N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $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 -1650:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.82 \cdot 10^{+109}:\\
\;\;\;\;x - \frac{z \cdot \left(y - x\right)}{t - a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1650 or 1.82e109 < t Initial program 42.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
lower-fma.f64N/A
Applied rewrites82.8%
if -1650 < t < 1.82e109Initial program 89.6%
Taylor expanded in t around 0
lower-*.f64N/A
lower--.f6482.9
Applied rewrites82.9%
Final simplification82.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- x y) t) (- z a) y)))
(if (<= t -1700.0)
t_1
(if (<= t 1.82e+109) (fma (/ (- z t) a) (- 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 <= -1700.0) {
tmp = t_1;
} else if (t <= 1.82e+109) {
tmp = fma(((z - t) / a), (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 <= -1700.0) tmp = t_1; elseif (t <= 1.82e+109) tmp = fma(Float64(Float64(z - t) / 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[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -1700.0], t$95$1, If[LessEqual[t, 1.82e+109], N[(N[(N[(z - t), $MachinePrecision] / a), $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 -1700:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.82 \cdot 10^{+109}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z - t}{a}, y - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1700 or 1.82e109 < t Initial program 42.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
lower-fma.f64N/A
Applied rewrites82.8%
if -1700 < t < 1.82e109Initial program 89.6%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6480.3
Applied rewrites80.3%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ (- x y) t) (- z a) y))) (if (<= t -380.0) t_1 (if (<= t 3.45e-56) (fma (- y x) (/ z 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 <= -380.0) {
tmp = t_1;
} else if (t <= 3.45e-56) {
tmp = fma((y - x), (z / 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 <= -380.0) tmp = t_1; elseif (t <= 3.45e-56) tmp = fma(Float64(y - x), Float64(z / 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, -380.0], t$95$1, If[LessEqual[t, 3.45e-56], N[(N[(y - x), $MachinePrecision] * N[(z / 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 -380:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.45 \cdot 10^{-56}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -380 or 3.4499999999999998e-56 < t Initial program 47.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites77.3%
if -380 < t < 3.4499999999999998e-56Initial program 92.3%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift--.f64N/A
flip--N/A
associate-/r/N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
difference-of-squaresN/A
lift--.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-+.f6488.8
Applied rewrites88.8%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6485.3
Applied rewrites85.3%
Taylor expanded in t around 0
Applied rewrites83.7%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- z) (/ (- y x) t) y))) (if (<= t -380.0) t_1 (if (<= t 2.65e-48) (fma (- y x) (/ z a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(-z, ((y - x) / t), y);
double tmp;
if (t <= -380.0) {
tmp = t_1;
} else if (t <= 2.65e-48) {
tmp = fma((y - x), (z / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(-z), Float64(Float64(y - x) / t), y) tmp = 0.0 if (t <= -380.0) tmp = t_1; elseif (t <= 2.65e-48) tmp = fma(Float64(y - x), Float64(z / a), x); 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] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -380.0], t$95$1, If[LessEqual[t, 2.65e-48], N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-z, \frac{y - x}{t}, y\right)\\
\mathbf{if}\;t \leq -380:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.65 \cdot 10^{-48}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -380 or 2.65e-48 < t Initial program 47.2%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift--.f64N/A
flip--N/A
associate-/r/N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
difference-of-squaresN/A
lift--.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-+.f6465.0
Applied rewrites65.0%
Taylor expanded in t around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
distribute-lft-out--N/A
associate-*r/N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites63.8%
Taylor expanded in y around 0
Applied rewrites68.5%
Taylor expanded in a around 0
Applied rewrites70.7%
if -380 < t < 2.65e-48Initial program 92.4%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift--.f64N/A
flip--N/A
associate-/r/N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
difference-of-squaresN/A
lift--.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-+.f6489.0
Applied rewrites89.0%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6484.8
Applied rewrites84.8%
Taylor expanded in t around 0
Applied rewrites83.1%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (- y (* (/ z t) (- x))))) (if (<= t -1700.0) t_1 (if (<= t 1.85e+109) (fma (- y x) (/ z a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y - ((z / t) * -x);
double tmp;
if (t <= -1700.0) {
tmp = t_1;
} else if (t <= 1.85e+109) {
tmp = fma((y - x), (z / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(y - Float64(Float64(z / t) * Float64(-x))) tmp = 0.0 if (t <= -1700.0) tmp = t_1; elseif (t <= 1.85e+109) tmp = fma(Float64(y - 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[(N[(z / t), $MachinePrecision] * (-x)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1700.0], t$95$1, If[LessEqual[t, 1.85e+109], N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - \frac{z}{t} \cdot \left(-x\right)\\
\mathbf{if}\;t \leq -1700:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{+109}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1700 or 1.8500000000000001e109 < t Initial program 42.0%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift--.f64N/A
flip--N/A
associate-/r/N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
difference-of-squaresN/A
lift--.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-+.f6459.9
Applied rewrites59.9%
Taylor expanded in t around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
distribute-lft-out--N/A
associate-*r/N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites67.1%
Taylor expanded in y around 0
Applied rewrites77.6%
Taylor expanded in a around 0
Applied rewrites69.1%
if -1700 < t < 1.8500000000000001e109Initial program 89.6%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift--.f64N/A
flip--N/A
associate-/r/N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
difference-of-squaresN/A
lift--.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-+.f6489.3
Applied rewrites89.3%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6480.3
Applied rewrites80.3%
Taylor expanded in t around 0
Applied rewrites77.6%
Final simplification73.8%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ (- y x) t) a y))) (if (<= t -2400.0) t_1 (if (<= t 2.3e+150) (fma (- y x) (/ z a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((y - x) / t), a, y);
double tmp;
if (t <= -2400.0) {
tmp = t_1;
} else if (t <= 2.3e+150) {
tmp = fma((y - x), (z / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(y - x) / t), a, y) tmp = 0.0 if (t <= -2400.0) tmp = t_1; elseif (t <= 2.3e+150) tmp = fma(Float64(y - x), Float64(z / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * a + y), $MachinePrecision]}, If[LessEqual[t, -2400.0], t$95$1, If[LessEqual[t, 2.3e+150], N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y - x}{t}, a, y\right)\\
\mathbf{if}\;t \leq -2400:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{+150}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2400 or 2.30000000000000001e150 < t Initial program 40.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
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6453.0
Applied rewrites53.0%
Taylor expanded in a around 0
Applied rewrites61.9%
if -2400 < t < 2.30000000000000001e150Initial program 88.1%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift--.f64N/A
flip--N/A
associate-/r/N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
difference-of-squaresN/A
lift--.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-+.f6488.5
Applied rewrites88.5%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6477.5
Applied rewrites77.5%
Taylor expanded in t around 0
Applied rewrites74.5%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ (- y x) t) a y))) (if (<= t -2400.0) t_1 (if (<= t 2.3e+150) (fma (/ (- y x) a) z x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((y - x) / t), a, y);
double tmp;
if (t <= -2400.0) {
tmp = t_1;
} else if (t <= 2.3e+150) {
tmp = fma(((y - x) / a), z, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(y - x) / t), a, y) tmp = 0.0 if (t <= -2400.0) tmp = t_1; elseif (t <= 2.3e+150) tmp = fma(Float64(Float64(y - x) / a), z, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * a + y), $MachinePrecision]}, If[LessEqual[t, -2400.0], t$95$1, If[LessEqual[t, 2.3e+150], N[(N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] * z + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y - x}{t}, a, y\right)\\
\mathbf{if}\;t \leq -2400:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{+150}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - x}{a}, z, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2400 or 2.30000000000000001e150 < t Initial program 40.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
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6453.0
Applied rewrites53.0%
Taylor expanded in a around 0
Applied rewrites61.9%
if -2400 < t < 2.30000000000000001e150Initial program 88.1%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6474.2
Applied rewrites74.2%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ (- y x) t) a y))) (if (<= t -2400.0) t_1 (if (<= t 2.3e+150) (fma (/ (- x y) a) t x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((y - x) / t), a, y);
double tmp;
if (t <= -2400.0) {
tmp = t_1;
} else if (t <= 2.3e+150) {
tmp = fma(((x - y) / a), t, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(y - x) / t), a, y) tmp = 0.0 if (t <= -2400.0) tmp = t_1; elseif (t <= 2.3e+150) tmp = fma(Float64(Float64(x - y) / a), t, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * a + y), $MachinePrecision]}, If[LessEqual[t, -2400.0], t$95$1, If[LessEqual[t, 2.3e+150], N[(N[(N[(x - y), $MachinePrecision] / a), $MachinePrecision] * t + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y - x}{t}, a, y\right)\\
\mathbf{if}\;t \leq -2400:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{+150}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{a}, t, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2400 or 2.30000000000000001e150 < t Initial program 40.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
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6453.0
Applied rewrites53.0%
Taylor expanded in a around 0
Applied rewrites61.9%
if -2400 < t < 2.30000000000000001e150Initial program 88.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
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6448.5
Applied rewrites48.5%
Taylor expanded in a around inf
Applied rewrites49.3%
(FPCore (x y z t a) :precision binary64 (if (<= t -0.43) y (if (<= t 9.6e+157) (fma (- y) (/ t a) x) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -0.43) {
tmp = y;
} else if (t <= 9.6e+157) {
tmp = fma(-y, (t / a), x);
} else {
tmp = y;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -0.43) tmp = y; elseif (t <= 9.6e+157) tmp = fma(Float64(-y), Float64(t / a), x); else tmp = y; end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -0.43], y, If[LessEqual[t, 9.6e+157], N[((-y) * N[(t / a), $MachinePrecision] + x), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.43:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 9.6 \cdot 10^{+157}:\\
\;\;\;\;\mathsf{fma}\left(-y, \frac{t}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -0.429999999999999993 or 9.5999999999999998e157 < t Initial program 40.6%
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
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6452.5
Applied rewrites52.5%
Taylor expanded in a around 0
Applied rewrites52.1%
if -0.429999999999999993 < t < 9.5999999999999998e157Initial program 88.0%
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
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6448.8
Applied rewrites48.8%
Taylor expanded in a around inf
Applied rewrites47.0%
Taylor expanded in y around inf
Applied rewrites46.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (/ (* z x) t))) (if (<= z -4.2e+170) t_1 (if (<= z 2.1e-30) y t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z * x) / t;
double tmp;
if (z <= -4.2e+170) {
tmp = t_1;
} else if (z <= 2.1e-30) {
tmp = y;
} 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 = (z * x) / t
if (z <= (-4.2d+170)) then
tmp = t_1
else if (z <= 2.1d-30) then
tmp = y
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 = (z * x) / t;
double tmp;
if (z <= -4.2e+170) {
tmp = t_1;
} else if (z <= 2.1e-30) {
tmp = y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z * x) / t tmp = 0 if z <= -4.2e+170: tmp = t_1 elif z <= 2.1e-30: tmp = y else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z * x) / t) tmp = 0.0 if (z <= -4.2e+170) tmp = t_1; elseif (z <= 2.1e-30) tmp = y; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z * x) / t; tmp = 0.0; if (z <= -4.2e+170) tmp = t_1; elseif (z <= 2.1e-30) tmp = y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z * x), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[z, -4.2e+170], t$95$1, If[LessEqual[z, 2.1e-30], y, t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot x}{t}\\
\mathbf{if}\;z \leq -4.2 \cdot 10^{+170}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-30}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.19999999999999996e170 or 2.1000000000000002e-30 < z Initial program 70.6%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift--.f64N/A
flip--N/A
associate-/r/N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
difference-of-squaresN/A
lift--.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-+.f6474.2
Applied rewrites74.2%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6461.3
Applied rewrites61.3%
Taylor expanded in y around 0
Applied rewrites40.1%
Taylor expanded in a around 0
Applied rewrites30.0%
if -4.19999999999999996e170 < z < 2.1000000000000002e-30Initial program 67.2%
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
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6464.7
Applied rewrites64.7%
Taylor expanded in a around 0
Applied rewrites35.9%
(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 68.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
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6450.3
Applied rewrites50.3%
Taylor expanded in a around 0
Applied rewrites26.5%
(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 2024276
(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))))