
(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 21 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 (/ (- x t) (- z a))) (t_2 (- x (* (- z y) t_1))))
(if (<= t_2 -1e-287)
t_2
(if (<= t_2 4e-291)
(- t (* (/ (- t x) z) (- y a)))
(fma t_1 (- y z) x)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x - t) / (z - a);
double t_2 = x - ((z - y) * t_1);
double tmp;
if (t_2 <= -1e-287) {
tmp = t_2;
} else if (t_2 <= 4e-291) {
tmp = t - (((t - x) / z) * (y - a));
} else {
tmp = fma(t_1, (y - z), x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(x - t) / Float64(z - a)) t_2 = Float64(x - Float64(Float64(z - y) * t_1)) tmp = 0.0 if (t_2 <= -1e-287) tmp = t_2; elseif (t_2 <= 4e-291) tmp = Float64(t - Float64(Float64(Float64(t - x) / z) * Float64(y - a))); else tmp = fma(t_1, Float64(y - z), x); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(N[(z - y), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e-287], t$95$2, If[LessEqual[t$95$2, 4e-291], N[(t - N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(y - z), $MachinePrecision] + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x - t}{z - a}\\
t_2 := x - \left(z - y\right) \cdot t\_1\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{-287}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{-291}:\\
\;\;\;\;t - \frac{t - x}{z} \cdot \left(y - a\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, y - z, x\right)\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.00000000000000002e-287Initial program 89.7%
if -1.00000000000000002e-287 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 3.99999999999999985e-291Initial program 4.3%
Taylor expanded in z around inf
lower--.f6414.9
Applied rewrites14.9%
Taylor expanded in z 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.7%
Applied rewrites96.9%
if 3.99999999999999985e-291 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 96.2%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6496.3
lift-/.f64N/A
frac-2negN/A
lower-/.f64N/A
neg-sub0N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--r+N/A
neg-sub0N/A
remove-double-negN/A
lower--.f64N/A
neg-sub0N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--r+N/A
neg-sub0N/A
remove-double-negN/A
lower--.f6496.3
Applied rewrites96.3%
Final simplification93.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- x t) (- z a)))
(t_2 (fma t_1 (- y z) x))
(t_3 (- x (* (- z y) t_1))))
(if (<= t_3 -1e-287)
t_2
(if (<= t_3 4e-291) (- t (* (/ (- t x) z) (- y a))) t_2))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x - t) / (z - a);
double t_2 = fma(t_1, (y - z), x);
double t_3 = x - ((z - y) * t_1);
double tmp;
if (t_3 <= -1e-287) {
tmp = t_2;
} else if (t_3 <= 4e-291) {
tmp = t - (((t - x) / z) * (y - a));
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(x - t) / Float64(z - a)) t_2 = fma(t_1, Float64(y - z), x) t_3 = Float64(x - Float64(Float64(z - y) * t_1)) tmp = 0.0 if (t_3 <= -1e-287) tmp = t_2; elseif (t_3 <= 4e-291) tmp = Float64(t - Float64(Float64(Float64(t - x) / z) * Float64(y - a))); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[(y - z), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$3 = N[(x - N[(N[(z - y), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -1e-287], t$95$2, If[LessEqual[t$95$3, 4e-291], N[(t - N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x - t}{z - a}\\
t_2 := \mathsf{fma}\left(t\_1, y - z, x\right)\\
t_3 := x - \left(z - y\right) \cdot t\_1\\
\mathbf{if}\;t\_3 \leq -1 \cdot 10^{-287}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_3 \leq 4 \cdot 10^{-291}:\\
\;\;\;\;t - \frac{t - x}{z} \cdot \left(y - a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.00000000000000002e-287 or 3.99999999999999985e-291 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 92.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6492.9
lift-/.f64N/A
frac-2negN/A
lower-/.f64N/A
neg-sub0N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--r+N/A
neg-sub0N/A
remove-double-negN/A
lower--.f64N/A
neg-sub0N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--r+N/A
neg-sub0N/A
remove-double-negN/A
lower--.f6492.9
Applied rewrites92.9%
if -1.00000000000000002e-287 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 3.99999999999999985e-291Initial program 4.3%
Taylor expanded in z around inf
lower--.f6414.9
Applied rewrites14.9%
Taylor expanded in z 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.7%
Applied rewrites96.9%
Final simplification93.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (/ (- a y) z) x))) (t_2 (fma (/ (- y z) a) (- t x) x)))
(if (<= a -1.65e+15)
t_2
(if (<= a -1.15e-206)
t_1
(if (<= a 4.75e-181)
(fma (- x t) (/ (- y z) z) x)
(if (<= a 1.08e-32) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - (((a - y) / z) * x);
double t_2 = fma(((y - z) / a), (t - x), x);
double tmp;
if (a <= -1.65e+15) {
tmp = t_2;
} else if (a <= -1.15e-206) {
tmp = t_1;
} else if (a <= 4.75e-181) {
tmp = fma((x - t), ((y - z) / z), x);
} else if (a <= 1.08e-32) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(Float64(a - y) / z) * x)) t_2 = fma(Float64(Float64(y - z) / a), Float64(t - x), x) tmp = 0.0 if (a <= -1.65e+15) tmp = t_2; elseif (a <= -1.15e-206) tmp = t_1; elseif (a <= 4.75e-181) tmp = fma(Float64(x - t), Float64(Float64(y - z) / z), x); elseif (a <= 1.08e-32) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -1.65e+15], t$95$2, If[LessEqual[a, -1.15e-206], t$95$1, If[LessEqual[a, 4.75e-181], N[(N[(x - t), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / z), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 1.08e-32], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{a - y}{z} \cdot x\\
t_2 := \mathsf{fma}\left(\frac{y - z}{a}, t - x, x\right)\\
\mathbf{if}\;a \leq -1.65 \cdot 10^{+15}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -1.15 \cdot 10^{-206}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4.75 \cdot 10^{-181}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y - z}{z}, x\right)\\
\mathbf{elif}\;a \leq 1.08 \cdot 10^{-32}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -1.65e15 or 1.08e-32 < a Initial program 90.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--.f6481.5
Applied rewrites81.5%
if -1.65e15 < a < -1.15e-206 or 4.74999999999999999e-181 < a < 1.08e-32Initial program 69.3%
Taylor expanded in z around inf
lower--.f6430.0
Applied rewrites30.0%
Taylor expanded in z 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 rewrites72.7%
Taylor expanded in t around 0
Applied rewrites74.5%
if -1.15e-206 < a < 4.74999999999999999e-181Initial program 73.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6473.4
lift-/.f64N/A
frac-2negN/A
lower-/.f64N/A
neg-sub0N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--r+N/A
neg-sub0N/A
remove-double-negN/A
lower--.f64N/A
neg-sub0N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--r+N/A
neg-sub0N/A
remove-double-negN/A
lower--.f6473.4
Applied rewrites73.4%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6467.3
Applied rewrites67.3%
Final simplification76.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -4.1e+127)
(* -1.0 (- t))
(if (<= z -8e-63)
(* (/ y (- a z)) t)
(if (<= z 1.32e-86)
(/ (* (- t x) y) a)
(if (<= z 3100000.0) (* (/ (- y a) z) x) (fma a (/ t z) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.1e+127) {
tmp = -1.0 * -t;
} else if (z <= -8e-63) {
tmp = (y / (a - z)) * t;
} else if (z <= 1.32e-86) {
tmp = ((t - x) * y) / a;
} else if (z <= 3100000.0) {
tmp = ((y - a) / z) * x;
} else {
tmp = fma(a, (t / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.1e+127) tmp = Float64(-1.0 * Float64(-t)); elseif (z <= -8e-63) tmp = Float64(Float64(y / Float64(a - z)) * t); elseif (z <= 1.32e-86) tmp = Float64(Float64(Float64(t - x) * y) / a); elseif (z <= 3100000.0) tmp = Float64(Float64(Float64(y - a) / z) * x); else tmp = fma(a, Float64(t / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.1e+127], N[(-1.0 * (-t)), $MachinePrecision], If[LessEqual[z, -8e-63], N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 1.32e-86], N[(N[(N[(t - x), $MachinePrecision] * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 3100000.0], N[(N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] * x), $MachinePrecision], N[(a * N[(t / z), $MachinePrecision] + t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.1 \cdot 10^{+127}:\\
\;\;\;\;-1 \cdot \left(-t\right)\\
\mathbf{elif}\;z \leq -8 \cdot 10^{-63}:\\
\;\;\;\;\frac{y}{a - z} \cdot t\\
\mathbf{elif}\;z \leq 1.32 \cdot 10^{-86}:\\
\;\;\;\;\frac{\left(t - x\right) \cdot y}{a}\\
\mathbf{elif}\;z \leq 3100000:\\
\;\;\;\;\frac{y - a}{z} \cdot x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\
\end{array}
\end{array}
if z < -4.09999999999999983e127Initial program 68.3%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6456.1
Applied rewrites56.1%
Taylor expanded in y around 0
Applied rewrites61.8%
Taylor expanded in a around 0
Applied rewrites62.4%
if -4.09999999999999983e127 < z < -8.00000000000000053e-63Initial program 84.6%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6459.4
Applied rewrites59.4%
Taylor expanded in y around inf
Applied rewrites42.4%
if -8.00000000000000053e-63 < z < 1.32e-86Initial program 93.0%
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--.f6487.1
Applied rewrites87.1%
Taylor expanded in y around inf
Applied rewrites41.8%
if 1.32e-86 < z < 3.1e6Initial program 70.8%
Taylor expanded in z around inf
lower--.f642.9
Applied rewrites2.9%
Taylor expanded in z 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 rewrites57.0%
Taylor expanded in t around 0
Applied rewrites45.2%
Applied rewrites45.3%
if 3.1e6 < z Initial program 73.3%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6445.5
Applied rewrites45.5%
Taylor expanded in y around 0
Applied rewrites42.7%
Taylor expanded in a around 0
Applied rewrites38.7%
Final simplification44.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- y z) a) (- t x) x)))
(if (<= a -1.6e+15)
t_1
(if (<= a 6.6e-203)
(fma (- x t) (/ (- y z) z) x)
(if (<= a 4.8e-33) (* (/ y (- z a)) (- x t)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((y - z) / a), (t - x), x);
double tmp;
if (a <= -1.6e+15) {
tmp = t_1;
} else if (a <= 6.6e-203) {
tmp = fma((x - t), ((y - z) / z), x);
} else if (a <= 4.8e-33) {
tmp = (y / (z - a)) * (x - t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(y - z) / a), Float64(t - x), x) tmp = 0.0 if (a <= -1.6e+15) tmp = t_1; elseif (a <= 6.6e-203) tmp = fma(Float64(x - t), Float64(Float64(y - z) / z), x); elseif (a <= 4.8e-33) tmp = Float64(Float64(y / Float64(z - a)) * Float64(x - t)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -1.6e+15], t$95$1, If[LessEqual[a, 6.6e-203], N[(N[(x - t), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / z), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 4.8e-33], N[(N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y - z}{a}, t - x, x\right)\\
\mathbf{if}\;a \leq -1.6 \cdot 10^{+15}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 6.6 \cdot 10^{-203}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y - z}{z}, x\right)\\
\mathbf{elif}\;a \leq 4.8 \cdot 10^{-33}:\\
\;\;\;\;\frac{y}{z - a} \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.6e15 or 4.8e-33 < a Initial program 90.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--.f6481.5
Applied rewrites81.5%
if -1.6e15 < a < 6.60000000000000047e-203Initial program 71.6%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6471.5
lift-/.f64N/A
frac-2negN/A
lower-/.f64N/A
neg-sub0N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--r+N/A
neg-sub0N/A
remove-double-negN/A
lower--.f64N/A
neg-sub0N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--r+N/A
neg-sub0N/A
remove-double-negN/A
lower--.f6471.5
Applied rewrites71.5%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6461.3
Applied rewrites61.3%
if 6.60000000000000047e-203 < a < 4.8e-33Initial program 70.1%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6467.3
Applied rewrites67.3%
Final simplification72.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- y z) a) (- t x) x)))
(if (<= a -2.5e+15)
t_1
(if (<= a -7.4e-125)
(* (- z y) (/ t (- z a)))
(if (<= a 4.8e-33) (* (/ y (- z a)) (- x t)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((y - z) / a), (t - x), x);
double tmp;
if (a <= -2.5e+15) {
tmp = t_1;
} else if (a <= -7.4e-125) {
tmp = (z - y) * (t / (z - a));
} else if (a <= 4.8e-33) {
tmp = (y / (z - a)) * (x - t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(y - z) / a), Float64(t - x), x) tmp = 0.0 if (a <= -2.5e+15) tmp = t_1; elseif (a <= -7.4e-125) tmp = Float64(Float64(z - y) * Float64(t / Float64(z - a))); elseif (a <= 4.8e-33) tmp = Float64(Float64(y / Float64(z - a)) * Float64(x - t)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -2.5e+15], t$95$1, If[LessEqual[a, -7.4e-125], N[(N[(z - y), $MachinePrecision] * N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.8e-33], N[(N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y - z}{a}, t - x, x\right)\\
\mathbf{if}\;a \leq -2.5 \cdot 10^{+15}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -7.4 \cdot 10^{-125}:\\
\;\;\;\;\left(z - y\right) \cdot \frac{t}{z - a}\\
\mathbf{elif}\;a \leq 4.8 \cdot 10^{-33}:\\
\;\;\;\;\frac{y}{z - a} \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.5e15 or 4.8e-33 < a Initial program 90.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--.f6481.5
Applied rewrites81.5%
if -2.5e15 < a < -7.3999999999999998e-125Initial program 74.7%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6470.0
Applied rewrites70.0%
if -7.3999999999999998e-125 < a < 4.8e-33Initial program 70.2%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6461.0
Applied rewrites61.0%
Final simplification72.4%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2.5e+15)
(fma (/ (- t x) a) y x)
(if (<= a -7.4e-125)
(* (- z y) (/ t (- z a)))
(if (<= a 4.8e-33) (* (/ y (- z a)) (- x t)) (fma (/ y a) (- t x) x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.5e+15) {
tmp = fma(((t - x) / a), y, x);
} else if (a <= -7.4e-125) {
tmp = (z - y) * (t / (z - a));
} else if (a <= 4.8e-33) {
tmp = (y / (z - a)) * (x - t);
} else {
tmp = fma((y / a), (t - x), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.5e+15) tmp = fma(Float64(Float64(t - x) / a), y, x); elseif (a <= -7.4e-125) tmp = Float64(Float64(z - y) * Float64(t / Float64(z - a))); elseif (a <= 4.8e-33) tmp = Float64(Float64(y / Float64(z - a)) * Float64(x - t)); else tmp = fma(Float64(y / a), Float64(t - x), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.5e+15], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision], If[LessEqual[a, -7.4e-125], N[(N[(z - y), $MachinePrecision] * N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.8e-33], N[(N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.5 \cdot 10^{+15}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\mathbf{elif}\;a \leq -7.4 \cdot 10^{-125}:\\
\;\;\;\;\left(z - y\right) \cdot \frac{t}{z - a}\\
\mathbf{elif}\;a \leq 4.8 \cdot 10^{-33}:\\
\;\;\;\;\frac{y}{z - a} \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\end{array}
\end{array}
if a < -2.5e15Initial program 91.3%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6474.7
Applied rewrites74.7%
if -2.5e15 < a < -7.3999999999999998e-125Initial program 74.7%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6470.0
Applied rewrites70.0%
if -7.3999999999999998e-125 < a < 4.8e-33Initial program 70.2%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6461.0
Applied rewrites61.0%
if 4.8e-33 < a Initial program 89.9%
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--.f6483.5
Applied rewrites83.5%
Taylor expanded in z around 0
Applied rewrites76.9%
Final simplification69.6%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.6e+15)
(fma (/ (- t x) a) y x)
(if (<= a -3.05e-77)
(- t (/ (* t y) z))
(if (<= a 4.8e-33) (* (/ y (- z a)) (- x t)) (fma (/ y a) (- t x) x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.6e+15) {
tmp = fma(((t - x) / a), y, x);
} else if (a <= -3.05e-77) {
tmp = t - ((t * y) / z);
} else if (a <= 4.8e-33) {
tmp = (y / (z - a)) * (x - t);
} else {
tmp = fma((y / a), (t - x), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.6e+15) tmp = fma(Float64(Float64(t - x) / a), y, x); elseif (a <= -3.05e-77) tmp = Float64(t - Float64(Float64(t * y) / z)); elseif (a <= 4.8e-33) tmp = Float64(Float64(y / Float64(z - a)) * Float64(x - t)); else tmp = fma(Float64(y / a), Float64(t - x), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.6e+15], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision], If[LessEqual[a, -3.05e-77], N[(t - N[(N[(t * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.8e-33], N[(N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.6 \cdot 10^{+15}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\mathbf{elif}\;a \leq -3.05 \cdot 10^{-77}:\\
\;\;\;\;t - \frac{t \cdot y}{z}\\
\mathbf{elif}\;a \leq 4.8 \cdot 10^{-33}:\\
\;\;\;\;\frac{y}{z - a} \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\end{array}
\end{array}
if a < -1.6e15Initial program 91.3%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6474.7
Applied rewrites74.7%
if -1.6e15 < a < -3.0500000000000001e-77Initial program 79.1%
Taylor expanded in z around inf
lower--.f6450.8
Applied rewrites50.8%
Taylor expanded in z 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 rewrites93.1%
Taylor expanded in t around inf
Applied rewrites66.1%
Taylor expanded in a around 0
Applied rewrites66.2%
if -3.0500000000000001e-77 < a < 4.8e-33Initial program 70.2%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6459.5
Applied rewrites59.5%
if 4.8e-33 < a Initial program 89.9%
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--.f6483.5
Applied rewrites83.5%
Taylor expanded in z around 0
Applied rewrites76.9%
Final simplification68.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.1e-8)
(- t (* (/ (- t x) z) (- y a)))
(if (<= z 8.5e+71)
(+ (* (/ y (- z a)) (- x t)) x)
(fma (fma t -1.0 x) (/ (- y a) z) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.1e-8) {
tmp = t - (((t - x) / z) * (y - a));
} else if (z <= 8.5e+71) {
tmp = ((y / (z - a)) * (x - t)) + x;
} else {
tmp = fma(fma(t, -1.0, x), ((y - a) / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.1e-8) tmp = Float64(t - Float64(Float64(Float64(t - x) / z) * Float64(y - a))); elseif (z <= 8.5e+71) tmp = Float64(Float64(Float64(y / Float64(z - a)) * Float64(x - t)) + x); else tmp = fma(fma(t, -1.0, x), Float64(Float64(y - a) / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.1e-8], N[(t - N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e+71], N[(N[(N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(t * -1.0 + x), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{-8}:\\
\;\;\;\;t - \frac{t - x}{z} \cdot \left(y - a\right)\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+71}:\\
\;\;\;\;\frac{y}{z - a} \cdot \left(x - t\right) + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(t, -1, x\right), \frac{y - a}{z}, t\right)\\
\end{array}
\end{array}
if z < -2.09999999999999994e-8Initial program 73.5%
Taylor expanded in z around inf
lower--.f6438.3
Applied rewrites38.3%
Taylor expanded in z 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 rewrites66.9%
Applied rewrites76.0%
if -2.09999999999999994e-8 < z < 8.4999999999999996e71Initial program 89.1%
Taylor expanded in y around inf
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6486.0
Applied rewrites86.0%
if 8.4999999999999996e71 < z Initial program 68.7%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites73.5%
Final simplification81.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (/ y z) t))))
(if (<= z -2.4e-62)
t_1
(if (<= z 1.32e-86)
(/ (* (- t x) y) a)
(if (<= z 1120000.0) (* (/ (- y a) z) x) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * t);
double tmp;
if (z <= -2.4e-62) {
tmp = t_1;
} else if (z <= 1.32e-86) {
tmp = ((t - x) * y) / a;
} else if (z <= 1120000.0) {
tmp = ((y - a) / z) * x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t - ((y / z) * t)
if (z <= (-2.4d-62)) then
tmp = t_1
else if (z <= 1.32d-86) then
tmp = ((t - x) * y) / a
else if (z <= 1120000.0d0) then
tmp = ((y - a) / z) * x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * t);
double tmp;
if (z <= -2.4e-62) {
tmp = t_1;
} else if (z <= 1.32e-86) {
tmp = ((t - x) * y) / a;
} else if (z <= 1120000.0) {
tmp = ((y - a) / z) * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - ((y / z) * t) tmp = 0 if z <= -2.4e-62: tmp = t_1 elif z <= 1.32e-86: tmp = ((t - x) * y) / a elif z <= 1120000.0: tmp = ((y - a) / z) * x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(y / z) * t)) tmp = 0.0 if (z <= -2.4e-62) tmp = t_1; elseif (z <= 1.32e-86) tmp = Float64(Float64(Float64(t - x) * y) / a); elseif (z <= 1120000.0) tmp = Float64(Float64(Float64(y - a) / z) * x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - ((y / z) * t); tmp = 0.0; if (z <= -2.4e-62) tmp = t_1; elseif (z <= 1.32e-86) tmp = ((t - x) * y) / a; elseif (z <= 1120000.0) tmp = ((y - a) / z) * x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.4e-62], t$95$1, If[LessEqual[z, 1.32e-86], N[(N[(N[(t - x), $MachinePrecision] * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 1120000.0], N[(N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot t\\
\mathbf{if}\;z \leq -2.4 \cdot 10^{-62}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.32 \cdot 10^{-86}:\\
\;\;\;\;\frac{\left(t - x\right) \cdot y}{a}\\
\mathbf{elif}\;z \leq 1120000:\\
\;\;\;\;\frac{y - a}{z} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.39999999999999984e-62 or 1.12e6 < z Initial program 74.6%
Taylor expanded in z around inf
lower--.f6432.5
Applied rewrites32.5%
Taylor expanded in z 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 rewrites62.5%
Taylor expanded in t around inf
Applied rewrites52.0%
Taylor expanded in a around 0
Applied rewrites51.9%
if -2.39999999999999984e-62 < z < 1.32e-86Initial program 93.0%
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--.f6487.1
Applied rewrites87.1%
Taylor expanded in y around inf
Applied rewrites41.8%
if 1.32e-86 < z < 1.12e6Initial program 70.8%
Taylor expanded in z around inf
lower--.f642.9
Applied rewrites2.9%
Taylor expanded in z 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 rewrites57.0%
Taylor expanded in t around 0
Applied rewrites45.2%
Applied rewrites45.3%
Final simplification47.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (/ (* t y) z))))
(if (<= z -2.4e-62)
t_1
(if (<= z 1.32e-86)
(/ (* (- t x) y) a)
(if (<= z 1120000.0) (* (/ (- y a) z) x) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((t * y) / z);
double tmp;
if (z <= -2.4e-62) {
tmp = t_1;
} else if (z <= 1.32e-86) {
tmp = ((t - x) * y) / a;
} else if (z <= 1120000.0) {
tmp = ((y - a) / z) * x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t - ((t * y) / z)
if (z <= (-2.4d-62)) then
tmp = t_1
else if (z <= 1.32d-86) then
tmp = ((t - x) * y) / a
else if (z <= 1120000.0d0) then
tmp = ((y - a) / z) * x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((t * y) / z);
double tmp;
if (z <= -2.4e-62) {
tmp = t_1;
} else if (z <= 1.32e-86) {
tmp = ((t - x) * y) / a;
} else if (z <= 1120000.0) {
tmp = ((y - a) / z) * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - ((t * y) / z) tmp = 0 if z <= -2.4e-62: tmp = t_1 elif z <= 1.32e-86: tmp = ((t - x) * y) / a elif z <= 1120000.0: tmp = ((y - a) / z) * x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(t * y) / z)) tmp = 0.0 if (z <= -2.4e-62) tmp = t_1; elseif (z <= 1.32e-86) tmp = Float64(Float64(Float64(t - x) * y) / a); elseif (z <= 1120000.0) tmp = Float64(Float64(Float64(y - a) / z) * x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - ((t * y) / z); tmp = 0.0; if (z <= -2.4e-62) tmp = t_1; elseif (z <= 1.32e-86) tmp = ((t - x) * y) / a; elseif (z <= 1120000.0) tmp = ((y - a) / z) * x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(t * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.4e-62], t$95$1, If[LessEqual[z, 1.32e-86], N[(N[(N[(t - x), $MachinePrecision] * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 1120000.0], N[(N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{t \cdot y}{z}\\
\mathbf{if}\;z \leq -2.4 \cdot 10^{-62}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.32 \cdot 10^{-86}:\\
\;\;\;\;\frac{\left(t - x\right) \cdot y}{a}\\
\mathbf{elif}\;z \leq 1120000:\\
\;\;\;\;\frac{y - a}{z} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.39999999999999984e-62 or 1.12e6 < z Initial program 74.6%
Taylor expanded in z around inf
lower--.f6432.5
Applied rewrites32.5%
Taylor expanded in z 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 rewrites62.5%
Taylor expanded in t around inf
Applied rewrites52.0%
Taylor expanded in a around 0
Applied rewrites49.0%
if -2.39999999999999984e-62 < z < 1.32e-86Initial program 93.0%
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--.f6487.1
Applied rewrites87.1%
Taylor expanded in y around inf
Applied rewrites41.8%
if 1.32e-86 < z < 1.12e6Initial program 70.8%
Taylor expanded in z around inf
lower--.f642.9
Applied rewrites2.9%
Taylor expanded in z 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 rewrites57.0%
Taylor expanded in t around 0
Applied rewrites45.2%
Applied rewrites45.3%
Final simplification46.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- y z) a) (- t x) x)))
(if (<= a -2.7e+15)
t_1
(if (<= a 1.5e-32) (- t (* (/ (- t x) z) (- y a))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((y - z) / a), (t - x), x);
double tmp;
if (a <= -2.7e+15) {
tmp = t_1;
} else if (a <= 1.5e-32) {
tmp = t - (((t - x) / z) * (y - a));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(y - z) / a), Float64(t - x), x) tmp = 0.0 if (a <= -2.7e+15) tmp = t_1; elseif (a <= 1.5e-32) tmp = Float64(t - Float64(Float64(Float64(t - x) / z) * Float64(y - a))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -2.7e+15], t$95$1, If[LessEqual[a, 1.5e-32], N[(t - N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y - z}{a}, t - x, x\right)\\
\mathbf{if}\;a \leq -2.7 \cdot 10^{+15}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.5 \cdot 10^{-32}:\\
\;\;\;\;t - \frac{t - x}{z} \cdot \left(y - a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.7e15 or 1.5e-32 < a Initial program 90.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--.f6481.5
Applied rewrites81.5%
if -2.7e15 < a < 1.5e-32Initial program 71.2%
Taylor expanded in z around inf
lower--.f6427.6
Applied rewrites27.6%
Taylor expanded in z 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 rewrites77.9%
Applied rewrites80.1%
Final simplification80.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -0.000212)
(* -1.0 (- t))
(if (<= z 2.4e-93)
(* (/ y a) t)
(if (<= z 2700000.0) (/ (* y x) z) (fma a (/ t z) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -0.000212) {
tmp = -1.0 * -t;
} else if (z <= 2.4e-93) {
tmp = (y / a) * t;
} else if (z <= 2700000.0) {
tmp = (y * x) / z;
} else {
tmp = fma(a, (t / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -0.000212) tmp = Float64(-1.0 * Float64(-t)); elseif (z <= 2.4e-93) tmp = Float64(Float64(y / a) * t); elseif (z <= 2700000.0) tmp = Float64(Float64(y * x) / z); else tmp = fma(a, Float64(t / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -0.000212], N[(-1.0 * (-t)), $MachinePrecision], If[LessEqual[z, 2.4e-93], N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 2700000.0], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], N[(a * N[(t / z), $MachinePrecision] + t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.000212:\\
\;\;\;\;-1 \cdot \left(-t\right)\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-93}:\\
\;\;\;\;\frac{y}{a} \cdot t\\
\mathbf{elif}\;z \leq 2700000:\\
\;\;\;\;\frac{y \cdot x}{z}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\
\end{array}
\end{array}
if z < -2.12e-4Initial program 74.2%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6457.6
Applied rewrites57.6%
Taylor expanded in y around 0
Applied rewrites45.5%
Taylor expanded in a around 0
Applied rewrites44.4%
if -2.12e-4 < z < 2.4000000000000001e-93Initial program 92.5%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6438.5
Applied rewrites38.5%
Taylor expanded in z around 0
Applied rewrites31.1%
if 2.4000000000000001e-93 < z < 2.7e6Initial program 72.0%
Taylor expanded in z around inf
lower--.f642.9
Applied rewrites2.9%
Taylor expanded in z 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 rewrites54.6%
Taylor expanded in t around 0
Applied rewrites43.3%
Taylor expanded in a around 0
Applied rewrites32.2%
if 2.7e6 < z Initial program 73.3%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6445.5
Applied rewrites45.5%
Taylor expanded in y around 0
Applied rewrites42.7%
Taylor expanded in a around 0
Applied rewrites38.7%
Final simplification36.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -1.0 (- t))))
(if (<= z -0.000212)
t_1
(if (<= z 2.4e-93)
(* (/ y a) t)
(if (<= z 2500000.0) (/ (* y x) z) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -1.0 * -t;
double tmp;
if (z <= -0.000212) {
tmp = t_1;
} else if (z <= 2.4e-93) {
tmp = (y / a) * t;
} else if (z <= 2500000.0) {
tmp = (y * x) / z;
} 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 = (-1.0d0) * -t
if (z <= (-0.000212d0)) then
tmp = t_1
else if (z <= 2.4d-93) then
tmp = (y / a) * t
else if (z <= 2500000.0d0) then
tmp = (y * x) / z
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 = -1.0 * -t;
double tmp;
if (z <= -0.000212) {
tmp = t_1;
} else if (z <= 2.4e-93) {
tmp = (y / a) * t;
} else if (z <= 2500000.0) {
tmp = (y * x) / z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -1.0 * -t tmp = 0 if z <= -0.000212: tmp = t_1 elif z <= 2.4e-93: tmp = (y / a) * t elif z <= 2500000.0: tmp = (y * x) / z else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(-1.0 * Float64(-t)) tmp = 0.0 if (z <= -0.000212) tmp = t_1; elseif (z <= 2.4e-93) tmp = Float64(Float64(y / a) * t); elseif (z <= 2500000.0) tmp = Float64(Float64(y * x) / z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -1.0 * -t; tmp = 0.0; if (z <= -0.000212) tmp = t_1; elseif (z <= 2.4e-93) tmp = (y / a) * t; elseif (z <= 2500000.0) tmp = (y * x) / z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-1.0 * (-t)), $MachinePrecision]}, If[LessEqual[z, -0.000212], t$95$1, If[LessEqual[z, 2.4e-93], N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 2500000.0], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -1 \cdot \left(-t\right)\\
\mathbf{if}\;z \leq -0.000212:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-93}:\\
\;\;\;\;\frac{y}{a} \cdot t\\
\mathbf{elif}\;z \leq 2500000:\\
\;\;\;\;\frac{y \cdot x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.12e-4 or 2.5e6 < z Initial program 73.7%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.3
Applied rewrites51.3%
Taylor expanded in y around 0
Applied rewrites44.0%
Taylor expanded in a around 0
Applied rewrites41.4%
if -2.12e-4 < z < 2.4000000000000001e-93Initial program 92.5%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6438.5
Applied rewrites38.5%
Taylor expanded in z around 0
Applied rewrites31.1%
if 2.4000000000000001e-93 < z < 2.5e6Initial program 72.0%
Taylor expanded in z around inf
lower--.f642.9
Applied rewrites2.9%
Taylor expanded in z 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 rewrites54.6%
Taylor expanded in t around 0
Applied rewrites43.3%
Taylor expanded in a around 0
Applied rewrites32.2%
Final simplification36.4%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.6e+15) (fma (/ (- t x) a) y x) (if (<= a 8.5e-33) (- t (* (/ y z) t)) (fma (/ y a) (- t x) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.6e+15) {
tmp = fma(((t - x) / a), y, x);
} else if (a <= 8.5e-33) {
tmp = t - ((y / z) * t);
} else {
tmp = fma((y / a), (t - x), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.6e+15) tmp = fma(Float64(Float64(t - x) / a), y, x); elseif (a <= 8.5e-33) tmp = Float64(t - Float64(Float64(y / z) * t)); else tmp = fma(Float64(y / a), Float64(t - x), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.6e+15], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision], If[LessEqual[a, 8.5e-33], N[(t - N[(N[(y / z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.6 \cdot 10^{+15}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\mathbf{elif}\;a \leq 8.5 \cdot 10^{-33}:\\
\;\;\;\;t - \frac{y}{z} \cdot t\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\end{array}
\end{array}
if a < -1.6e15Initial program 91.3%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6474.7
Applied rewrites74.7%
if -1.6e15 < a < 8.49999999999999945e-33Initial program 71.2%
Taylor expanded in z around inf
lower--.f6427.6
Applied rewrites27.6%
Taylor expanded in z 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 rewrites77.9%
Taylor expanded in t around inf
Applied rewrites54.6%
Taylor expanded in a around 0
Applied rewrites54.5%
if 8.49999999999999945e-33 < a Initial program 89.9%
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--.f6483.5
Applied rewrites83.5%
Taylor expanded in z around 0
Applied rewrites76.9%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ y a) (- t x) x))) (if (<= a -1.6e+15) t_1 (if (<= a 8.5e-33) (- t (* (/ y z) t)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((y / a), (t - x), x);
double tmp;
if (a <= -1.6e+15) {
tmp = t_1;
} else if (a <= 8.5e-33) {
tmp = t - ((y / z) * t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(y / a), Float64(t - x), x) tmp = 0.0 if (a <= -1.6e+15) tmp = t_1; elseif (a <= 8.5e-33) tmp = Float64(t - Float64(Float64(y / z) * t)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -1.6e+15], t$95$1, If[LessEqual[a, 8.5e-33], N[(t - N[(N[(y / z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{if}\;a \leq -1.6 \cdot 10^{+15}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 8.5 \cdot 10^{-33}:\\
\;\;\;\;t - \frac{y}{z} \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.6e15 or 8.49999999999999945e-33 < a Initial program 90.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--.f6481.5
Applied rewrites81.5%
Taylor expanded in z around 0
Applied rewrites75.4%
if -1.6e15 < a < 8.49999999999999945e-33Initial program 71.2%
Taylor expanded in z around inf
lower--.f6427.6
Applied rewrites27.6%
Taylor expanded in z 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 rewrites77.9%
Taylor expanded in t around inf
Applied rewrites54.6%
Taylor expanded in a around 0
Applied rewrites54.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -4.1e+127) (* -1.0 (- t)) (if (<= z 3.7e+63) (* (/ y (- a z)) t) (fma a (/ t z) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.1e+127) {
tmp = -1.0 * -t;
} else if (z <= 3.7e+63) {
tmp = (y / (a - z)) * t;
} else {
tmp = fma(a, (t / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.1e+127) tmp = Float64(-1.0 * Float64(-t)); elseif (z <= 3.7e+63) tmp = Float64(Float64(y / Float64(a - z)) * t); else tmp = fma(a, Float64(t / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.1e+127], N[(-1.0 * (-t)), $MachinePrecision], If[LessEqual[z, 3.7e+63], N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], N[(a * N[(t / z), $MachinePrecision] + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.1 \cdot 10^{+127}:\\
\;\;\;\;-1 \cdot \left(-t\right)\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{+63}:\\
\;\;\;\;\frac{y}{a - z} \cdot t\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\
\end{array}
\end{array}
if z < -4.09999999999999983e127Initial program 68.3%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6456.1
Applied rewrites56.1%
Taylor expanded in y around 0
Applied rewrites61.8%
Taylor expanded in a around 0
Applied rewrites62.4%
if -4.09999999999999983e127 < z < 3.69999999999999968e63Initial program 87.7%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6441.6
Applied rewrites41.6%
Taylor expanded in y around inf
Applied rewrites34.7%
if 3.69999999999999968e63 < z Initial program 69.3%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6442.8
Applied rewrites42.8%
Taylor expanded in y around 0
Applied rewrites46.5%
Taylor expanded in a around 0
Applied rewrites43.1%
Final simplification40.5%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* -1.0 (- t)))) (if (<= z -0.000212) t_1 (if (<= z 4.2e-26) (* (/ y a) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -1.0 * -t;
double tmp;
if (z <= -0.000212) {
tmp = t_1;
} else if (z <= 4.2e-26) {
tmp = (y / a) * t;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (-1.0d0) * -t
if (z <= (-0.000212d0)) then
tmp = t_1
else if (z <= 4.2d-26) then
tmp = (y / a) * t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -1.0 * -t;
double tmp;
if (z <= -0.000212) {
tmp = t_1;
} else if (z <= 4.2e-26) {
tmp = (y / a) * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -1.0 * -t tmp = 0 if z <= -0.000212: tmp = t_1 elif z <= 4.2e-26: tmp = (y / a) * t else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(-1.0 * Float64(-t)) tmp = 0.0 if (z <= -0.000212) tmp = t_1; elseif (z <= 4.2e-26) tmp = Float64(Float64(y / a) * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -1.0 * -t; tmp = 0.0; if (z <= -0.000212) tmp = t_1; elseif (z <= 4.2e-26) tmp = (y / a) * t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-1.0 * (-t)), $MachinePrecision]}, If[LessEqual[z, -0.000212], t$95$1, If[LessEqual[z, 4.2e-26], N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -1 \cdot \left(-t\right)\\
\mathbf{if}\;z \leq -0.000212:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-26}:\\
\;\;\;\;\frac{y}{a} \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.12e-4 or 4.20000000000000016e-26 < z Initial program 73.4%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6449.0
Applied rewrites49.0%
Taylor expanded in y around 0
Applied rewrites42.1%
Taylor expanded in a around 0
Applied rewrites39.7%
if -2.12e-4 < z < 4.20000000000000016e-26Initial program 90.2%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6438.1
Applied rewrites38.1%
Taylor expanded in z around 0
Applied rewrites29.0%
Final simplification34.8%
(FPCore (x y z t a) :precision binary64 (* -1.0 (- t)))
double code(double x, double y, double z, double t, double a) {
return -1.0 * -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 = (-1.0d0) * -t
end function
public static double code(double x, double y, double z, double t, double a) {
return -1.0 * -t;
}
def code(x, y, z, t, a): return -1.0 * -t
function code(x, y, z, t, a) return Float64(-1.0 * Float64(-t)) end
function tmp = code(x, y, z, t, a) tmp = -1.0 * -t; end
code[x_, y_, z_, t_, a_] := N[(-1.0 * (-t)), $MachinePrecision]
\begin{array}{l}
\\
-1 \cdot \left(-t\right)
\end{array}
Initial program 81.1%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6444.0
Applied rewrites44.0%
Taylor expanded in y around 0
Applied rewrites25.7%
Taylor expanded in a around 0
Applied rewrites23.2%
Final simplification23.2%
(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(Float64(t - x) + x) end
function tmp = code(x, y, z, t, a) tmp = (t - x) + x; end
code[x_, y_, z_, t_, a_] := N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\left(t - x\right) + x
\end{array}
Initial program 81.1%
Taylor expanded in z around inf
lower--.f6419.0
Applied rewrites19.0%
Final simplification19.0%
(FPCore (x y z t a) :precision binary64 (+ (- x) x))
double code(double x, double y, double z, double t, double a) {
return -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 = -x + x
end function
public static double code(double x, double y, double z, double t, double a) {
return -x + x;
}
def code(x, y, z, t, a): return -x + x
function code(x, y, z, t, a) return Float64(Float64(-x) + x) end
function tmp = code(x, y, z, t, a) tmp = -x + x; end
code[x_, y_, z_, t_, a_] := N[((-x) + x), $MachinePrecision]
\begin{array}{l}
\\
\left(-x\right) + x
\end{array}
Initial program 81.1%
Taylor expanded in z around inf
lower--.f6419.0
Applied rewrites19.0%
Taylor expanded in t around 0
Applied rewrites2.8%
Final simplification2.8%
herbie shell --seed 2024243
(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)))))