
(FPCore (x y z t a) :precision binary64 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
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 - z) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a): return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))) end
function tmp = code(x, y, z, t, a) tmp = x - ((y - z) / (((t - z) + 1.0) / a)); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 10 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
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 - z) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a): return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))) end
function tmp = code(x, y, z, t, a) tmp = x - ((y - z) / (((t - z) + 1.0) / a)); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
\end{array}
(FPCore (x y z t a) :precision binary64 (fma (- y z) (/ a (+ -1.0 (- z t))) x))
double code(double x, double y, double z, double t, double a) {
return fma((y - z), (a / (-1.0 + (z - t))), x);
}
function code(x, y, z, t, a) return fma(Float64(y - z), Float64(a / Float64(-1.0 + Float64(z - t))), x) end
code[x_, y_, z_, t_, a_] := N[(N[(y - z), $MachinePrecision] * N[(a / N[(-1.0 + N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y - z, \frac{a}{-1 + \left(z - t\right)}, x\right)
\end{array}
Initial program 97.3%
sub-neg97.3%
+-commutative97.3%
associate-/r/99.9%
distribute-rgt-neg-in99.9%
associate-*l/84.5%
associate-/l*97.5%
fma-define97.5%
distribute-frac-neg97.5%
distribute-neg-frac297.5%
distribute-neg-in97.5%
sub-neg97.5%
distribute-neg-in97.5%
remove-double-neg97.5%
+-commutative97.5%
sub-neg97.5%
metadata-eval97.5%
Simplified97.5%
Final simplification97.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* a (/ y t)))))
(if (<= t -8.6e-13)
t_1
(if (<= t 8.6e-269) (- x (* y a)) (if (<= t 6000.0) (- x a) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (a * (y / t));
double tmp;
if (t <= -8.6e-13) {
tmp = t_1;
} else if (t <= 8.6e-269) {
tmp = x - (y * a);
} else if (t <= 6000.0) {
tmp = 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 - (a * (y / t))
if (t <= (-8.6d-13)) then
tmp = t_1
else if (t <= 8.6d-269) then
tmp = x - (y * a)
else if (t <= 6000.0d0) then
tmp = 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 - (a * (y / t));
double tmp;
if (t <= -8.6e-13) {
tmp = t_1;
} else if (t <= 8.6e-269) {
tmp = x - (y * a);
} else if (t <= 6000.0) {
tmp = x - a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (a * (y / t)) tmp = 0 if t <= -8.6e-13: tmp = t_1 elif t <= 8.6e-269: tmp = x - (y * a) elif t <= 6000.0: tmp = x - a else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(a * Float64(y / t))) tmp = 0.0 if (t <= -8.6e-13) tmp = t_1; elseif (t <= 8.6e-269) tmp = Float64(x - Float64(y * a)); elseif (t <= 6000.0) tmp = Float64(x - a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (a * (y / t)); tmp = 0.0; if (t <= -8.6e-13) tmp = t_1; elseif (t <= 8.6e-269) tmp = x - (y * a); elseif (t <= 6000.0) tmp = x - a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.6e-13], t$95$1, If[LessEqual[t, 8.6e-269], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6000.0], N[(x - a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - a \cdot \frac{y}{t}\\
\mathbf{if}\;t \leq -8.6 \cdot 10^{-13}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 8.6 \cdot 10^{-269}:\\
\;\;\;\;x - y \cdot a\\
\mathbf{elif}\;t \leq 6000:\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -8.5999999999999997e-13 or 6e3 < t Initial program 97.2%
Taylor expanded in t around inf 75.2%
associate-/l*83.4%
Simplified83.4%
Taylor expanded in y around inf 73.0%
associate-/l*80.3%
Simplified80.3%
if -8.5999999999999997e-13 < t < 8.59999999999999977e-269Initial program 98.4%
Taylor expanded in z around 0 69.0%
associate-/l*69.0%
Simplified69.0%
Taylor expanded in t around 0 69.0%
if 8.59999999999999977e-269 < t < 6e3Initial program 95.7%
Taylor expanded in z around inf 76.6%
Final simplification76.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2150000000000.0) (not (<= z 750000.0))) (+ x (* (- y z) (/ a z))) (+ x (* a (/ y (- -1.0 t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2150000000000.0) || !(z <= 750000.0)) {
tmp = x + ((y - z) * (a / z));
} else {
tmp = x + (a * (y / (-1.0 - t)));
}
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 ((z <= (-2150000000000.0d0)) .or. (.not. (z <= 750000.0d0))) then
tmp = x + ((y - z) * (a / z))
else
tmp = x + (a * (y / ((-1.0d0) - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2150000000000.0) || !(z <= 750000.0)) {
tmp = x + ((y - z) * (a / z));
} else {
tmp = x + (a * (y / (-1.0 - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2150000000000.0) or not (z <= 750000.0): tmp = x + ((y - z) * (a / z)) else: tmp = x + (a * (y / (-1.0 - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2150000000000.0) || !(z <= 750000.0)) tmp = Float64(x + Float64(Float64(y - z) * Float64(a / z))); else tmp = Float64(x + Float64(a * Float64(y / Float64(-1.0 - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2150000000000.0) || ~((z <= 750000.0))) tmp = x + ((y - z) * (a / z)); else tmp = x + (a * (y / (-1.0 - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2150000000000.0], N[Not[LessEqual[z, 750000.0]], $MachinePrecision]], N[(x + N[(N[(y - z), $MachinePrecision] * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2150000000000 \lor \neg \left(z \leq 750000\right):\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{a}{z}\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \frac{y}{-1 - t}\\
\end{array}
\end{array}
if z < -2.15e12 or 7.5e5 < z Initial program 94.5%
Taylor expanded in z around inf 84.6%
neg-mul-184.6%
Simplified84.6%
Taylor expanded in z around 0 62.4%
neg-mul-162.4%
distribute-rgt-neg-in62.4%
distribute-lft-out62.6%
associate-*l/84.2%
+-commutative84.2%
unsub-neg84.2%
Simplified84.2%
if -2.15e12 < z < 7.5e5Initial program 99.8%
Taylor expanded in z around 0 86.9%
associate-/l*93.9%
Simplified93.9%
Final simplification89.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -7.5e+86) (not (<= z 6.1e+78))) (- x a) (+ x (* a (/ y (- -1.0 t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -7.5e+86) || !(z <= 6.1e+78)) {
tmp = x - a;
} else {
tmp = x + (a * (y / (-1.0 - t)));
}
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 ((z <= (-7.5d+86)) .or. (.not. (z <= 6.1d+78))) then
tmp = x - a
else
tmp = x + (a * (y / ((-1.0d0) - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -7.5e+86) || !(z <= 6.1e+78)) {
tmp = x - a;
} else {
tmp = x + (a * (y / (-1.0 - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -7.5e+86) or not (z <= 6.1e+78): tmp = x - a else: tmp = x + (a * (y / (-1.0 - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -7.5e+86) || !(z <= 6.1e+78)) tmp = Float64(x - a); else tmp = Float64(x + Float64(a * Float64(y / Float64(-1.0 - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -7.5e+86) || ~((z <= 6.1e+78))) tmp = x - a; else tmp = x + (a * (y / (-1.0 - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -7.5e+86], N[Not[LessEqual[z, 6.1e+78]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x + N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{+86} \lor \neg \left(z \leq 6.1 \cdot 10^{+78}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \frac{y}{-1 - t}\\
\end{array}
\end{array}
if z < -7.4999999999999997e86 or 6.10000000000000011e78 < z Initial program 94.5%
Taylor expanded in z around inf 82.3%
if -7.4999999999999997e86 < z < 6.10000000000000011e78Initial program 98.7%
Taylor expanded in z around 0 81.5%
associate-/l*87.0%
Simplified87.0%
Final simplification85.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -44000000000.0)
(+ x (/ (- y z) (/ z a)))
(if (<= z 1200000.0)
(+ x (* a (/ y (- -1.0 t))))
(+ x (* (- y z) (/ a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -44000000000.0) {
tmp = x + ((y - z) / (z / a));
} else if (z <= 1200000.0) {
tmp = x + (a * (y / (-1.0 - t)));
} else {
tmp = x + ((y - z) * (a / 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 (z <= (-44000000000.0d0)) then
tmp = x + ((y - z) / (z / a))
else if (z <= 1200000.0d0) then
tmp = x + (a * (y / ((-1.0d0) - t)))
else
tmp = x + ((y - z) * (a / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -44000000000.0) {
tmp = x + ((y - z) / (z / a));
} else if (z <= 1200000.0) {
tmp = x + (a * (y / (-1.0 - t)));
} else {
tmp = x + ((y - z) * (a / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -44000000000.0: tmp = x + ((y - z) / (z / a)) elif z <= 1200000.0: tmp = x + (a * (y / (-1.0 - t))) else: tmp = x + ((y - z) * (a / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -44000000000.0) tmp = Float64(x + Float64(Float64(y - z) / Float64(z / a))); elseif (z <= 1200000.0) tmp = Float64(x + Float64(a * Float64(y / Float64(-1.0 - t)))); else tmp = Float64(x + Float64(Float64(y - z) * Float64(a / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -44000000000.0) tmp = x + ((y - z) / (z / a)); elseif (z <= 1200000.0) tmp = x + (a * (y / (-1.0 - t))); else tmp = x + ((y - z) * (a / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -44000000000.0], N[(x + N[(N[(y - z), $MachinePrecision] / N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1200000.0], N[(x + N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -44000000000:\\
\;\;\;\;x + \frac{y - z}{\frac{z}{a}}\\
\mathbf{elif}\;z \leq 1200000:\\
\;\;\;\;x + a \cdot \frac{y}{-1 - t}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{a}{z}\\
\end{array}
\end{array}
if z < -4.4e10Initial program 93.5%
Taylor expanded in z around inf 84.6%
neg-mul-184.6%
Simplified84.6%
if -4.4e10 < z < 1.2e6Initial program 99.8%
Taylor expanded in z around 0 86.9%
associate-/l*93.9%
Simplified93.9%
if 1.2e6 < z Initial program 95.4%
Taylor expanded in z around inf 84.7%
neg-mul-184.7%
Simplified84.7%
Taylor expanded in z around 0 62.4%
neg-mul-162.4%
distribute-rgt-neg-in62.4%
distribute-lft-out62.5%
associate-*l/85.4%
+-commutative85.4%
unsub-neg85.4%
Simplified85.4%
Final simplification89.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -8e-25) (not (<= z 4.5e-49))) (- x a) (- x (* y a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8e-25) || !(z <= 4.5e-49)) {
tmp = x - a;
} else {
tmp = x - (y * a);
}
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 ((z <= (-8d-25)) .or. (.not. (z <= 4.5d-49))) then
tmp = x - a
else
tmp = x - (y * a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8e-25) || !(z <= 4.5e-49)) {
tmp = x - a;
} else {
tmp = x - (y * a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -8e-25) or not (z <= 4.5e-49): tmp = x - a else: tmp = x - (y * a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -8e-25) || !(z <= 4.5e-49)) tmp = Float64(x - a); else tmp = Float64(x - Float64(y * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -8e-25) || ~((z <= 4.5e-49))) tmp = x - a; else tmp = x - (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -8e-25], N[Not[LessEqual[z, 4.5e-49]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{-25} \lor \neg \left(z \leq 4.5 \cdot 10^{-49}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot a\\
\end{array}
\end{array}
if z < -8.00000000000000031e-25 or 4.5000000000000002e-49 < z Initial program 95.0%
Taylor expanded in z around inf 71.1%
if -8.00000000000000031e-25 < z < 4.5000000000000002e-49Initial program 99.9%
Taylor expanded in z around 0 89.4%
associate-/l*95.7%
Simplified95.7%
Taylor expanded in t around 0 69.9%
Final simplification70.5%
(FPCore (x y z t a) :precision binary64 (+ x (/ (- y z) (/ (+ -1.0 (- z t)) a))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) / ((-1.0 + (z - t)) / a));
}
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) / (((-1.0d0) + (z - t)) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) / ((-1.0 + (z - t)) / a));
}
def code(x, y, z, t, a): return x + ((y - z) / ((-1.0 + (z - t)) / a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) / Float64(Float64(-1.0 + Float64(z - t)) / a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) / ((-1.0 + (z - t)) / a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(-1.0 + N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y - z}{\frac{-1 + \left(z - t\right)}{a}}
\end{array}
Initial program 97.3%
Final simplification97.3%
(FPCore (x y z t a) :precision binary64 (if (<= y -2.8e+239) (* a (/ y z)) (- x a)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2.8e+239) {
tmp = a * (y / z);
} else {
tmp = x - a;
}
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 (y <= (-2.8d+239)) then
tmp = a * (y / z)
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2.8e+239) {
tmp = a * (y / z);
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -2.8e+239: tmp = a * (y / z) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -2.8e+239) tmp = Float64(a * Float64(y / z)); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -2.8e+239) tmp = a * (y / z); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -2.8e+239], N[(a * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{+239}:\\
\;\;\;\;a \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if y < -2.80000000000000002e239Initial program 99.9%
sub-neg99.9%
+-commutative99.9%
associate-/r/99.7%
distribute-rgt-neg-in99.7%
associate-*l/77.7%
associate-/l*99.9%
fma-define99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
distribute-neg-in99.9%
sub-neg99.9%
distribute-neg-in99.9%
remove-double-neg99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 59.4%
associate-/l*76.9%
associate--r+76.9%
sub-neg76.9%
metadata-eval76.9%
+-commutative76.9%
associate-+r-76.9%
Simplified76.9%
Taylor expanded in z around inf 40.4%
associate-/l*53.3%
Simplified53.3%
if -2.80000000000000002e239 < y Initial program 97.0%
Taylor expanded in z around inf 65.1%
(FPCore (x y z t a) :precision binary64 (- x a))
double code(double x, double y, double z, double t, double a) {
return x - a;
}
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 - a
end function
public static double code(double x, double y, double z, double t, double a) {
return x - a;
}
def code(x, y, z, t, a): return x - a
function code(x, y, z, t, a) return Float64(x - a) end
function tmp = code(x, y, z, t, a) tmp = x - a; end
code[x_, y_, z_, t_, a_] := N[(x - a), $MachinePrecision]
\begin{array}{l}
\\
x - a
\end{array}
Initial program 97.3%
Taylor expanded in z around inf 62.0%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return 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
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 97.3%
sub-neg97.3%
+-commutative97.3%
associate-/r/99.9%
distribute-rgt-neg-in99.9%
associate-*l/84.5%
associate-/l*97.5%
fma-define97.5%
distribute-frac-neg97.5%
distribute-neg-frac297.5%
distribute-neg-in97.5%
sub-neg97.5%
distribute-neg-in97.5%
remove-double-neg97.5%
+-commutative97.5%
sub-neg97.5%
metadata-eval97.5%
Simplified97.5%
Taylor expanded in a around 0 54.5%
(FPCore (x y z t a) :precision binary64 (- x (* (/ (- y z) (+ (- t z) 1.0)) a)))
double code(double x, double y, double z, double t, double a) {
return x - (((y - z) / ((t - z) + 1.0)) * a);
}
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 - z) + 1.0d0)) * a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x - (((y - z) / ((t - z) + 1.0)) * a);
}
def code(x, y, z, t, a): return x - (((y - z) / ((t - z) + 1.0)) * a)
function code(x, y, z, t, a) return Float64(x - Float64(Float64(Float64(y - z) / Float64(Float64(t - z) + 1.0)) * a)) end
function tmp = code(x, y, z, t, a) tmp = x - (((y - z) / ((t - z) + 1.0)) * a); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(N[(y - z), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\left(t - z\right) + 1} \cdot a
\end{array}
herbie shell --seed 2024096
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
:precision binary64
:alt
(- x (* (/ (- y z) (+ (- t z) 1.0)) a))
(- x (/ (- y z) (/ (+ (- t z) 1.0) a))))