
(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 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(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 (/ (* (- y z) (- t x)) (- a z)))))
(if (<= t_1 -1e-304)
(fma (- t x) (/ (- y z) (- a z)) x)
(if (<= t_1 0.0)
(- t (/ (* x (- a y)) z))
(fma (/ (- t x) (- a z)) (- y z) x)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_1 <= -1e-304) {
tmp = fma((t - x), ((y - z) / (a - z)), x);
} else if (t_1 <= 0.0) {
tmp = t - ((x * (a - y)) / z);
} else {
tmp = fma(((t - x) / (a - z)), (y - z), x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if (t_1 <= -1e-304) tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); elseif (t_1 <= 0.0) tmp = Float64(t - Float64(Float64(x * Float64(a - y)) / z)); else tmp = fma(Float64(Float64(t - x) / Float64(a - z)), Float64(y - z), x); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-304], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(t - N[(N[(x * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision] + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-304}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;t - \frac{x \cdot \left(a - y\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a - z}, y - z, x\right)\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -9.99999999999999971e-305Initial program 76.9%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6491.8
Applied rewrites91.8%
if -9.99999999999999971e-305 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 3.9%
Taylor expanded in z around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites99.8%
Taylor expanded in z around inf
Applied rewrites99.8%
Taylor expanded in t around 0
Applied rewrites99.8%
if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 74.9%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6490.3
Applied rewrites90.3%
Final simplification91.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- t x) (/ (- y z) (- a z)) x))
(t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (<= t_2 -1e-304) t_1 (if (<= t_2 0.0) (- t (/ (* x (- a y)) z)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((t - x), ((y - z) / (a - z)), x);
double t_2 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_2 <= -1e-304) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = t - ((x * (a - y)) / z);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x) t_2 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if (t_2 <= -1e-304) tmp = t_1; elseif (t_2 <= 0.0) tmp = Float64(t - Float64(Float64(x * Float64(a - y)) / z)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e-304], t$95$1, If[LessEqual[t$95$2, 0.0], N[(t - N[(N[(x * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{-304}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t - \frac{x \cdot \left(a - y\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -9.99999999999999971e-305 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 76.0%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6490.7
Applied rewrites90.7%
if -9.99999999999999971e-305 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 3.9%
Taylor expanded in z around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites99.8%
Taylor expanded in z around inf
Applied rewrites99.8%
Taylor expanded in t around 0
Applied rewrites99.8%
Final simplification91.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (- t x) (/ (- y a) z)))))
(if (<= z -5.2e+62)
t_1
(if (<= z 0.0007) (fma (- t x) (/ y (- a z)) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((t - x) * ((y - a) / z));
double tmp;
if (z <= -5.2e+62) {
tmp = t_1;
} else if (z <= 0.0007) {
tmp = fma((t - x), (y / (a - z)), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(t - x) * Float64(Float64(y - a) / z))) tmp = 0.0 if (z <= -5.2e+62) tmp = t_1; elseif (z <= 0.0007) tmp = fma(Float64(t - x), Float64(y / Float64(a - z)), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(t - x), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.2e+62], t$95$1, If[LessEqual[z, 0.0007], N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \left(t - x\right) \cdot \frac{y - a}{z}\\
\mathbf{if}\;z \leq -5.2 \cdot 10^{+62}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.0007:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.19999999999999968e62 or 6.99999999999999993e-4 < z Initial program 44.1%
Taylor expanded in z around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites60.7%
Taylor expanded in z around inf
Applied rewrites78.6%
if -5.19999999999999968e62 < z < 6.99999999999999993e-4Initial program 92.8%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6495.3
Applied rewrites95.3%
Taylor expanded in y around inf
lower-/.f64N/A
lower--.f6484.8
Applied rewrites84.8%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (- t (* (/ x z) (- a y))))) (if (<= z -8e+62) t_1 (if (<= z 0.048) (fma (- t x) (/ y (- a z)) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((x / z) * (a - y));
double tmp;
if (z <= -8e+62) {
tmp = t_1;
} else if (z <= 0.048) {
tmp = fma((t - x), (y / (a - z)), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(x / z) * Float64(a - y))) tmp = 0.0 if (z <= -8e+62) tmp = t_1; elseif (z <= 0.048) tmp = fma(Float64(t - x), Float64(y / Float64(a - z)), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(x / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8e+62], t$95$1, If[LessEqual[z, 0.048], N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{x}{z} \cdot \left(a - y\right)\\
\mathbf{if}\;z \leq -8 \cdot 10^{+62}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.048:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -8.00000000000000028e62 or 0.048000000000000001 < z Initial program 44.1%
Taylor expanded in z around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites60.7%
Taylor expanded in z around inf
Applied rewrites78.6%
Taylor expanded in t around 0
Applied rewrites66.5%
Applied rewrites73.9%
if -8.00000000000000028e62 < z < 0.048000000000000001Initial program 92.8%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6495.3
Applied rewrites95.3%
Taylor expanded in y around inf
lower-/.f64N/A
lower--.f6484.8
Applied rewrites84.8%
Final simplification80.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (- t x) (/ y z)))))
(if (<= z -5.2e+62)
t_1
(if (<= z 0.0007) (fma (- t x) (/ y (- a z)) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((t - x) * (y / z));
double tmp;
if (z <= -5.2e+62) {
tmp = t_1;
} else if (z <= 0.0007) {
tmp = fma((t - x), (y / (a - z)), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(t - x) * Float64(y / z))) tmp = 0.0 if (z <= -5.2e+62) tmp = t_1; elseif (z <= 0.0007) tmp = fma(Float64(t - x), Float64(y / Float64(a - z)), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(t - x), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.2e+62], t$95$1, If[LessEqual[z, 0.0007], N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \left(t - x\right) \cdot \frac{y}{z}\\
\mathbf{if}\;z \leq -5.2 \cdot 10^{+62}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.0007:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.19999999999999968e62 or 6.99999999999999993e-4 < z Initial program 44.1%
Taylor expanded in z around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites60.7%
Taylor expanded in z around inf
Applied rewrites78.6%
Taylor expanded in y around inf
Applied rewrites69.0%
if -5.19999999999999968e62 < z < 6.99999999999999993e-4Initial program 92.8%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6495.3
Applied rewrites95.3%
Taylor expanded in y around inf
lower-/.f64N/A
lower--.f6484.8
Applied rewrites84.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- y z) (/ (- t x) a) x)))
(if (<= a -1.65e+14)
t_1
(if (<= a 7e-20) (fma (- y) (/ (- t x) z) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((y - z), ((t - x) / a), x);
double tmp;
if (a <= -1.65e+14) {
tmp = t_1;
} else if (a <= 7e-20) {
tmp = fma(-y, ((t - x) / z), t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(y - z), Float64(Float64(t - x) / a), x) tmp = 0.0 if (a <= -1.65e+14) tmp = t_1; elseif (a <= 7e-20) tmp = fma(Float64(-y), Float64(Float64(t - x) / z), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -1.65e+14], t$95$1, If[LessEqual[a, 7e-20], N[((-y) * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
\mathbf{if}\;a \leq -1.65 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 7 \cdot 10^{-20}:\\
\;\;\;\;\mathsf{fma}\left(-y, \frac{t - x}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.65e14 or 7.00000000000000007e-20 < a Initial program 74.4%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6476.1
Applied rewrites76.1%
if -1.65e14 < a < 7.00000000000000007e-20Initial program 68.9%
Taylor expanded in z around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites69.3%
Taylor expanded in a around 0
Applied rewrites78.2%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (- t (* (- t x) (/ y z))))) (if (<= z -7.5e-48) t_1 (if (<= z 0.00068) (fma (- t x) (/ y a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((t - x) * (y / z));
double tmp;
if (z <= -7.5e-48) {
tmp = t_1;
} else if (z <= 0.00068) {
tmp = fma((t - x), (y / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(t - x) * Float64(y / z))) tmp = 0.0 if (z <= -7.5e-48) tmp = t_1; elseif (z <= 0.00068) tmp = fma(Float64(t - x), Float64(y / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(t - x), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.5e-48], t$95$1, If[LessEqual[z, 0.00068], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \left(t - x\right) \cdot \frac{y}{z}\\
\mathbf{if}\;z \leq -7.5 \cdot 10^{-48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.00068:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.50000000000000042e-48 or 6.8e-4 < z Initial program 54.1%
Taylor expanded in z around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites58.6%
Taylor expanded in z around inf
Applied rewrites75.1%
Taylor expanded in y around inf
Applied rewrites66.9%
if -7.50000000000000042e-48 < z < 6.8e-4Initial program 92.8%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6495.8
Applied rewrites95.8%
Taylor expanded in z around 0
lower-/.f6479.4
Applied rewrites79.4%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.5e+41) (fma (- t x) (/ y a) x) (if (<= a 5.2e-34) (fma (- y) (/ (- t x) z) t) (fma (- y z) (/ t a) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.5e+41) {
tmp = fma((t - x), (y / a), x);
} else if (a <= 5.2e-34) {
tmp = fma(-y, ((t - x) / z), t);
} else {
tmp = fma((y - z), (t / a), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.5e+41) tmp = fma(Float64(t - x), Float64(y / a), x); elseif (a <= 5.2e-34) tmp = fma(Float64(-y), Float64(Float64(t - x) / z), t); else tmp = fma(Float64(y - z), Float64(t / a), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.5e+41], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 5.2e-34], N[((-y) * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.5 \cdot 10^{+41}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
\mathbf{elif}\;a \leq 5.2 \cdot 10^{-34}:\\
\;\;\;\;\mathsf{fma}\left(-y, \frac{t - x}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t}{a}, x\right)\\
\end{array}
\end{array}
if a < -1.4999999999999999e41Initial program 78.5%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6497.8
Applied rewrites97.8%
Taylor expanded in z around 0
lower-/.f6475.5
Applied rewrites75.5%
if -1.4999999999999999e41 < a < 5.1999999999999999e-34Initial program 68.4%
Taylor expanded in z around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites68.0%
Taylor expanded in a around 0
Applied rewrites75.9%
if 5.1999999999999999e-34 < a Initial program 73.0%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6473.5
Applied rewrites73.5%
Taylor expanded in t around inf
Applied rewrites66.9%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (- t (* x (/ y (- z)))))) (if (<= z -2.2e+62) t_1 (if (<= z 0.00068) (fma (- t x) (/ y a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - (x * (y / -z));
double tmp;
if (z <= -2.2e+62) {
tmp = t_1;
} else if (z <= 0.00068) {
tmp = fma((t - x), (y / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(t - Float64(x * Float64(y / Float64(-z)))) tmp = 0.0 if (z <= -2.2e+62) tmp = t_1; elseif (z <= 0.00068) tmp = fma(Float64(t - x), Float64(y / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(x * N[(y / (-z)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.2e+62], t$95$1, If[LessEqual[z, 0.00068], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - x \cdot \frac{y}{-z}\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{+62}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.00068:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.20000000000000015e62 or 6.8e-4 < z Initial program 44.1%
Taylor expanded in z around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites60.7%
Taylor expanded in z around inf
Applied rewrites78.6%
Taylor expanded in t around 0
Applied rewrites66.5%
Taylor expanded in y around inf
Applied rewrites65.3%
if -2.20000000000000015e62 < z < 6.8e-4Initial program 92.8%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6495.3
Applied rewrites95.3%
Taylor expanded in z around 0
lower-/.f6473.2
Applied rewrites73.2%
Final simplification69.9%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- y) (/ (- x) z) t))) (if (<= z -2.2e+62) t_1 (if (<= z 0.00068) (fma (- t x) (/ y a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(-y, (-x / z), t);
double tmp;
if (z <= -2.2e+62) {
tmp = t_1;
} else if (z <= 0.00068) {
tmp = fma((t - x), (y / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(-y), Float64(Float64(-x) / z), t) tmp = 0.0 if (z <= -2.2e+62) tmp = t_1; elseif (z <= 0.00068) tmp = fma(Float64(t - x), Float64(y / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-y) * N[((-x) / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -2.2e+62], t$95$1, If[LessEqual[z, 0.00068], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-y, \frac{-x}{z}, t\right)\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{+62}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.00068:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.20000000000000015e62 or 6.8e-4 < z Initial program 44.1%
Taylor expanded in z around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites60.7%
Taylor expanded in a around 0
Applied rewrites68.5%
Taylor expanded in t around 0
Applied rewrites64.9%
if -2.20000000000000015e62 < z < 6.8e-4Initial program 92.8%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6495.3
Applied rewrites95.3%
Taylor expanded in z around 0
lower-/.f6473.2
Applied rewrites73.2%
Final simplification69.7%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (- t (* a (/ x z))))) (if (<= z -1.86e+87) t_1 (if (<= z 0.0007) (fma (- t x) (/ y a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - (a * (x / z));
double tmp;
if (z <= -1.86e+87) {
tmp = t_1;
} else if (z <= 0.0007) {
tmp = fma((t - x), (y / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(t - Float64(a * Float64(x / z))) tmp = 0.0 if (z <= -1.86e+87) tmp = t_1; elseif (z <= 0.0007) tmp = fma(Float64(t - x), Float64(y / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(a * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.86e+87], t$95$1, If[LessEqual[z, 0.0007], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - a \cdot \frac{x}{z}\\
\mathbf{if}\;z \leq -1.86 \cdot 10^{+87}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.0007:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.86000000000000011e87 or 6.99999999999999993e-4 < z Initial program 43.0%
Taylor expanded in z around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites60.9%
Taylor expanded in z around inf
Applied rewrites78.9%
Taylor expanded in t around 0
Applied rewrites66.9%
Taylor expanded in y around 0
Applied rewrites58.2%
if -1.86000000000000011e87 < z < 6.99999999999999993e-4Initial program 91.3%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6494.2
Applied rewrites94.2%
Taylor expanded in z around 0
lower-/.f6471.9
Applied rewrites71.9%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (- t (* a (/ x z))))) (if (<= z -5.2e+62) t_1 (if (<= z 0.0007) (fma y (/ (- t x) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - (a * (x / z));
double tmp;
if (z <= -5.2e+62) {
tmp = t_1;
} else if (z <= 0.0007) {
tmp = fma(y, ((t - x) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(t - Float64(a * Float64(x / z))) tmp = 0.0 if (z <= -5.2e+62) tmp = t_1; elseif (z <= 0.0007) tmp = fma(y, Float64(Float64(t - x) / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(a * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.2e+62], t$95$1, If[LessEqual[z, 0.0007], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - a \cdot \frac{x}{z}\\
\mathbf{if}\;z \leq -5.2 \cdot 10^{+62}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.0007:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.19999999999999968e62 or 6.99999999999999993e-4 < z Initial program 44.1%
Taylor expanded in z around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites60.7%
Taylor expanded in z around inf
Applied rewrites78.6%
Taylor expanded in t around 0
Applied rewrites66.5%
Taylor expanded in y around 0
Applied rewrites56.9%
if -5.19999999999999968e62 < z < 6.99999999999999993e-4Initial program 92.8%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6472.2
Applied rewrites72.2%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (- t (* a (/ x z))))) (if (<= z -1.85e+87) t_1 (if (<= z 0.0007) (fma (- x) (/ y a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - (a * (x / z));
double tmp;
if (z <= -1.85e+87) {
tmp = t_1;
} else if (z <= 0.0007) {
tmp = fma(-x, (y / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(t - Float64(a * Float64(x / z))) tmp = 0.0 if (z <= -1.85e+87) tmp = t_1; elseif (z <= 0.0007) tmp = fma(Float64(-x), Float64(y / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(a * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.85e+87], t$95$1, If[LessEqual[z, 0.0007], N[((-x) * N[(y / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - a \cdot \frac{x}{z}\\
\mathbf{if}\;z \leq -1.85 \cdot 10^{+87}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.0007:\\
\;\;\;\;\mathsf{fma}\left(-x, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.85000000000000001e87 or 6.99999999999999993e-4 < z Initial program 43.0%
Taylor expanded in z around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites60.9%
Taylor expanded in z around inf
Applied rewrites78.9%
Taylor expanded in t around 0
Applied rewrites66.9%
Taylor expanded in y around 0
Applied rewrites58.2%
if -1.85000000000000001e87 < z < 6.99999999999999993e-4Initial program 91.3%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6494.2
Applied rewrites94.2%
Taylor expanded in z around 0
lower-/.f6471.9
Applied rewrites71.9%
Taylor expanded in t around 0
mul-1-negN/A
lower-neg.f6451.3
Applied rewrites51.3%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (- t (* a (/ x z))))) (if (<= z -2.35e+52) t_1 (if (<= z 2.5e-97) (/ (* y (- t x)) a) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - (a * (x / z));
double tmp;
if (z <= -2.35e+52) {
tmp = t_1;
} else if (z <= 2.5e-97) {
tmp = (y * (t - x)) / a;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t - (a * (x / z))
if (z <= (-2.35d+52)) then
tmp = t_1
else if (z <= 2.5d-97) then
tmp = (y * (t - x)) / a
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t - (a * (x / z));
double tmp;
if (z <= -2.35e+52) {
tmp = t_1;
} else if (z <= 2.5e-97) {
tmp = (y * (t - x)) / a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - (a * (x / z)) tmp = 0 if z <= -2.35e+52: tmp = t_1 elif z <= 2.5e-97: tmp = (y * (t - x)) / a else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(a * Float64(x / z))) tmp = 0.0 if (z <= -2.35e+52) tmp = t_1; elseif (z <= 2.5e-97) tmp = Float64(Float64(y * Float64(t - x)) / a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - (a * (x / z)); tmp = 0.0; if (z <= -2.35e+52) tmp = t_1; elseif (z <= 2.5e-97) tmp = (y * (t - x)) / a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(a * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.35e+52], t$95$1, If[LessEqual[z, 2.5e-97], N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - a \cdot \frac{x}{z}\\
\mathbf{if}\;z \leq -2.35 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-97}:\\
\;\;\;\;\frac{y \cdot \left(t - x\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.35e52 or 2.4999999999999998e-97 < z Initial program 48.6%
Taylor expanded in z around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites59.0%
Taylor expanded in z around inf
Applied rewrites74.8%
Taylor expanded in t around 0
Applied rewrites62.6%
Taylor expanded in y around 0
Applied rewrites52.5%
if -2.35e52 < z < 2.4999999999999998e-97Initial program 94.1%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6479.9
Applied rewrites79.9%
Taylor expanded in y around inf
Applied rewrites42.1%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- y) (/ t z) t))) (if (<= z -5.2e-54) t_1 (if (<= z 2e-120) (/ (* y (- t x)) a) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(-y, (t / z), t);
double tmp;
if (z <= -5.2e-54) {
tmp = t_1;
} else if (z <= 2e-120) {
tmp = (y * (t - x)) / a;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(-y), Float64(t / z), t) tmp = 0.0 if (z <= -5.2e-54) tmp = t_1; elseif (z <= 2e-120) tmp = Float64(Float64(y * Float64(t - x)) / a); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-y) * N[(t / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -5.2e-54], t$95$1, If[LessEqual[z, 2e-120], N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-y, \frac{t}{z}, t\right)\\
\mathbf{if}\;z \leq -5.2 \cdot 10^{-54}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-120}:\\
\;\;\;\;\frac{y \cdot \left(t - x\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.20000000000000004e-54 or 1.99999999999999996e-120 < z Initial program 57.6%
Taylor expanded in z around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites56.7%
Taylor expanded in a around 0
Applied rewrites63.7%
Taylor expanded in t around inf
Applied rewrites46.7%
if -5.20000000000000004e-54 < z < 1.99999999999999996e-120Initial program 94.3%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6488.0
Applied rewrites88.0%
Taylor expanded in y around inf
Applied rewrites45.7%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma t (/ y (- z)) t))) (if (<= z -5.2e-54) t_1 (if (<= z 6.8e-102) (/ (* y (- t x)) a) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(t, (y / -z), t);
double tmp;
if (z <= -5.2e-54) {
tmp = t_1;
} else if (z <= 6.8e-102) {
tmp = (y * (t - x)) / a;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(t, Float64(y / Float64(-z)), t) tmp = 0.0 if (z <= -5.2e-54) tmp = t_1; elseif (z <= 6.8e-102) tmp = Float64(Float64(y * Float64(t - x)) / a); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / (-z)), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -5.2e-54], t$95$1, If[LessEqual[z, 6.8e-102], N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(t, \frac{y}{-z}, t\right)\\
\mathbf{if}\;z \leq -5.2 \cdot 10^{-54}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{-102}:\\
\;\;\;\;\frac{y \cdot \left(t - x\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.20000000000000004e-54 or 6.80000000000000026e-102 < z Initial program 56.2%
Taylor expanded in z around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites56.9%
Taylor expanded in a around 0
Applied rewrites64.3%
Taylor expanded in t around inf
Applied rewrites47.3%
if -5.20000000000000004e-54 < z < 6.80000000000000026e-102Initial program 94.5%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6485.9
Applied rewrites85.9%
Taylor expanded in y around inf
Applied rewrites44.6%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ x (- t x)))) (if (<= z -6.5e+92) t_1 (if (<= z 4.7e-48) (/ (* y (- t x)) a) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t - x);
double tmp;
if (z <= -6.5e+92) {
tmp = t_1;
} else if (z <= 4.7e-48) {
tmp = (y * (t - x)) / a;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (t - x)
if (z <= (-6.5d+92)) then
tmp = t_1
else if (z <= 4.7d-48) then
tmp = (y * (t - x)) / a
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t - x);
double tmp;
if (z <= -6.5e+92) {
tmp = t_1;
} else if (z <= 4.7e-48) {
tmp = (y * (t - x)) / a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t - x) tmp = 0 if z <= -6.5e+92: tmp = t_1 elif z <= 4.7e-48: tmp = (y * (t - x)) / a else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t - x)) tmp = 0.0 if (z <= -6.5e+92) tmp = t_1; elseif (z <= 4.7e-48) tmp = Float64(Float64(y * Float64(t - x)) / a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t - x); tmp = 0.0; if (z <= -6.5e+92) tmp = t_1; elseif (z <= 4.7e-48) tmp = (y * (t - x)) / a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.5e+92], t$95$1, If[LessEqual[z, 4.7e-48], N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(t - x\right)\\
\mathbf{if}\;z \leq -6.5 \cdot 10^{+92}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{-48}:\\
\;\;\;\;\frac{y \cdot \left(t - x\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.49999999999999999e92 or 4.6999999999999998e-48 < z Initial program 44.0%
Taylor expanded in z around inf
lower--.f6441.6
Applied rewrites41.6%
if -6.49999999999999999e92 < z < 4.6999999999999998e-48Initial program 91.9%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6474.5
Applied rewrites74.5%
Taylor expanded in y around inf
Applied rewrites38.7%
(FPCore (x y z t a) :precision binary64 (if (<= x -1.15e+76) (* x (/ y z)) (if (<= x 2.3e+94) (+ x (- t x)) (* y (/ x z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.15e+76) {
tmp = x * (y / z);
} else if (x <= 2.3e+94) {
tmp = x + (t - x);
} else {
tmp = y * (x / z);
}
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 (x <= (-1.15d+76)) then
tmp = x * (y / z)
else if (x <= 2.3d+94) then
tmp = x + (t - x)
else
tmp = y * (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.15e+76) {
tmp = x * (y / z);
} else if (x <= 2.3e+94) {
tmp = x + (t - x);
} else {
tmp = y * (x / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.15e+76: tmp = x * (y / z) elif x <= 2.3e+94: tmp = x + (t - x) else: tmp = y * (x / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.15e+76) tmp = Float64(x * Float64(y / z)); elseif (x <= 2.3e+94) tmp = Float64(x + Float64(t - x)); else tmp = Float64(y * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -1.15e+76) tmp = x * (y / z); elseif (x <= 2.3e+94) tmp = x + (t - x); else tmp = y * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.15e+76], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.3e+94], N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.15 \cdot 10^{+76}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;x \leq 2.3 \cdot 10^{+94}:\\
\;\;\;\;x + \left(t - x\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\end{array}
\end{array}
if x < -1.15000000000000001e76Initial program 59.5%
Taylor expanded in z around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites27.4%
Taylor expanded in a around 0
Applied rewrites38.0%
Taylor expanded in t around 0
Applied rewrites25.3%
Applied rewrites33.6%
if -1.15000000000000001e76 < x < 2.3e94Initial program 78.5%
Taylor expanded in z around inf
lower--.f6428.6
Applied rewrites28.6%
if 2.3e94 < x Initial program 59.4%
Taylor expanded in z around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites29.5%
Taylor expanded in a around 0
Applied rewrites46.0%
Taylor expanded in t around 0
Applied rewrites30.3%
Applied rewrites32.5%
Final simplification30.1%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* y (/ x z)))) (if (<= x -1.15e+76) t_1 (if (<= x 2.3e+94) (+ x (- t x)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (x / z);
double tmp;
if (x <= -1.15e+76) {
tmp = t_1;
} else if (x <= 2.3e+94) {
tmp = x + (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 = y * (x / z)
if (x <= (-1.15d+76)) then
tmp = t_1
else if (x <= 2.3d+94) then
tmp = x + (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 = y * (x / z);
double tmp;
if (x <= -1.15e+76) {
tmp = t_1;
} else if (x <= 2.3e+94) {
tmp = x + (t - x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (x / z) tmp = 0 if x <= -1.15e+76: tmp = t_1 elif x <= 2.3e+94: tmp = x + (t - x) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(x / z)) tmp = 0.0 if (x <= -1.15e+76) tmp = t_1; elseif (x <= 2.3e+94) tmp = Float64(x + Float64(t - x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (x / z); tmp = 0.0; if (x <= -1.15e+76) tmp = t_1; elseif (x <= 2.3e+94) tmp = x + (t - x); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.15e+76], t$95$1, If[LessEqual[x, 2.3e+94], N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{x}{z}\\
\mathbf{if}\;x \leq -1.15 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.3 \cdot 10^{+94}:\\
\;\;\;\;x + \left(t - x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.15000000000000001e76 or 2.3e94 < x Initial program 59.4%
Taylor expanded in z around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites28.4%
Taylor expanded in a around 0
Applied rewrites41.8%
Taylor expanded in t around 0
Applied rewrites27.7%
Applied rewrites32.8%
if -1.15000000000000001e76 < x < 2.3e94Initial program 78.5%
Taylor expanded in z around inf
lower--.f6428.6
Applied rewrites28.6%
(FPCore (x y z t a) :precision binary64 (+ x (- t x)))
double code(double x, double y, double z, double t, double a) {
return x + (t - x);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (t - x)
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (t - x);
}
def code(x, y, z, t, a): return x + (t - x)
function code(x, y, z, t, a) return Float64(x + Float64(t - x)) end
function tmp = code(x, y, z, t, a) tmp = x + (t - x); end
code[x_, y_, z_, t_, a_] := N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(t - x\right)
\end{array}
Initial program 72.1%
Taylor expanded in z around inf
lower--.f6421.2
Applied rewrites21.2%
(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(x + Float64(-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}
\\
x + \left(-x\right)
\end{array}
Initial program 72.1%
Taylor expanded in z around inf
lower--.f6421.2
Applied rewrites21.2%
Taylor expanded in t around 0
Applied rewrites2.7%
(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 2024221
(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))))