
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y - z) * ((t - x) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * ((t - x) / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y - z) * ((t - x) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * ((t - x) / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- y z) (- a z)) (- t x) x))
(t_2 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (<= t_2 -1e-285)
t_1
(if (<= t_2 2e-259) (+ t (* (/ (- t x) z) (- a y))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((y - z) / (a - z)), (t - x), x);
double t_2 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (t_2 <= -1e-285) {
tmp = t_1;
} else if (t_2 <= 2e-259) {
tmp = t + (((t - x) / z) * (a - y));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(y - z) / Float64(a - z)), Float64(t - x), x) t_2 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if (t_2 <= -1e-285) tmp = t_1; elseif (t_2 <= 2e-259) tmp = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e-285], t$95$1, If[LessEqual[t$95$2, 2e-259], N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)\\
t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{-285}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-259}:\\
\;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.00000000000000007e-285 or 2.0000000000000001e-259 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 91.7%
lift--.f64N/A
lift--.f64N/A
lift--.f64N/A
div-invN/A
div-invN/A
lift-/.f64N/A
lift-*.f64N/A
+-commutativeN/A
Applied rewrites95.0%
if -1.00000000000000007e-285 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2.0000000000000001e-259Initial program 4.1%
lift--.f64N/A
lift--.f64N/A
lift--.f64N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f644.4
Applied rewrites4.4%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6498.0
Applied rewrites98.0%
Final simplification95.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -4.6e+51)
(fma a (/ (- t x) z) t)
(if (<= z 2.6e-8)
(fma (/ y a) (- t x) x)
(if (<= z 1.25e+131) (* x (/ (- y a) z)) (fma t (/ (- a y) z) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.6e+51) {
tmp = fma(a, ((t - x) / z), t);
} else if (z <= 2.6e-8) {
tmp = fma((y / a), (t - x), x);
} else if (z <= 1.25e+131) {
tmp = x * ((y - a) / z);
} else {
tmp = fma(t, ((a - y) / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.6e+51) tmp = fma(a, Float64(Float64(t - x) / z), t); elseif (z <= 2.6e-8) tmp = fma(Float64(y / a), Float64(t - x), x); elseif (z <= 1.25e+131) tmp = Float64(x * Float64(Float64(y - a) / z)); else tmp = fma(t, Float64(Float64(a - y) / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.6e+51], N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 2.6e-8], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 1.25e+131], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.6 \cdot 10^{+51}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t - x}{z}, t\right)\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-8}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+131}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t, \frac{a - y}{z}, t\right)\\
\end{array}
\end{array}
if z < -4.6000000000000001e51Initial program 58.8%
Taylor expanded in z around inf
+-commutativeN/A
associate--l+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
associate-+r+N/A
associate-/l*N/A
associate-/l*N/A
associate-*r*N/A
distribute-rgt-outN/A
lower-fma.f64N/A
Applied rewrites78.5%
Taylor expanded in y around 0
+-commutativeN/A
associate-/l*N/A
div-subN/A
lower-fma.f64N/A
div-subN/A
lower-/.f64N/A
lower--.f6455.7
Applied rewrites55.7%
if -4.6000000000000001e51 < z < 2.6000000000000001e-8Initial program 93.4%
lift--.f64N/A
lift--.f64N/A
lift--.f64N/A
div-invN/A
div-invN/A
lift-/.f64N/A
lift-*.f64N/A
+-commutativeN/A
Applied rewrites94.8%
Taylor expanded in z around 0
lower-/.f6475.5
Applied rewrites75.5%
if 2.6000000000000001e-8 < z < 1.24999999999999999e131Initial program 67.3%
Taylor expanded in z around inf
+-commutativeN/A
associate--l+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
associate-+r+N/A
associate-/l*N/A
associate-/l*N/A
associate-*r*N/A
distribute-rgt-outN/A
lower-fma.f64N/A
Applied rewrites79.0%
lift--.f64N/A
lift-/.f64N/A
lift-neg.f64N/A
lift-+.f64N/A
lift-/.f64N/A
div-invN/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f6478.8
lift-+.f64N/A
+-commutativeN/A
lift-neg.f64N/A
unsub-negN/A
lower--.f6478.8
Applied rewrites78.8%
Taylor expanded in t around 0
mul-1-negN/A
lower-neg.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6451.5
Applied rewrites51.5%
if 1.24999999999999999e131 < z Initial program 53.4%
Taylor expanded in z around inf
+-commutativeN/A
associate--l+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
associate-+r+N/A
associate-/l*N/A
associate-/l*N/A
associate-*r*N/A
distribute-rgt-outN/A
lower-fma.f64N/A
Applied rewrites88.7%
Taylor expanded in t around inf
associate--l+N/A
div-subN/A
distribute-lft-inN/A
*-rgt-identityN/A
associate-/l*N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6465.7
Applied rewrites65.7%
Final simplification67.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -4.6e+51)
(fma a (/ (- t x) z) t)
(if (<= z 2.6e-8)
(fma (/ y a) (- t x) x)
(if (<= z 7.2e+123) (* (- y a) (/ x z)) (fma t (- (/ y z)) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.6e+51) {
tmp = fma(a, ((t - x) / z), t);
} else if (z <= 2.6e-8) {
tmp = fma((y / a), (t - x), x);
} else if (z <= 7.2e+123) {
tmp = (y - a) * (x / z);
} else {
tmp = fma(t, -(y / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.6e+51) tmp = fma(a, Float64(Float64(t - x) / z), t); elseif (z <= 2.6e-8) tmp = fma(Float64(y / a), Float64(t - x), x); elseif (z <= 7.2e+123) tmp = Float64(Float64(y - a) * Float64(x / z)); else tmp = fma(t, Float64(-Float64(y / z)), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.6e+51], N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 2.6e-8], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 7.2e+123], N[(N[(y - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(t * (-N[(y / z), $MachinePrecision]) + t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.6 \cdot 10^{+51}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t - x}{z}, t\right)\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-8}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{+123}:\\
\;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t, -\frac{y}{z}, t\right)\\
\end{array}
\end{array}
if z < -4.6000000000000001e51Initial program 58.8%
Taylor expanded in z around inf
+-commutativeN/A
associate--l+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
associate-+r+N/A
associate-/l*N/A
associate-/l*N/A
associate-*r*N/A
distribute-rgt-outN/A
lower-fma.f64N/A
Applied rewrites78.5%
Taylor expanded in y around 0
+-commutativeN/A
associate-/l*N/A
div-subN/A
lower-fma.f64N/A
div-subN/A
lower-/.f64N/A
lower--.f6455.7
Applied rewrites55.7%
if -4.6000000000000001e51 < z < 2.6000000000000001e-8Initial program 93.4%
lift--.f64N/A
lift--.f64N/A
lift--.f64N/A
div-invN/A
div-invN/A
lift-/.f64N/A
lift-*.f64N/A
+-commutativeN/A
Applied rewrites94.8%
Taylor expanded in z around 0
lower-/.f6475.5
Applied rewrites75.5%
if 2.6000000000000001e-8 < z < 7.19999999999999996e123Initial program 65.4%
Taylor expanded in z around inf
+-commutativeN/A
associate--l+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
associate-+r+N/A
associate-/l*N/A
associate-/l*N/A
associate-*r*N/A
distribute-rgt-outN/A
lower-fma.f64N/A
Applied rewrites83.3%
Taylor expanded in t around 0
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6448.8
Applied rewrites48.8%
lift--.f64N/A
*-commutativeN/A
lift-neg.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6454.1
Applied rewrites54.1%
if 7.19999999999999996e123 < z Initial program 54.5%
Taylor expanded in z around inf
+-commutativeN/A
associate--l+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
associate-+r+N/A
associate-/l*N/A
associate-/l*N/A
associate-*r*N/A
distribute-rgt-outN/A
lower-fma.f64N/A
Applied rewrites86.6%
Taylor expanded in y around inf
mul-1-negN/A
lower-neg.f6480.4
Applied rewrites80.4%
Taylor expanded in t around inf
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
mul-1-negN/A
distribute-neg-frac2N/A
lower-/.f64N/A
lower-neg.f6464.3
Applied rewrites64.3%
Final simplification67.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (* (- t x) (/ (- a y) z)))))
(if (<= z -2.22e-48)
t_1
(if (<= z 1.15e-8) (fma (/ (- y z) a) (- t x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + ((t - x) * ((a - y) / z));
double tmp;
if (z <= -2.22e-48) {
tmp = t_1;
} else if (z <= 1.15e-8) {
tmp = fma(((y - z) / a), (t - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(t + Float64(Float64(t - x) * Float64(Float64(a - y) / z))) tmp = 0.0 if (z <= -2.22e-48) tmp = t_1; elseif (z <= 1.15e-8) tmp = fma(Float64(Float64(y - z) / a), Float64(t - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(N[(t - x), $MachinePrecision] * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.22e-48], t$95$1, If[LessEqual[z, 1.15e-8], N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \left(t - x\right) \cdot \frac{a - y}{z}\\
\mathbf{if}\;z \leq -2.22 \cdot 10^{-48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-8}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.22000000000000005e-48 or 1.15e-8 < z Initial program 61.5%
Taylor expanded in z around inf
+-commutativeN/A
associate--l+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
associate-+r+N/A
associate-/l*N/A
associate-/l*N/A
associate-*r*N/A
distribute-rgt-outN/A
lower-fma.f64N/A
Applied rewrites80.3%
lift--.f64N/A
lift-/.f64N/A
lift-neg.f64N/A
lift-+.f64N/A
lower-+.f64N/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6481.6
lift-+.f64N/A
+-commutativeN/A
lift-neg.f64N/A
unsub-negN/A
lower--.f6481.6
Applied rewrites81.6%
if -2.22000000000000005e-48 < z < 1.15e-8Initial program 93.9%
lift--.f64N/A
lift--.f64N/A
lift--.f64N/A
div-invN/A
div-invN/A
lift-/.f64N/A
lift-*.f64N/A
+-commutativeN/A
Applied rewrites95.4%
Taylor expanded in a around inf
lower-/.f64N/A
lower--.f6484.3
Applied rewrites84.3%
Final simplification82.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- a y) z) (- t x) t)))
(if (<= z -2.22e-48)
t_1
(if (<= z 1.15e-8) (fma (/ (- y z) a) (- t x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((a - y) / z), (t - x), t);
double tmp;
if (z <= -2.22e-48) {
tmp = t_1;
} else if (z <= 1.15e-8) {
tmp = fma(((y - z) / a), (t - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(a - y) / z), Float64(t - x), t) tmp = 0.0 if (z <= -2.22e-48) tmp = t_1; elseif (z <= 1.15e-8) tmp = fma(Float64(Float64(y - z) / a), Float64(t - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision] * N[(t - x), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -2.22e-48], t$95$1, If[LessEqual[z, 1.15e-8], N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{a - y}{z}, t - x, t\right)\\
\mathbf{if}\;z \leq -2.22 \cdot 10^{-48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-8}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.22000000000000005e-48 or 1.15e-8 < z Initial program 61.5%
Taylor expanded in z around inf
+-commutativeN/A
associate--l+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
associate-+r+N/A
associate-/l*N/A
associate-/l*N/A
associate-*r*N/A
distribute-rgt-outN/A
lower-fma.f64N/A
Applied rewrites80.3%
Taylor expanded in t around 0
associate--l+N/A
div-subN/A
distribute-lft-inN/A
*-rgt-identityN/A
associate-/l*N/A
+-commutativeN/A
associate-+l+N/A
associate-/l*N/A
associate-*r*N/A
mul-1-negN/A
associate-/l*N/A
distribute-rgt-outN/A
+-commutativeN/A
sub-negN/A
lower-fma.f64N/A
Applied rewrites81.5%
if -2.22000000000000005e-48 < z < 1.15e-8Initial program 93.9%
lift--.f64N/A
lift--.f64N/A
lift--.f64N/A
div-invN/A
div-invN/A
lift-/.f64N/A
lift-*.f64N/A
+-commutativeN/A
Applied rewrites95.4%
Taylor expanded in a around inf
lower-/.f64N/A
lower--.f6484.3
Applied rewrites84.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- a y) z) (- t x) t)))
(if (<= z -2.22e-48)
t_1
(if (<= z 1.15e-8) (fma (- y z) (/ (- t x) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((a - y) / z), (t - x), t);
double tmp;
if (z <= -2.22e-48) {
tmp = t_1;
} else if (z <= 1.15e-8) {
tmp = fma((y - z), ((t - x) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(a - y) / z), Float64(t - x), t) tmp = 0.0 if (z <= -2.22e-48) tmp = t_1; elseif (z <= 1.15e-8) tmp = fma(Float64(y - z), Float64(Float64(t - x) / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision] * N[(t - x), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -2.22e-48], t$95$1, If[LessEqual[z, 1.15e-8], N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{a - y}{z}, t - x, t\right)\\
\mathbf{if}\;z \leq -2.22 \cdot 10^{-48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-8}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.22000000000000005e-48 or 1.15e-8 < z Initial program 61.5%
Taylor expanded in z around inf
+-commutativeN/A
associate--l+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
associate-+r+N/A
associate-/l*N/A
associate-/l*N/A
associate-*r*N/A
distribute-rgt-outN/A
lower-fma.f64N/A
Applied rewrites80.3%
Taylor expanded in t around 0
associate--l+N/A
div-subN/A
distribute-lft-inN/A
*-rgt-identityN/A
associate-/l*N/A
+-commutativeN/A
associate-+l+N/A
associate-/l*N/A
associate-*r*N/A
mul-1-negN/A
associate-/l*N/A
distribute-rgt-outN/A
+-commutativeN/A
sub-negN/A
lower-fma.f64N/A
Applied rewrites81.5%
if -2.22000000000000005e-48 < z < 1.15e-8Initial program 93.9%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6483.5
Applied rewrites83.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- t x) z) (- y) t)))
(if (<= z -4.2e-48)
t_1
(if (<= z 1.28e-8) (fma (- y z) (/ (- t x) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((t - x) / z), -y, t);
double tmp;
if (z <= -4.2e-48) {
tmp = t_1;
} else if (z <= 1.28e-8) {
tmp = fma((y - z), ((t - x) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(t - x) / z), Float64(-y), t) tmp = 0.0 if (z <= -4.2e-48) tmp = t_1; elseif (z <= 1.28e-8) tmp = fma(Float64(y - z), Float64(Float64(t - x) / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * (-y) + t), $MachinePrecision]}, If[LessEqual[z, -4.2e-48], t$95$1, If[LessEqual[z, 1.28e-8], N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{t - x}{z}, -y, t\right)\\
\mathbf{if}\;z \leq -4.2 \cdot 10^{-48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.28 \cdot 10^{-8}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.19999999999999977e-48 or 1.28000000000000005e-8 < z Initial program 61.5%
Taylor expanded in z around inf
+-commutativeN/A
associate--l+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
associate-+r+N/A
associate-/l*N/A
associate-/l*N/A
associate-*r*N/A
distribute-rgt-outN/A
lower-fma.f64N/A
Applied rewrites80.3%
Taylor expanded in y around inf
mul-1-negN/A
lower-neg.f6471.2
Applied rewrites71.2%
if -4.19999999999999977e-48 < z < 1.28000000000000005e-8Initial program 93.9%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6483.5
Applied rewrites83.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (- x x))))
(if (<= z -6.2e+51)
t_1
(if (<= z -1.02e-82)
(/ (* x y) z)
(if (<= z 5.6e+54) (* y (/ t a)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + (x - x);
double tmp;
if (z <= -6.2e+51) {
tmp = t_1;
} else if (z <= -1.02e-82) {
tmp = (x * y) / z;
} else if (z <= 5.6e+54) {
tmp = y * (t / a);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t + (x - x)
if (z <= (-6.2d+51)) then
tmp = t_1
else if (z <= (-1.02d-82)) then
tmp = (x * y) / z
else if (z <= 5.6d+54) then
tmp = y * (t / a)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t + (x - x);
double tmp;
if (z <= -6.2e+51) {
tmp = t_1;
} else if (z <= -1.02e-82) {
tmp = (x * y) / z;
} else if (z <= 5.6e+54) {
tmp = y * (t / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + (x - x) tmp = 0 if z <= -6.2e+51: tmp = t_1 elif z <= -1.02e-82: tmp = (x * y) / z elif z <= 5.6e+54: tmp = y * (t / a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(x - x)) tmp = 0.0 if (z <= -6.2e+51) tmp = t_1; elseif (z <= -1.02e-82) tmp = Float64(Float64(x * y) / z); elseif (z <= 5.6e+54) tmp = Float64(y * Float64(t / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + (x - x); tmp = 0.0; if (z <= -6.2e+51) tmp = t_1; elseif (z <= -1.02e-82) tmp = (x * y) / z; elseif (z <= 5.6e+54) tmp = y * (t / a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(x - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.2e+51], t$95$1, If[LessEqual[z, -1.02e-82], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 5.6e+54], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \left(x - x\right)\\
\mathbf{if}\;z \leq -6.2 \cdot 10^{+51}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.02 \cdot 10^{-82}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{+54}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.20000000000000022e51 or 5.6000000000000003e54 < z Initial program 57.9%
Taylor expanded in z around inf
lower--.f6433.3
Applied rewrites33.3%
lift--.f64N/A
+-commutativeN/A
lift--.f64N/A
associate-+l-N/A
lower--.f64N/A
lower--.f6447.6
Applied rewrites47.6%
if -6.20000000000000022e51 < z < -1.02000000000000007e-82Initial program 84.9%
Taylor expanded in z around inf
+-commutativeN/A
associate--l+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
associate-+r+N/A
associate-/l*N/A
associate-/l*N/A
associate-*r*N/A
distribute-rgt-outN/A
lower-fma.f64N/A
Applied rewrites56.1%
Taylor expanded in y around inf
mul-1-negN/A
lower-neg.f6451.6
Applied rewrites51.6%
Taylor expanded in t around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f6433.8
Applied rewrites33.8%
if -1.02000000000000007e-82 < z < 5.6000000000000003e54Initial program 92.8%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6479.0
Applied rewrites79.0%
Taylor expanded in t around inf
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6433.9
Applied rewrites33.9%
Final simplification39.6%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ (- t x) z) (- y) t))) (if (<= z -1.12e-82) t_1 (if (<= z 1.25e-11) (fma (/ y a) (- t x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((t - x) / z), -y, t);
double tmp;
if (z <= -1.12e-82) {
tmp = t_1;
} else if (z <= 1.25e-11) {
tmp = fma((y / a), (t - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(t - x) / z), Float64(-y), t) tmp = 0.0 if (z <= -1.12e-82) tmp = t_1; elseif (z <= 1.25e-11) tmp = fma(Float64(y / a), Float64(t - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * (-y) + t), $MachinePrecision]}, If[LessEqual[z, -1.12e-82], t$95$1, If[LessEqual[z, 1.25e-11], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{t - x}{z}, -y, t\right)\\
\mathbf{if}\;z \leq -1.12 \cdot 10^{-82}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-11}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.12e-82 or 1.25000000000000005e-11 < z Initial program 62.6%
Taylor expanded in z around inf
+-commutativeN/A
associate--l+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
associate-+r+N/A
associate-/l*N/A
associate-/l*N/A
associate-*r*N/A
distribute-rgt-outN/A
lower-fma.f64N/A
Applied rewrites78.0%
Taylor expanded in y around inf
mul-1-negN/A
lower-neg.f6468.9
Applied rewrites68.9%
if -1.12e-82 < z < 1.25000000000000005e-11Initial program 95.0%
lift--.f64N/A
lift--.f64N/A
lift--.f64N/A
div-invN/A
div-invN/A
lift-/.f64N/A
lift-*.f64N/A
+-commutativeN/A
Applied rewrites96.7%
Taylor expanded in z around 0
lower-/.f6483.2
Applied rewrites83.2%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ x (- z)) (- y) t))) (if (<= z -1.12e-82) t_1 (if (<= z 1.28e-8) (fma (/ y a) (- t x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x / -z), -y, t);
double tmp;
if (z <= -1.12e-82) {
tmp = t_1;
} else if (z <= 1.28e-8) {
tmp = fma((y / a), (t - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x / Float64(-z)), Float64(-y), t) tmp = 0.0 if (z <= -1.12e-82) tmp = t_1; elseif (z <= 1.28e-8) tmp = fma(Float64(y / a), Float64(t - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x / (-z)), $MachinePrecision] * (-y) + t), $MachinePrecision]}, If[LessEqual[z, -1.12e-82], t$95$1, If[LessEqual[z, 1.28e-8], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x}{-z}, -y, t\right)\\
\mathbf{if}\;z \leq -1.12 \cdot 10^{-82}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.28 \cdot 10^{-8}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.12e-82 or 1.28000000000000005e-8 < z Initial program 62.6%
Taylor expanded in z around inf
+-commutativeN/A
associate--l+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
associate-+r+N/A
associate-/l*N/A
associate-/l*N/A
associate-*r*N/A
distribute-rgt-outN/A
lower-fma.f64N/A
Applied rewrites78.0%
Taylor expanded in y around inf
mul-1-negN/A
lower-neg.f6468.9
Applied rewrites68.9%
Taylor expanded in t around 0
mul-1-negN/A
lower-neg.f6461.1
Applied rewrites61.1%
if -1.12e-82 < z < 1.28000000000000005e-8Initial program 95.0%
lift--.f64N/A
lift--.f64N/A
lift--.f64N/A
div-invN/A
div-invN/A
lift-/.f64N/A
lift-*.f64N/A
+-commutativeN/A
Applied rewrites96.7%
Taylor expanded in z around 0
lower-/.f6483.2
Applied rewrites83.2%
Final simplification71.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -4.6e+51) (fma a (/ (- t x) z) t) (if (<= z 2.6e-8) (fma (/ y a) (- t x) x) (fma t (- (/ y z)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.6e+51) {
tmp = fma(a, ((t - x) / z), t);
} else if (z <= 2.6e-8) {
tmp = fma((y / a), (t - x), x);
} else {
tmp = fma(t, -(y / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.6e+51) tmp = fma(a, Float64(Float64(t - x) / z), t); elseif (z <= 2.6e-8) tmp = fma(Float64(y / a), Float64(t - x), x); else tmp = fma(t, Float64(-Float64(y / z)), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.6e+51], N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 2.6e-8], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(t * (-N[(y / z), $MachinePrecision]) + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.6 \cdot 10^{+51}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t - x}{z}, t\right)\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-8}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t, -\frac{y}{z}, t\right)\\
\end{array}
\end{array}
if z < -4.6000000000000001e51Initial program 58.8%
Taylor expanded in z around inf
+-commutativeN/A
associate--l+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
associate-+r+N/A
associate-/l*N/A
associate-/l*N/A
associate-*r*N/A
distribute-rgt-outN/A
lower-fma.f64N/A
Applied rewrites78.5%
Taylor expanded in y around 0
+-commutativeN/A
associate-/l*N/A
div-subN/A
lower-fma.f64N/A
div-subN/A
lower-/.f64N/A
lower--.f6455.7
Applied rewrites55.7%
if -4.6000000000000001e51 < z < 2.6000000000000001e-8Initial program 93.4%
lift--.f64N/A
lift--.f64N/A
lift--.f64N/A
div-invN/A
div-invN/A
lift-/.f64N/A
lift-*.f64N/A
+-commutativeN/A
Applied rewrites94.8%
Taylor expanded in z around 0
lower-/.f6475.5
Applied rewrites75.5%
if 2.6000000000000001e-8 < z Initial program 57.8%
Taylor expanded in z around inf
+-commutativeN/A
associate--l+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
associate-+r+N/A
associate-/l*N/A
associate-/l*N/A
associate-*r*N/A
distribute-rgt-outN/A
lower-fma.f64N/A
Applied rewrites85.6%
Taylor expanded in y around inf
mul-1-negN/A
lower-neg.f6476.6
Applied rewrites76.6%
Taylor expanded in t around inf
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
mul-1-negN/A
distribute-neg-frac2N/A
lower-/.f64N/A
lower-neg.f6454.0
Applied rewrites54.0%
Final simplification66.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.6e+51) (fma a (/ (- t x) z) t) (if (<= z 2.6e-8) (fma y (/ (- t x) a) x) (fma t (- (/ y z)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.6e+51) {
tmp = fma(a, ((t - x) / z), t);
} else if (z <= 2.6e-8) {
tmp = fma(y, ((t - x) / a), x);
} else {
tmp = fma(t, -(y / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.6e+51) tmp = fma(a, Float64(Float64(t - x) / z), t); elseif (z <= 2.6e-8) tmp = fma(y, Float64(Float64(t - x) / a), x); else tmp = fma(t, Float64(-Float64(y / z)), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.6e+51], N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 2.6e-8], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], N[(t * (-N[(y / z), $MachinePrecision]) + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{+51}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t - x}{z}, t\right)\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-8}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t, -\frac{y}{z}, t\right)\\
\end{array}
\end{array}
if z < -1.6000000000000001e51Initial program 58.8%
Taylor expanded in z around inf
+-commutativeN/A
associate--l+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
associate-+r+N/A
associate-/l*N/A
associate-/l*N/A
associate-*r*N/A
distribute-rgt-outN/A
lower-fma.f64N/A
Applied rewrites78.5%
Taylor expanded in y around 0
+-commutativeN/A
associate-/l*N/A
div-subN/A
lower-fma.f64N/A
div-subN/A
lower-/.f64N/A
lower--.f6455.7
Applied rewrites55.7%
if -1.6000000000000001e51 < z < 2.6000000000000001e-8Initial program 93.4%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6475.5
Applied rewrites75.5%
if 2.6000000000000001e-8 < z Initial program 57.8%
Taylor expanded in z around inf
+-commutativeN/A
associate--l+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
associate-+r+N/A
associate-/l*N/A
associate-/l*N/A
associate-*r*N/A
distribute-rgt-outN/A
lower-fma.f64N/A
Applied rewrites85.6%
Taylor expanded in y around inf
mul-1-negN/A
lower-neg.f6476.6
Applied rewrites76.6%
Taylor expanded in t around inf
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
mul-1-negN/A
distribute-neg-frac2N/A
lower-/.f64N/A
lower-neg.f6454.0
Applied rewrites54.0%
Final simplification66.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.6e+51) (fma a (/ (- t x) z) t) (if (<= z 2.6e-8) (fma y (/ t a) x) (fma t (- (/ y z)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.6e+51) {
tmp = fma(a, ((t - x) / z), t);
} else if (z <= 2.6e-8) {
tmp = fma(y, (t / a), x);
} else {
tmp = fma(t, -(y / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.6e+51) tmp = fma(a, Float64(Float64(t - x) / z), t); elseif (z <= 2.6e-8) tmp = fma(y, Float64(t / a), x); else tmp = fma(t, Float64(-Float64(y / z)), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.6e+51], N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 2.6e-8], N[(y * N[(t / a), $MachinePrecision] + x), $MachinePrecision], N[(t * (-N[(y / z), $MachinePrecision]) + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{+51}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t - x}{z}, t\right)\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-8}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t, -\frac{y}{z}, t\right)\\
\end{array}
\end{array}
if z < -1.6000000000000001e51Initial program 58.8%
Taylor expanded in z around inf
+-commutativeN/A
associate--l+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
associate-+r+N/A
associate-/l*N/A
associate-/l*N/A
associate-*r*N/A
distribute-rgt-outN/A
lower-fma.f64N/A
Applied rewrites78.5%
Taylor expanded in y around 0
+-commutativeN/A
associate-/l*N/A
div-subN/A
lower-fma.f64N/A
div-subN/A
lower-/.f64N/A
lower--.f6455.7
Applied rewrites55.7%
if -1.6000000000000001e51 < z < 2.6000000000000001e-8Initial program 93.4%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6475.5
Applied rewrites75.5%
Taylor expanded in t around inf
lower-/.f6466.2
Applied rewrites66.2%
if 2.6000000000000001e-8 < z Initial program 57.8%
Taylor expanded in z around inf
+-commutativeN/A
associate--l+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
associate-+r+N/A
associate-/l*N/A
associate-/l*N/A
associate-*r*N/A
distribute-rgt-outN/A
lower-fma.f64N/A
Applied rewrites85.6%
Taylor expanded in y around inf
mul-1-negN/A
lower-neg.f6476.6
Applied rewrites76.6%
Taylor expanded in t around inf
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
mul-1-negN/A
distribute-neg-frac2N/A
lower-/.f64N/A
lower-neg.f6454.0
Applied rewrites54.0%
Final simplification61.1%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma t (- (/ y z)) t))) (if (<= z -4.8e+77) t_1 (if (<= z 2.6e-8) (fma y (/ t a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(t, -(y / z), t);
double tmp;
if (z <= -4.8e+77) {
tmp = t_1;
} else if (z <= 2.6e-8) {
tmp = fma(y, (t / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(t, Float64(-Float64(y / z)), t) tmp = 0.0 if (z <= -4.8e+77) tmp = t_1; elseif (z <= 2.6e-8) tmp = fma(y, Float64(t / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * (-N[(y / z), $MachinePrecision]) + t), $MachinePrecision]}, If[LessEqual[z, -4.8e+77], t$95$1, If[LessEqual[z, 2.6e-8], N[(y * N[(t / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(t, -\frac{y}{z}, t\right)\\
\mathbf{if}\;z \leq -4.8 \cdot 10^{+77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-8}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.7999999999999997e77 or 2.6000000000000001e-8 < z Initial program 58.9%
Taylor expanded in z around inf
+-commutativeN/A
associate--l+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
associate-+r+N/A
associate-/l*N/A
associate-/l*N/A
associate-*r*N/A
distribute-rgt-outN/A
lower-fma.f64N/A
Applied rewrites82.5%
Taylor expanded in y around inf
mul-1-negN/A
lower-neg.f6473.2
Applied rewrites73.2%
Taylor expanded in t around inf
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
mul-1-negN/A
distribute-neg-frac2N/A
lower-/.f64N/A
lower-neg.f6454.3
Applied rewrites54.3%
if -4.7999999999999997e77 < z < 2.6000000000000001e-8Initial program 92.2%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6474.6
Applied rewrites74.6%
Taylor expanded in t around inf
lower-/.f6465.6
Applied rewrites65.6%
Final simplification60.6%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ t (- x x)))) (if (<= z -1.2e+143) t_1 (if (<= z 1.48e+65) (fma y (/ t a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + (x - x);
double tmp;
if (z <= -1.2e+143) {
tmp = t_1;
} else if (z <= 1.48e+65) {
tmp = fma(y, (t / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(t + Float64(x - x)) tmp = 0.0 if (z <= -1.2e+143) tmp = t_1; elseif (z <= 1.48e+65) tmp = fma(y, Float64(t / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(x - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.2e+143], t$95$1, If[LessEqual[z, 1.48e+65], N[(y * N[(t / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \left(x - x\right)\\
\mathbf{if}\;z \leq -1.2 \cdot 10^{+143}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.48 \cdot 10^{+65}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.1999999999999999e143 or 1.47999999999999993e65 < z Initial program 54.8%
Taylor expanded in z around inf
lower--.f6436.8
Applied rewrites36.8%
lift--.f64N/A
+-commutativeN/A
lift--.f64N/A
associate-+l-N/A
lower--.f64N/A
lower--.f6451.1
Applied rewrites51.1%
if -1.1999999999999999e143 < z < 1.47999999999999993e65Initial program 89.2%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6467.9
Applied rewrites67.9%
Taylor expanded in t around inf
lower-/.f6460.3
Applied rewrites60.3%
Final simplification57.2%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ t (- x x)))) (if (<= z -1.1e-73) t_1 (if (<= z 5.6e+54) (* y (/ t a)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + (x - x);
double tmp;
if (z <= -1.1e-73) {
tmp = t_1;
} else if (z <= 5.6e+54) {
tmp = y * (t / a);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t + (x - x)
if (z <= (-1.1d-73)) then
tmp = t_1
else if (z <= 5.6d+54) then
tmp = y * (t / a)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t + (x - x);
double tmp;
if (z <= -1.1e-73) {
tmp = t_1;
} else if (z <= 5.6e+54) {
tmp = y * (t / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + (x - x) tmp = 0 if z <= -1.1e-73: tmp = t_1 elif z <= 5.6e+54: tmp = y * (t / a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(x - x)) tmp = 0.0 if (z <= -1.1e-73) tmp = t_1; elseif (z <= 5.6e+54) tmp = Float64(y * Float64(t / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + (x - x); tmp = 0.0; if (z <= -1.1e-73) tmp = t_1; elseif (z <= 5.6e+54) tmp = y * (t / a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(x - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.1e-73], t$95$1, If[LessEqual[z, 5.6e+54], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \left(x - x\right)\\
\mathbf{if}\;z \leq -1.1 \cdot 10^{-73}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{+54}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.1e-73 or 5.6000000000000003e54 < z Initial program 62.4%
Taylor expanded in z around inf
lower--.f6429.5
Applied rewrites29.5%
lift--.f64N/A
+-commutativeN/A
lift--.f64N/A
associate-+l-N/A
lower--.f64N/A
lower--.f6441.7
Applied rewrites41.7%
if -1.1e-73 < z < 5.6000000000000003e54Initial program 92.2%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6478.0
Applied rewrites78.0%
Taylor expanded in t around inf
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6433.3
Applied rewrites33.3%
Final simplification37.4%
(FPCore (x y z t a) :precision binary64 (+ t (- x x)))
double code(double x, double y, double z, double t, double a) {
return t + (x - x);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = t + (x - x)
end function
public static double code(double x, double y, double z, double t, double a) {
return t + (x - x);
}
def code(x, y, z, t, a): return t + (x - x)
function code(x, y, z, t, a) return Float64(t + Float64(x - x)) end
function tmp = code(x, y, z, t, a) tmp = t + (x - x); end
code[x_, y_, z_, t_, a_] := N[(t + N[(x - x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
t + \left(x - x\right)
\end{array}
Initial program 77.7%
Taylor expanded in z around inf
lower--.f6417.6
Applied rewrites17.6%
lift--.f64N/A
+-commutativeN/A
lift--.f64N/A
associate-+l-N/A
lower--.f64N/A
lower--.f6424.1
Applied rewrites24.1%
Final simplification24.1%
(FPCore (x y z t a) :precision binary64 (+ x (- t x)))
double code(double x, double y, double z, double t, double a) {
return x + (t - x);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (t - x)
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (t - x);
}
def code(x, y, z, t, a): return x + (t - x)
function code(x, y, z, t, a) return Float64(x + Float64(t - x)) end
function tmp = code(x, y, z, t, a) tmp = x + (t - x); end
code[x_, y_, z_, t_, a_] := N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(t - x\right)
\end{array}
Initial program 77.7%
Taylor expanded in z around inf
lower--.f6417.6
Applied rewrites17.6%
(FPCore (x y z t a) :precision binary64 0.0)
double code(double x, double y, double z, double t, double a) {
return 0.0;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = 0.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return 0.0;
}
def code(x, y, z, t, a): return 0.0
function code(x, y, z, t, a) return 0.0 end
function tmp = code(x, y, z, t, a) tmp = 0.0; end
code[x_, y_, z_, t_, a_] := 0.0
\begin{array}{l}
\\
0
\end{array}
Initial program 77.7%
Taylor expanded in z around inf
lower--.f6417.6
Applied rewrites17.6%
Taylor expanded in t around 0
mul-1-negN/A
lower-neg.f642.9
Applied rewrites2.9%
unsub-negN/A
+-inverses2.9
Applied rewrites2.9%
herbie shell --seed 2024219
(FPCore (x y z t a)
:name "Numeric.Signal:interpolate from hsignal-0.2.7.1"
:precision binary64
(+ x (* (- y z) (/ (- t x) (- a z)))))