
(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 16 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
(if (<= z -4e+202)
(fma (- x t) (/ (- y a) z) t)
(if (<= z 8.2e+117)
(- x (/ (- z y) (/ (- z a) (- x t))))
(- (fma (* (/ (- a y) z) (- t x)) (/ a z) t) (* (- a y) (/ (- x t) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4e+202) {
tmp = fma((x - t), ((y - a) / z), t);
} else if (z <= 8.2e+117) {
tmp = x - ((z - y) / ((z - a) / (x - t)));
} else {
tmp = fma((((a - y) / z) * (t - x)), (a / z), t) - ((a - y) * ((x - t) / z));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4e+202) tmp = fma(Float64(x - t), Float64(Float64(y - a) / z), t); elseif (z <= 8.2e+117) tmp = Float64(x - Float64(Float64(z - y) / Float64(Float64(z - a) / Float64(x - t)))); else tmp = Float64(fma(Float64(Float64(Float64(a - y) / z) * Float64(t - x)), Float64(a / z), t) - Float64(Float64(a - y) * Float64(Float64(x - t) / z))); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4e+202], N[(N[(x - t), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 8.2e+117], N[(x - N[(N[(z - y), $MachinePrecision] / N[(N[(z - a), $MachinePrecision] / N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] * N[(a / z), $MachinePrecision] + t), $MachinePrecision] - N[(N[(a - y), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+202}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y - a}{z}, t\right)\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{+117}:\\
\;\;\;\;x - \frac{z - y}{\frac{z - a}{x - t}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{a - y}{z} \cdot \left(t - x\right), \frac{a}{z}, t\right) - \left(a - y\right) \cdot \frac{x - t}{z}\\
\end{array}
\end{array}
if z < -3.9999999999999996e202Initial program 23.0%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6435.4
Applied rewrites35.4%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
distribute-rgt-out--N/A
+-commutativeN/A
mul-1-negN/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--.f6499.6
Applied rewrites99.6%
if -3.9999999999999996e202 < z < 8.1999999999999999e117Initial program 82.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6490.0
Applied rewrites90.0%
if 8.1999999999999999e117 < z Initial program 32.9%
Taylor expanded in z around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites70.6%
Taylor expanded in z around inf
Applied rewrites91.9%
Final simplification91.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -4e+202)
(fma (- x t) (/ (- y a) z) t)
(if (<= z 7e+117)
(- x (/ (- z y) (/ (- z a) (- x t))))
(- t (* (- a y) (/ (- x t) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4e+202) {
tmp = fma((x - t), ((y - a) / z), t);
} else if (z <= 7e+117) {
tmp = x - ((z - y) / ((z - a) / (x - t)));
} else {
tmp = t - ((a - y) * ((x - t) / z));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4e+202) tmp = fma(Float64(x - t), Float64(Float64(y - a) / z), t); elseif (z <= 7e+117) tmp = Float64(x - Float64(Float64(z - y) / Float64(Float64(z - a) / Float64(x - t)))); else tmp = Float64(t - Float64(Float64(a - y) * Float64(Float64(x - t) / z))); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4e+202], N[(N[(x - t), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 7e+117], N[(x - N[(N[(z - y), $MachinePrecision] / N[(N[(z - a), $MachinePrecision] / N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t - N[(N[(a - y), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+202}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y - a}{z}, t\right)\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+117}:\\
\;\;\;\;x - \frac{z - y}{\frac{z - a}{x - t}}\\
\mathbf{else}:\\
\;\;\;\;t - \left(a - y\right) \cdot \frac{x - t}{z}\\
\end{array}
\end{array}
if z < -3.9999999999999996e202Initial program 23.0%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6435.4
Applied rewrites35.4%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
distribute-rgt-out--N/A
+-commutativeN/A
mul-1-negN/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--.f6499.6
Applied rewrites99.6%
if -3.9999999999999996e202 < z < 6.99999999999999965e117Initial program 82.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6490.0
Applied rewrites90.0%
if 6.99999999999999965e117 < z Initial program 32.9%
Taylor expanded in z around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites70.6%
Taylor expanded in z around inf
Applied rewrites91.9%
Final simplification91.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- x t) y) z)) (t_2 (fma a (/ t z) t)))
(if (<= z -3.6e+182)
t_2
(if (<= z -1.5e-131)
t_1
(if (<= z 6.4e-198) (* (/ y a) t) (if (<= z 2.9e+31) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((x - t) * y) / z;
double t_2 = fma(a, (t / z), t);
double tmp;
if (z <= -3.6e+182) {
tmp = t_2;
} else if (z <= -1.5e-131) {
tmp = t_1;
} else if (z <= 6.4e-198) {
tmp = (y / a) * t;
} else if (z <= 2.9e+31) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(x - t) * y) / z) t_2 = fma(a, Float64(t / z), t) tmp = 0.0 if (z <= -3.6e+182) tmp = t_2; elseif (z <= -1.5e-131) tmp = t_1; elseif (z <= 6.4e-198) tmp = Float64(Float64(y / a) * t); elseif (z <= 2.9e+31) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - t), $MachinePrecision] * y), $MachinePrecision] / z), $MachinePrecision]}, Block[{t$95$2 = N[(a * N[(t / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -3.6e+182], t$95$2, If[LessEqual[z, -1.5e-131], t$95$1, If[LessEqual[z, 6.4e-198], N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 2.9e+31], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(x - t\right) \cdot y}{z}\\
t_2 := \mathsf{fma}\left(a, \frac{t}{z}, t\right)\\
\mathbf{if}\;z \leq -3.6 \cdot 10^{+182}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.5 \cdot 10^{-131}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.4 \cdot 10^{-198}:\\
\;\;\;\;\frac{y}{a} \cdot t\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -3.6e182 or 2.9e31 < z Initial program 35.3%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6450.6
Applied rewrites50.6%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6441.8
Applied rewrites41.8%
Taylor expanded in y around 0
Applied rewrites58.5%
Taylor expanded in a around 0
Applied rewrites55.3%
if -3.6e182 < z < -1.49999999999999998e-131 or 6.39999999999999989e-198 < z < 2.9e31Initial program 80.2%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6486.6
Applied rewrites86.6%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
distribute-rgt-out--N/A
+-commutativeN/A
mul-1-negN/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--.f6448.3
Applied rewrites48.3%
Taylor expanded in y around inf
Applied rewrites35.5%
if -1.49999999999999998e-131 < z < 6.39999999999999989e-198Initial program 95.8%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6496.6
Applied rewrites96.6%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6441.5
Applied rewrites41.5%
Taylor expanded in z around 0
Applied rewrites40.0%
Applied rewrites45.4%
Final simplification44.6%
(FPCore (x y z t a)
:precision binary64
(if (<= z -4e+82)
(fma (- x t) (/ (- y a) z) t)
(if (<= z 1.2e+59)
(- x (/ (* (- z y) (- x t)) (- z a)))
(- t (* (- a y) (/ (- x t) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4e+82) {
tmp = fma((x - t), ((y - a) / z), t);
} else if (z <= 1.2e+59) {
tmp = x - (((z - y) * (x - t)) / (z - a));
} else {
tmp = t - ((a - y) * ((x - t) / z));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4e+82) tmp = fma(Float64(x - t), Float64(Float64(y - a) / z), t); elseif (z <= 1.2e+59) tmp = Float64(x - Float64(Float64(Float64(z - y) * Float64(x - t)) / Float64(z - a))); else tmp = Float64(t - Float64(Float64(a - y) * Float64(Float64(x - t) / z))); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4e+82], N[(N[(x - t), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 1.2e+59], N[(x - N[(N[(N[(z - y), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t - N[(N[(a - y), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+82}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y - a}{z}, t\right)\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+59}:\\
\;\;\;\;x - \frac{\left(z - y\right) \cdot \left(x - t\right)}{z - a}\\
\mathbf{else}:\\
\;\;\;\;t - \left(a - y\right) \cdot \frac{x - t}{z}\\
\end{array}
\end{array}
if z < -3.9999999999999999e82Initial program 34.3%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6458.9
Applied rewrites58.9%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
distribute-rgt-out--N/A
+-commutativeN/A
mul-1-negN/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--.f6487.8
Applied rewrites87.8%
if -3.9999999999999999e82 < z < 1.2000000000000001e59Initial program 89.4%
if 1.2000000000000001e59 < z Initial program 38.6%
Taylor expanded in z around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites70.0%
Taylor expanded in z around inf
Applied rewrites88.7%
Final simplification89.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma a (/ t z) t)))
(if (<= z -3.6e+182)
t_1
(if (<= z -1.55e-131)
(/ (* (- x t) y) z)
(if (<= z 2.2e+31) (* (/ y (- a z)) t) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(a, (t / z), t);
double tmp;
if (z <= -3.6e+182) {
tmp = t_1;
} else if (z <= -1.55e-131) {
tmp = ((x - t) * y) / z;
} else if (z <= 2.2e+31) {
tmp = (y / (a - z)) * t;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(a, Float64(t / z), t) tmp = 0.0 if (z <= -3.6e+182) tmp = t_1; elseif (z <= -1.55e-131) tmp = Float64(Float64(Float64(x - t) * y) / z); elseif (z <= 2.2e+31) tmp = Float64(Float64(y / Float64(a - z)) * t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a * N[(t / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -3.6e+182], t$95$1, If[LessEqual[z, -1.55e-131], N[(N[(N[(x - t), $MachinePrecision] * y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 2.2e+31], N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, \frac{t}{z}, t\right)\\
\mathbf{if}\;z \leq -3.6 \cdot 10^{+182}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{-131}:\\
\;\;\;\;\frac{\left(x - t\right) \cdot y}{z}\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{+31}:\\
\;\;\;\;\frac{y}{a - z} \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.6e182 or 2.2000000000000001e31 < z Initial program 35.3%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6450.6
Applied rewrites50.6%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6441.8
Applied rewrites41.8%
Taylor expanded in y around 0
Applied rewrites58.5%
Taylor expanded in a around 0
Applied rewrites55.3%
if -3.6e182 < z < -1.5500000000000001e-131Initial program 71.2%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6479.8
Applied rewrites79.8%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
distribute-rgt-out--N/A
+-commutativeN/A
mul-1-negN/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--.f6453.6
Applied rewrites53.6%
Taylor expanded in y around inf
Applied rewrites34.8%
if -1.5500000000000001e-131 < z < 2.2000000000000001e31Initial program 93.7%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6495.8
Applied rewrites95.8%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6440.1
Applied rewrites40.1%
Taylor expanded in y around inf
Applied rewrites39.3%
Final simplification43.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -5.5e-81)
(fma (- x t) (/ (- y a) z) t)
(if (<= z 1.9e+56)
(fma (/ (- t x) a) y x)
(- t (* (- a y) (/ (- x t) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.5e-81) {
tmp = fma((x - t), ((y - a) / z), t);
} else if (z <= 1.9e+56) {
tmp = fma(((t - x) / a), y, x);
} else {
tmp = t - ((a - y) * ((x - t) / z));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.5e-81) tmp = fma(Float64(x - t), Float64(Float64(y - a) / z), t); elseif (z <= 1.9e+56) tmp = fma(Float64(Float64(t - x) / a), y, x); else tmp = Float64(t - Float64(Float64(a - y) * Float64(Float64(x - t) / z))); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.5e-81], N[(N[(x - t), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 1.9e+56], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision], N[(t - N[(N[(a - y), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{-81}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y - a}{z}, t\right)\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+56}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;t - \left(a - y\right) \cdot \frac{x - t}{z}\\
\end{array}
\end{array}
if z < -5.50000000000000026e-81Initial program 46.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6463.8
Applied rewrites63.8%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
distribute-rgt-out--N/A
+-commutativeN/A
mul-1-negN/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.3
Applied rewrites76.3%
if -5.50000000000000026e-81 < z < 1.89999999999999998e56Initial program 93.7%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6480.1
Applied rewrites80.1%
if 1.89999999999999998e56 < z Initial program 38.6%
Taylor expanded in z around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites70.0%
Taylor expanded in z around inf
Applied rewrites88.7%
Final simplification81.2%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (- t (* (- a y) (/ (- x t) z))))) (if (<= z -7.4e-81) t_1 (if (<= z 1.9e+56) (fma (/ (- t x) a) y x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((a - y) * ((x - t) / z));
double tmp;
if (z <= -7.4e-81) {
tmp = t_1;
} else if (z <= 1.9e+56) {
tmp = fma(((t - x) / a), y, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(a - y) * Float64(Float64(x - t) / z))) tmp = 0.0 if (z <= -7.4e-81) tmp = t_1; elseif (z <= 1.9e+56) 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[(t - N[(N[(a - y), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.4e-81], t$95$1, If[LessEqual[z, 1.9e+56], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \left(a - y\right) \cdot \frac{x - t}{z}\\
\mathbf{if}\;z \leq -7.4 \cdot 10^{-81}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+56}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.39999999999999971e-81 or 1.89999999999999998e56 < z Initial program 42.8%
Taylor expanded in z around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites63.3%
Taylor expanded in z around inf
Applied rewrites80.9%
if -7.39999999999999971e-81 < z < 1.89999999999999998e56Initial program 93.7%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6480.1
Applied rewrites80.1%
Final simplification80.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.15e+231)
(* -1.0 (- t))
(if (<= z -1.6e-51)
(* (/ (- y a) z) x)
(if (<= z 1.2e+25) (* (/ y a) t) (fma a (/ t z) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.15e+231) {
tmp = -1.0 * -t;
} else if (z <= -1.6e-51) {
tmp = ((y - a) / z) * x;
} else if (z <= 1.2e+25) {
tmp = (y / a) * t;
} else {
tmp = fma(a, (t / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.15e+231) tmp = Float64(-1.0 * Float64(-t)); elseif (z <= -1.6e-51) tmp = Float64(Float64(Float64(y - a) / z) * x); elseif (z <= 1.2e+25) tmp = Float64(Float64(y / a) * t); else tmp = fma(a, Float64(t / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.15e+231], N[(-1.0 * (-t)), $MachinePrecision], If[LessEqual[z, -1.6e-51], N[(N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[z, 1.2e+25], N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision], N[(a * N[(t / z), $MachinePrecision] + t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.15 \cdot 10^{+231}:\\
\;\;\;\;-1 \cdot \left(-t\right)\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{-51}:\\
\;\;\;\;\frac{y - a}{z} \cdot x\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+25}:\\
\;\;\;\;\frac{y}{a} \cdot t\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\
\end{array}
\end{array}
if z < -2.14999999999999988e231Initial program 26.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6439.3
Applied rewrites39.3%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6439.0
Applied rewrites39.0%
Taylor expanded in y around 0
Applied rewrites66.2%
Taylor expanded in a around 0
Applied rewrites66.2%
if -2.14999999999999988e231 < z < -1.6e-51Initial program 52.9%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6475.2
Applied rewrites75.2%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
distribute-rgt-out--N/A
+-commutativeN/A
mul-1-negN/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--.f6469.0
Applied rewrites69.0%
Taylor expanded in t around 0
Applied rewrites38.0%
if -1.6e-51 < z < 1.19999999999999998e25Initial program 93.1%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6493.6
Applied rewrites93.6%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6438.5
Applied rewrites38.5%
Taylor expanded in z around 0
Applied rewrites29.5%
Applied rewrites34.2%
if 1.19999999999999998e25 < z Initial program 42.3%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6454.4
Applied rewrites54.4%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6445.9
Applied rewrites45.9%
Taylor expanded in y around 0
Applied rewrites58.4%
Taylor expanded in a around 0
Applied rewrites54.1%
Final simplification42.2%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ (- x t) z) y t))) (if (<= z -7.1e-81) t_1 (if (<= z 1.9e+56) (fma (/ (- t x) a) y x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((x - t) / z), y, t);
double tmp;
if (z <= -7.1e-81) {
tmp = t_1;
} else if (z <= 1.9e+56) {
tmp = fma(((t - x) / a), y, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(x - t) / z), y, t) tmp = 0.0 if (z <= -7.1e-81) tmp = t_1; elseif (z <= 1.9e+56) 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[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y + t), $MachinePrecision]}, If[LessEqual[z, -7.1e-81], t$95$1, If[LessEqual[z, 1.9e+56], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x - t}{z}, y, t\right)\\
\mathbf{if}\;z \leq -7.1 \cdot 10^{-81}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+56}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.10000000000000019e-81 or 1.89999999999999998e56 < z Initial program 42.8%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6457.3
Applied rewrites57.3%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
distribute-rgt-out--N/A
+-commutativeN/A
mul-1-negN/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--.f6480.8
Applied rewrites80.8%
Taylor expanded in a around 0
Applied rewrites73.9%
if -7.10000000000000019e-81 < z < 1.89999999999999998e56Initial program 93.7%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6480.1
Applied rewrites80.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.25e+97) (fma a (/ t z) t) (if (<= z 1.7e+60) (fma (/ (- t x) a) y x) (* -1.0 (- t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.25e+97) {
tmp = fma(a, (t / z), t);
} else if (z <= 1.7e+60) {
tmp = fma(((t - x) / a), y, x);
} else {
tmp = -1.0 * -t;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.25e+97) tmp = fma(a, Float64(t / z), t); elseif (z <= 1.7e+60) tmp = fma(Float64(Float64(t - x) / a), y, x); else tmp = Float64(-1.0 * Float64(-t)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.25e+97], N[(a * N[(t / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 1.7e+60], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision], N[(-1.0 * (-t)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{+97}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{+60}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;-1 \cdot \left(-t\right)\\
\end{array}
\end{array}
if z < -1.25e97Initial program 30.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6455.9
Applied rewrites55.9%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6433.9
Applied rewrites33.9%
Taylor expanded in y around 0
Applied rewrites49.3%
Taylor expanded in a around 0
Applied rewrites46.8%
if -1.25e97 < z < 1.7e60Initial program 88.5%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6472.8
Applied rewrites72.8%
if 1.7e60 < z Initial program 38.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6450.3
Applied rewrites50.3%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6447.3
Applied rewrites47.3%
Taylor expanded in y around 0
Applied rewrites62.3%
Taylor expanded in a around 0
Applied rewrites57.5%
Final simplification65.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -4e+96) (fma a (/ t z) t) (if (<= z 7e+56) (+ (/ (* t y) a) x) (* -1.0 (- t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4e+96) {
tmp = fma(a, (t / z), t);
} else if (z <= 7e+56) {
tmp = ((t * y) / a) + x;
} else {
tmp = -1.0 * -t;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4e+96) tmp = fma(a, Float64(t / z), t); elseif (z <= 7e+56) tmp = Float64(Float64(Float64(t * y) / a) + x); else tmp = Float64(-1.0 * Float64(-t)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4e+96], N[(a * N[(t / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 7e+56], N[(N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], N[(-1.0 * (-t)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+96}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+56}:\\
\;\;\;\;\frac{t \cdot y}{a} + x\\
\mathbf{else}:\\
\;\;\;\;-1 \cdot \left(-t\right)\\
\end{array}
\end{array}
if z < -4.0000000000000002e96Initial program 30.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6455.9
Applied rewrites55.9%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6433.9
Applied rewrites33.9%
Taylor expanded in y around 0
Applied rewrites49.3%
Taylor expanded in a around 0
Applied rewrites46.8%
if -4.0000000000000002e96 < z < 6.99999999999999999e56Initial program 88.5%
Taylor expanded in z around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f6469.0
Applied rewrites69.0%
Taylor expanded in t around inf
Applied rewrites54.9%
if 6.99999999999999999e56 < z Initial program 38.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6450.3
Applied rewrites50.3%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6447.3
Applied rewrites47.3%
Taylor expanded in y around 0
Applied rewrites62.3%
Taylor expanded in a around 0
Applied rewrites57.5%
Final simplification54.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.5e-81) (* -1.0 (- t)) (if (<= z 1.2e+25) (* (/ y a) t) (fma a (/ t z) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.5e-81) {
tmp = -1.0 * -t;
} else if (z <= 1.2e+25) {
tmp = (y / a) * t;
} else {
tmp = fma(a, (t / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.5e-81) tmp = Float64(-1.0 * Float64(-t)); elseif (z <= 1.2e+25) tmp = Float64(Float64(y / a) * t); else tmp = fma(a, Float64(t / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.5e-81], N[(-1.0 * (-t)), $MachinePrecision], If[LessEqual[z, 1.2e+25], N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision], N[(a * N[(t / z), $MachinePrecision] + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{-81}:\\
\;\;\;\;-1 \cdot \left(-t\right)\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+25}:\\
\;\;\;\;\frac{y}{a} \cdot t\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\
\end{array}
\end{array}
if z < -1.4999999999999999e-81Initial program 47.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6464.3
Applied rewrites64.3%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6437.0
Applied rewrites37.0%
Taylor expanded in y around 0
Applied rewrites38.2%
Taylor expanded in a around 0
Applied rewrites35.1%
if -1.4999999999999999e-81 < z < 1.19999999999999998e25Initial program 94.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6495.5
Applied rewrites95.5%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6437.8
Applied rewrites37.8%
Taylor expanded in z around 0
Applied rewrites30.0%
Applied rewrites35.0%
if 1.19999999999999998e25 < z Initial program 42.3%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6454.4
Applied rewrites54.4%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6445.9
Applied rewrites45.9%
Taylor expanded in y around 0
Applied rewrites58.4%
Taylor expanded in a around 0
Applied rewrites54.1%
Final simplification40.0%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* -1.0 (- t)))) (if (<= z -1.5e-81) t_1 (if (<= z 2.6e+31) (* (/ 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 <= -1.5e-81) {
tmp = t_1;
} else if (z <= 2.6e+31) {
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 <= (-1.5d-81)) then
tmp = t_1
else if (z <= 2.6d+31) 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 <= -1.5e-81) {
tmp = t_1;
} else if (z <= 2.6e+31) {
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 <= -1.5e-81: tmp = t_1 elif z <= 2.6e+31: 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 <= -1.5e-81) tmp = t_1; elseif (z <= 2.6e+31) 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 <= -1.5e-81) tmp = t_1; elseif (z <= 2.6e+31) 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, -1.5e-81], t$95$1, If[LessEqual[z, 2.6e+31], 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 -1.5 \cdot 10^{-81}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+31}:\\
\;\;\;\;\frac{y}{a} \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.4999999999999999e-81 or 2.6e31 < z Initial program 44.0%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6458.7
Applied rewrites58.7%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6441.5
Applied rewrites41.5%
Taylor expanded in y around 0
Applied rewrites49.0%
Taylor expanded in a around 0
Applied rewrites45.2%
if -1.4999999999999999e-81 < z < 2.6e31Initial program 94.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6495.6
Applied rewrites95.6%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6437.8
Applied rewrites37.8%
Taylor expanded in z around 0
Applied rewrites29.5%
Applied rewrites34.4%
Final simplification40.0%
(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 68.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6476.6
Applied rewrites76.6%
Taylor expanded in t around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6439.7
Applied rewrites39.7%
Taylor expanded in y around 0
Applied rewrites27.9%
Taylor expanded in a around 0
Applied rewrites25.9%
Final simplification25.9%
(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 68.5%
Taylor expanded in z around inf
lower--.f6418.7
Applied rewrites18.7%
Final simplification18.7%
(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 68.5%
Taylor expanded in z around inf
lower--.f6418.7
Applied rewrites18.7%
Taylor expanded in t around 0
Applied rewrites2.9%
Final simplification2.9%
(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 2024270
(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))))