
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((y - z) * (t - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((y - z) * (t - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ (- z y) (/ (- z a) (- x t)))))
(t_2 (- x (/ (* (- z y) (- x t)) (- z a)))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -1e-255)
t_2
(if (<= t_2 0.0) (- t (* (- a y) (/ (- x t) z))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((z - y) / ((z - a) / (x - t)));
double t_2 = x - (((z - y) * (x - t)) / (z - a));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -1e-255) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t - ((a - y) * ((x - t) / z));
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((z - y) / ((z - a) / (x - t)));
double t_2 = x - (((z - y) * (x - t)) / (z - a));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= -1e-255) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t - ((a - y) * ((x - t) / z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - ((z - y) / ((z - a) / (x - t))) t_2 = x - (((z - y) * (x - t)) / (z - a)) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -1e-255: tmp = t_2 elif t_2 <= 0.0: tmp = t - ((a - y) * ((x - t) / z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(z - y) / Float64(Float64(z - a) / Float64(x - t)))) t_2 = Float64(x - Float64(Float64(Float64(z - y) * Float64(x - t)) / Float64(z - a))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= -1e-255) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(t - Float64(Float64(a - y) * Float64(Float64(x - t) / z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - ((z - y) / ((z - a) / (x - t))); t_2 = x - (((z - y) * (x - t)) / (z - a)); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -1e-255) tmp = t_2; elseif (t_2 <= 0.0) tmp = t - ((a - y) * ((x - t) / z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(z - y), $MachinePrecision] / N[(N[(z - a), $MachinePrecision] / N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(N[(N[(z - y), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -1e-255], t$95$2, If[LessEqual[t$95$2, 0.0], N[(t - N[(N[(a - y), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{z - y}{\frac{z - a}{x - t}}\\
t_2 := x - \frac{\left(z - y\right) \cdot \left(x - t\right)}{z - a}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-255}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t - \left(a - y\right) \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -inf.0 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 68.2%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6490.6
Applied rewrites90.6%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1e-255Initial program 97.2%
if -1e-255 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 8.8%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f644.2
Applied rewrites4.2%
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--.f6499.8
Applied rewrites99.8%
Final simplification93.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- t x) a) y x)))
(if (<= a -14600000.0)
t_1
(if (<= a -3.45e-304)
(* (- (/ y z) 1.0) (- t))
(if (<= a 2.9e-11) (* (/ y (- z a)) (- x t)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((t - x) / a), y, x);
double tmp;
if (a <= -14600000.0) {
tmp = t_1;
} else if (a <= -3.45e-304) {
tmp = ((y / z) - 1.0) * -t;
} else if (a <= 2.9e-11) {
tmp = (y / (z - a)) * (x - t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(t - x) / a), y, x) tmp = 0.0 if (a <= -14600000.0) tmp = t_1; elseif (a <= -3.45e-304) tmp = Float64(Float64(Float64(y / z) - 1.0) * Float64(-t)); elseif (a <= 2.9e-11) 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[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision]}, If[LessEqual[a, -14600000.0], t$95$1, If[LessEqual[a, -3.45e-304], N[(N[(N[(y / z), $MachinePrecision] - 1.0), $MachinePrecision] * (-t)), $MachinePrecision], If[LessEqual[a, 2.9e-11], 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{t - x}{a}, y, x\right)\\
\mathbf{if}\;a \leq -14600000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -3.45 \cdot 10^{-304}:\\
\;\;\;\;\left(\frac{y}{z} - 1\right) \cdot \left(-t\right)\\
\mathbf{elif}\;a \leq 2.9 \cdot 10^{-11}:\\
\;\;\;\;\frac{y}{z - a} \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.46e7 or 2.9e-11 < a Initial program 71.8%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6475.4
Applied rewrites75.4%
if -1.46e7 < a < -3.4499999999999999e-304Initial program 71.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--.f6460.6
Applied rewrites60.6%
Taylor expanded in a around 0
Applied rewrites65.4%
Applied rewrites65.4%
if -3.4499999999999999e-304 < a < 2.9e-11Initial program 72.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--.f6460.2
Applied rewrites60.2%
Final simplification69.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.05e+127)
(- t (* (- a y) (/ (- x t) z)))
(if (<= z 3e+86)
(- x (/ (* (- z y) (- x t)) (- z a)))
(fma (- x t) (/ (- y a) z) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.05e+127) {
tmp = t - ((a - y) * ((x - t) / z));
} else if (z <= 3e+86) {
tmp = x - (((z - y) * (x - t)) / (z - a));
} else {
tmp = fma((x - t), ((y - a) / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.05e+127) tmp = Float64(t - Float64(Float64(a - y) * Float64(Float64(x - t) / z))); elseif (z <= 3e+86) tmp = Float64(x - Float64(Float64(Float64(z - y) * Float64(x - t)) / Float64(z - a))); else tmp = fma(Float64(x - t), Float64(Float64(y - a) / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.05e+127], N[(t - N[(N[(a - y), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3e+86], N[(x - N[(N[(N[(z - y), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - t), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.05 \cdot 10^{+127}:\\
\;\;\;\;t - \left(a - y\right) \cdot \frac{x - t}{z}\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+86}:\\
\;\;\;\;x - \frac{\left(z - y\right) \cdot \left(x - t\right)}{z - a}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y - a}{z}, t\right)\\
\end{array}
\end{array}
if z < -2.04999999999999991e127Initial program 37.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6455.1
Applied rewrites55.1%
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--.f6488.0
Applied rewrites88.0%
if -2.04999999999999991e127 < z < 2.99999999999999977e86Initial program 86.2%
if 2.99999999999999977e86 < z Initial program 34.6%
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
mul-1-negN/A
lower-neg.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6476.2
Applied rewrites76.2%
Final simplification84.8%
(FPCore (x y z t a)
:precision binary64
(if (<= a -3.5e+80)
(* 1.0 x)
(if (<= a 3.3e+66)
(fma (- t) (/ y z) t)
(if (<= a 8.2e+172) (* (/ (- y z) a) t) (* 1.0 x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.5e+80) {
tmp = 1.0 * x;
} else if (a <= 3.3e+66) {
tmp = fma(-t, (y / z), t);
} else if (a <= 8.2e+172) {
tmp = ((y - z) / a) * t;
} else {
tmp = 1.0 * x;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.5e+80) tmp = Float64(1.0 * x); elseif (a <= 3.3e+66) tmp = fma(Float64(-t), Float64(y / z), t); elseif (a <= 8.2e+172) tmp = Float64(Float64(Float64(y - z) / a) * t); else tmp = Float64(1.0 * x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.5e+80], N[(1.0 * x), $MachinePrecision], If[LessEqual[a, 3.3e+66], N[((-t) * N[(y / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[a, 8.2e+172], N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * t), $MachinePrecision], N[(1.0 * x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.5 \cdot 10^{+80}:\\
\;\;\;\;1 \cdot x\\
\mathbf{elif}\;a \leq 3.3 \cdot 10^{+66}:\\
\;\;\;\;\mathsf{fma}\left(-t, \frac{y}{z}, t\right)\\
\mathbf{elif}\;a \leq 8.2 \cdot 10^{+172}:\\
\;\;\;\;\frac{y - z}{a} \cdot t\\
\mathbf{else}:\\
\;\;\;\;1 \cdot x\\
\end{array}
\end{array}
if a < -3.49999999999999994e80 or 8.200000000000001e172 < a Initial program 70.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6497.5
Applied rewrites97.5%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
times-fracN/A
distribute-rgt-outN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f6486.1
Applied rewrites86.1%
Taylor expanded in a around inf
Applied rewrites57.6%
if -3.49999999999999994e80 < a < 3.3000000000000001e66Initial program 72.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--.f6450.0
Applied rewrites50.0%
Taylor expanded in a around 0
Applied rewrites51.5%
Taylor expanded in z around inf
Applied rewrites51.5%
if 3.3000000000000001e66 < a < 8.200000000000001e172Initial program 72.7%
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--.f6485.1
Applied rewrites85.1%
Taylor expanded in t around inf
Applied rewrites52.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- y z) a) (- t x) x)))
(if (<= a -75000000000.0)
t_1
(if (<= a 6e-11) (fma (- x t) (/ (- y a) z) 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 <= -75000000000.0) {
tmp = t_1;
} else if (a <= 6e-11) {
tmp = fma((x - t), ((y - a) / z), 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 <= -75000000000.0) tmp = t_1; elseif (a <= 6e-11) tmp = fma(Float64(x - t), Float64(Float64(y - a) / z), 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, -75000000000.0], t$95$1, If[LessEqual[a, 6e-11], N[(N[(x - t), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $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 -75000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 6 \cdot 10^{-11}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y - a}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -7.5e10 or 6e-11 < a Initial program 71.8%
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.7
Applied rewrites83.7%
if -7.5e10 < a < 6e-11Initial program 71.9%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6481.7
Applied rewrites81.7%
Final simplification82.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- y z) a) (- t x) x)))
(if (<= a -3.9e-61)
t_1
(if (<= a 2.2e-74) (fma (/ (- z y) z) (- t x) x) 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 <= -3.9e-61) {
tmp = t_1;
} else if (a <= 2.2e-74) {
tmp = fma(((z - y) / z), (t - x), x);
} 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 <= -3.9e-61) tmp = t_1; elseif (a <= 2.2e-74) tmp = fma(Float64(Float64(z - y) / z), 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[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -3.9e-61], t$95$1, If[LessEqual[a, 2.2e-74], N[(N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $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 -3.9 \cdot 10^{-61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.2 \cdot 10^{-74}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z - y}{z}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -3.90000000000000033e-61 or 2.2000000000000001e-74 < a Initial program 70.3%
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--.f6476.6
Applied rewrites76.6%
if -3.90000000000000033e-61 < a < 2.2000000000000001e-74Initial program 74.3%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
associate-/l*N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
distribute-neg-fracN/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower--.f6470.2
Applied rewrites70.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ t (- z a)) (- z y))))
(if (<= t -3.45e-43)
t_1
(if (<= t 6e+29) (fma (- z y) (/ x (- a z)) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t / (z - a)) * (z - y);
double tmp;
if (t <= -3.45e-43) {
tmp = t_1;
} else if (t <= 6e+29) {
tmp = fma((z - y), (x / (a - z)), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(t / Float64(z - a)) * Float64(z - y)) tmp = 0.0 if (t <= -3.45e-43) tmp = t_1; elseif (t <= 6e+29) tmp = fma(Float64(z - y), Float64(x / Float64(a - z)), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.45e-43], t$95$1, If[LessEqual[t, 6e+29], N[(N[(z - y), $MachinePrecision] * N[(x / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{z - a} \cdot \left(z - y\right)\\
\mathbf{if}\;t \leq -3.45 \cdot 10^{-43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 6 \cdot 10^{+29}:\\
\;\;\;\;\mathsf{fma}\left(z - y, \frac{x}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.44999999999999982e-43 or 5.9999999999999998e29 < t Initial program 67.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--.f6475.7
Applied rewrites75.7%
if -3.44999999999999982e-43 < t < 5.9999999999999998e29Initial program 76.4%
Taylor expanded in t around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6470.8
Applied rewrites70.8%
Final simplification73.3%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (/ t (- z a)) (- z y)))) (if (<= t -1.5e-41) t_1 (if (<= t 5.9e+29) (fma (/ (- t x) a) y x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t / (z - a)) * (z - y);
double tmp;
if (t <= -1.5e-41) {
tmp = t_1;
} else if (t <= 5.9e+29) {
tmp = fma(((t - x) / a), y, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(t / Float64(z - a)) * Float64(z - y)) tmp = 0.0 if (t <= -1.5e-41) tmp = t_1; elseif (t <= 5.9e+29) tmp = fma(Float64(Float64(t - x) / a), y, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.5e-41], t$95$1, If[LessEqual[t, 5.9e+29], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{z - a} \cdot \left(z - y\right)\\
\mathbf{if}\;t \leq -1.5 \cdot 10^{-41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5.9 \cdot 10^{+29}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.49999999999999994e-41 or 5.8999999999999999e29 < t Initial program 67.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--.f6475.7
Applied rewrites75.7%
if -1.49999999999999994e-41 < t < 5.8999999999999999e29Initial program 76.4%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6459.2
Applied rewrites59.2%
Final simplification67.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- t x) a) y x)))
(if (<= a -14600000.0)
t_1
(if (<= a 4.7e-74) (* (- (/ y z) 1.0) (- t)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((t - x) / a), y, x);
double tmp;
if (a <= -14600000.0) {
tmp = t_1;
} else if (a <= 4.7e-74) {
tmp = ((y / z) - 1.0) * -t;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(t - x) / a), y, x) tmp = 0.0 if (a <= -14600000.0) tmp = t_1; elseif (a <= 4.7e-74) tmp = Float64(Float64(Float64(y / z) - 1.0) * Float64(-t)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision]}, If[LessEqual[a, -14600000.0], t$95$1, If[LessEqual[a, 4.7e-74], N[(N[(N[(y / z), $MachinePrecision] - 1.0), $MachinePrecision] * (-t)), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\mathbf{if}\;a \leq -14600000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4.7 \cdot 10^{-74}:\\
\;\;\;\;\left(\frac{y}{z} - 1\right) \cdot \left(-t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.46e7 or 4.7000000000000001e-74 < a Initial program 71.1%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6472.3
Applied rewrites72.3%
if -1.46e7 < a < 4.7000000000000001e-74Initial program 72.8%
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.4
Applied rewrites56.4%
Taylor expanded in a around 0
Applied rewrites60.4%
Applied rewrites60.4%
Final simplification67.3%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ (- t x) a) y x))) (if (<= a -14600000.0) t_1 (if (<= a 4.7e-74) (fma (- t) (/ y z) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((t - x) / a), y, x);
double tmp;
if (a <= -14600000.0) {
tmp = t_1;
} else if (a <= 4.7e-74) {
tmp = fma(-t, (y / z), t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(t - x) / a), y, x) tmp = 0.0 if (a <= -14600000.0) tmp = t_1; elseif (a <= 4.7e-74) tmp = fma(Float64(-t), Float64(y / z), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision]}, If[LessEqual[a, -14600000.0], t$95$1, If[LessEqual[a, 4.7e-74], N[((-t) * N[(y / z), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\mathbf{if}\;a \leq -14600000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4.7 \cdot 10^{-74}:\\
\;\;\;\;\mathsf{fma}\left(-t, \frac{y}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.46e7 or 4.7000000000000001e-74 < a Initial program 71.1%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6472.3
Applied rewrites72.3%
if -1.46e7 < a < 4.7000000000000001e-74Initial program 72.8%
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.4
Applied rewrites56.4%
Taylor expanded in a around 0
Applied rewrites60.4%
Taylor expanded in z around inf
Applied rewrites60.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ y a) (- t x) x))) (if (<= a -14600000.0) t_1 (if (<= a 4.7e-74) (fma (- 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 <= -14600000.0) {
tmp = t_1;
} else if (a <= 4.7e-74) {
tmp = fma(-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 <= -14600000.0) tmp = t_1; elseif (a <= 4.7e-74) tmp = fma(Float64(-t), Float64(y / z), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -14600000.0], t$95$1, If[LessEqual[a, 4.7e-74], N[((-t) * N[(y / z), $MachinePrecision] + t), $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 -14600000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4.7 \cdot 10^{-74}:\\
\;\;\;\;\mathsf{fma}\left(-t, \frac{y}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.46e7 or 4.7000000000000001e-74 < a Initial program 71.1%
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--.f6479.5
Applied rewrites79.5%
Taylor expanded in z around 0
Applied rewrites72.3%
if -1.46e7 < a < 4.7000000000000001e-74Initial program 72.8%
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.4
Applied rewrites56.4%
Taylor expanded in a around 0
Applied rewrites60.4%
Taylor expanded in z around inf
Applied rewrites60.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ y a) (- x) x))) (if (<= a -19000000.0) t_1 (if (<= a 4.8e-74) (fma (- t) (/ y z) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((y / a), -x, x);
double tmp;
if (a <= -19000000.0) {
tmp = t_1;
} else if (a <= 4.8e-74) {
tmp = fma(-t, (y / z), t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(y / a), Float64(-x), x) tmp = 0.0 if (a <= -19000000.0) tmp = t_1; elseif (a <= 4.8e-74) tmp = fma(Float64(-t), Float64(y / z), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / a), $MachinePrecision] * (-x) + x), $MachinePrecision]}, If[LessEqual[a, -19000000.0], t$95$1, If[LessEqual[a, 4.8e-74], N[((-t) * N[(y / z), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y}{a}, -x, x\right)\\
\mathbf{if}\;a \leq -19000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4.8 \cdot 10^{-74}:\\
\;\;\;\;\mathsf{fma}\left(-t, \frac{y}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.9e7 or 4.7999999999999998e-74 < a Initial program 71.1%
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--.f6479.5
Applied rewrites79.5%
Taylor expanded in z around 0
Applied rewrites72.3%
Taylor expanded in t around 0
Applied rewrites53.4%
if -1.9e7 < a < 4.7999999999999998e-74Initial program 72.8%
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.4
Applied rewrites56.4%
Taylor expanded in a around 0
Applied rewrites60.4%
Taylor expanded in z around inf
Applied rewrites60.4%
(FPCore (x y z t a) :precision binary64 (if (<= a -3.5e+80) (* 1.0 x) (if (<= a 4.6e-33) (fma (- t) (/ y z) t) (* 1.0 x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.5e+80) {
tmp = 1.0 * x;
} else if (a <= 4.6e-33) {
tmp = fma(-t, (y / z), t);
} else {
tmp = 1.0 * x;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.5e+80) tmp = Float64(1.0 * x); elseif (a <= 4.6e-33) tmp = fma(Float64(-t), Float64(y / z), t); else tmp = Float64(1.0 * x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.5e+80], N[(1.0 * x), $MachinePrecision], If[LessEqual[a, 4.6e-33], N[((-t) * N[(y / z), $MachinePrecision] + t), $MachinePrecision], N[(1.0 * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.5 \cdot 10^{+80}:\\
\;\;\;\;1 \cdot x\\
\mathbf{elif}\;a \leq 4.6 \cdot 10^{-33}:\\
\;\;\;\;\mathsf{fma}\left(-t, \frac{y}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;1 \cdot x\\
\end{array}
\end{array}
if a < -3.49999999999999994e80 or 4.59999999999999971e-33 < a Initial program 69.9%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6492.2
Applied rewrites92.2%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
times-fracN/A
distribute-rgt-outN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f6482.0
Applied rewrites82.0%
Taylor expanded in a around inf
Applied rewrites47.7%
if -3.49999999999999994e80 < a < 4.59999999999999971e-33Initial 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--.f6453.7
Applied rewrites53.7%
Taylor expanded in a around 0
Applied rewrites55.5%
Taylor expanded in z around inf
Applied rewrites55.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -1.0 (- t))))
(if (<= z -2.9e+173)
t_1
(if (<= z 1.35e-224) (* (/ y a) t) (if (<= z 1.65e+32) (* 1.0 x) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -1.0 * -t;
double tmp;
if (z <= -2.9e+173) {
tmp = t_1;
} else if (z <= 1.35e-224) {
tmp = (y / a) * t;
} else if (z <= 1.65e+32) {
tmp = 1.0 * 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 = (-1.0d0) * -t
if (z <= (-2.9d+173)) then
tmp = t_1
else if (z <= 1.35d-224) then
tmp = (y / a) * t
else if (z <= 1.65d+32) then
tmp = 1.0d0 * 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 = -1.0 * -t;
double tmp;
if (z <= -2.9e+173) {
tmp = t_1;
} else if (z <= 1.35e-224) {
tmp = (y / a) * t;
} else if (z <= 1.65e+32) {
tmp = 1.0 * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -1.0 * -t tmp = 0 if z <= -2.9e+173: tmp = t_1 elif z <= 1.35e-224: tmp = (y / a) * t elif z <= 1.65e+32: tmp = 1.0 * x 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 <= -2.9e+173) tmp = t_1; elseif (z <= 1.35e-224) tmp = Float64(Float64(y / a) * t); elseif (z <= 1.65e+32) tmp = Float64(1.0 * x); 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 <= -2.9e+173) tmp = t_1; elseif (z <= 1.35e-224) tmp = (y / a) * t; elseif (z <= 1.65e+32) tmp = 1.0 * x; 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, -2.9e+173], t$95$1, If[LessEqual[z, 1.35e-224], N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 1.65e+32], N[(1.0 * x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -1 \cdot \left(-t\right)\\
\mathbf{if}\;z \leq -2.9 \cdot 10^{+173}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-224}:\\
\;\;\;\;\frac{y}{a} \cdot t\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{+32}:\\
\;\;\;\;1 \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.90000000000000007e173 or 1.6500000000000001e32 < z Initial program 42.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--.f6456.5
Applied rewrites56.5%
Taylor expanded in a around 0
Applied rewrites57.6%
Taylor expanded in z around inf
Applied rewrites50.4%
if -2.90000000000000007e173 < z < 1.34999999999999999e-224Initial program 80.0%
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--.f6446.0
Applied rewrites46.0%
Taylor expanded in z around 0
Applied rewrites37.3%
if 1.34999999999999999e-224 < z < 1.6500000000000001e32Initial program 92.8%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6492.1
Applied rewrites92.1%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
times-fracN/A
distribute-rgt-outN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f6479.7
Applied rewrites79.7%
Taylor expanded in a around inf
Applied rewrites41.5%
Final simplification42.6%
(FPCore (x y z t a) :precision binary64 (if (<= a -0.0074) (* 1.0 x) (if (<= a 4e-33) (* -1.0 (- t)) (* 1.0 x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -0.0074) {
tmp = 1.0 * x;
} else if (a <= 4e-33) {
tmp = -1.0 * -t;
} else {
tmp = 1.0 * x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-0.0074d0)) then
tmp = 1.0d0 * x
else if (a <= 4d-33) then
tmp = (-1.0d0) * -t
else
tmp = 1.0d0 * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -0.0074) {
tmp = 1.0 * x;
} else if (a <= 4e-33) {
tmp = -1.0 * -t;
} else {
tmp = 1.0 * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -0.0074: tmp = 1.0 * x elif a <= 4e-33: tmp = -1.0 * -t else: tmp = 1.0 * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -0.0074) tmp = Float64(1.0 * x); elseif (a <= 4e-33) tmp = Float64(-1.0 * Float64(-t)); else tmp = Float64(1.0 * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -0.0074) tmp = 1.0 * x; elseif (a <= 4e-33) tmp = -1.0 * -t; else tmp = 1.0 * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -0.0074], N[(1.0 * x), $MachinePrecision], If[LessEqual[a, 4e-33], N[(-1.0 * (-t)), $MachinePrecision], N[(1.0 * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.0074:\\
\;\;\;\;1 \cdot x\\
\mathbf{elif}\;a \leq 4 \cdot 10^{-33}:\\
\;\;\;\;-1 \cdot \left(-t\right)\\
\mathbf{else}:\\
\;\;\;\;1 \cdot x\\
\end{array}
\end{array}
if a < -0.0074000000000000003 or 4.0000000000000002e-33 < a Initial program 70.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6491.2
Applied rewrites91.2%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
times-fracN/A
distribute-rgt-outN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f6480.3
Applied rewrites80.3%
Taylor expanded in a around inf
Applied rewrites43.7%
if -0.0074000000000000003 < a < 4.0000000000000002e-33Initial program 73.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--.f6455.3
Applied rewrites55.3%
Taylor expanded in a around 0
Applied rewrites59.1%
Taylor expanded in z around inf
Applied rewrites37.0%
Final simplification40.7%
(FPCore (x y z t a) :precision binary64 (if (<= a -0.0074) (* 1.0 x) (if (<= a 4e-33) (+ (- t x) x) (* 1.0 x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -0.0074) {
tmp = 1.0 * x;
} else if (a <= 4e-33) {
tmp = (t - x) + x;
} else {
tmp = 1.0 * x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-0.0074d0)) then
tmp = 1.0d0 * x
else if (a <= 4d-33) then
tmp = (t - x) + x
else
tmp = 1.0d0 * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -0.0074) {
tmp = 1.0 * x;
} else if (a <= 4e-33) {
tmp = (t - x) + x;
} else {
tmp = 1.0 * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -0.0074: tmp = 1.0 * x elif a <= 4e-33: tmp = (t - x) + x else: tmp = 1.0 * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -0.0074) tmp = Float64(1.0 * x); elseif (a <= 4e-33) tmp = Float64(Float64(t - x) + x); else tmp = Float64(1.0 * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -0.0074) tmp = 1.0 * x; elseif (a <= 4e-33) tmp = (t - x) + x; else tmp = 1.0 * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -0.0074], N[(1.0 * x), $MachinePrecision], If[LessEqual[a, 4e-33], N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(1.0 * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.0074:\\
\;\;\;\;1 \cdot x\\
\mathbf{elif}\;a \leq 4 \cdot 10^{-33}:\\
\;\;\;\;\left(t - x\right) + x\\
\mathbf{else}:\\
\;\;\;\;1 \cdot x\\
\end{array}
\end{array}
if a < -0.0074000000000000003 or 4.0000000000000002e-33 < a Initial program 70.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6491.2
Applied rewrites91.2%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
times-fracN/A
distribute-rgt-outN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f6480.3
Applied rewrites80.3%
Taylor expanded in a around inf
Applied rewrites43.7%
if -0.0074000000000000003 < a < 4.0000000000000002e-33Initial program 73.5%
Taylor expanded in z around inf
lower--.f6429.6
Applied rewrites29.6%
Final simplification37.4%
(FPCore (x y z t a) :precision binary64 (* 1.0 x))
double code(double x, double y, double z, double t, double a) {
return 1.0 * 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 = 1.0d0 * x
end function
public static double code(double x, double y, double z, double t, double a) {
return 1.0 * x;
}
def code(x, y, z, t, a): return 1.0 * x
function code(x, y, z, t, a) return Float64(1.0 * x) end
function tmp = code(x, y, z, t, a) tmp = 1.0 * x; end
code[x_, y_, z_, t_, a_] := N[(1.0 * x), $MachinePrecision]
\begin{array}{l}
\\
1 \cdot x
\end{array}
Initial program 71.8%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6483.9
Applied rewrites83.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
times-fracN/A
distribute-rgt-outN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f6476.6
Applied rewrites76.6%
Taylor expanded in a around inf
Applied rewrites27.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (/ y z) (- t x)))))
(if (< z -1.2536131056095036e+188)
t_1
(if (< z 4.446702369113811e+64)
(+ x (/ (- y z) (/ (- a z) (- t x))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t - ((y / z) * (t - x))
if (z < (-1.2536131056095036d+188)) then
tmp = t_1
else if (z < 4.446702369113811d+64) then
tmp = x + ((y - z) / ((a - z) / (t - x)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - ((y / z) * (t - x)) tmp = 0 if z < -1.2536131056095036e+188: tmp = t_1 elif z < 4.446702369113811e+64: tmp = x + ((y - z) / ((a - z) / (t - x))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x))) tmp = 0.0 if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - ((y / z) * (t - x)); tmp = 0.0; if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = x + ((y - z) / ((a - z) / (t - x))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024235
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (if (< z -125361310560950360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- t (* (/ y z) (- t x))) (if (< z 44467023691138110000000000000000000000000000000000000000000000000) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x))))))
(+ x (/ (* (- y z) (- t x)) (- a z))))