
(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 14 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 (+ x (* a (/ (- z y) (+ (- t z) 1.0)))))
double code(double x, double y, double z, double t, double a) {
return x + (a * ((z - y) / ((t - z) + 1.0)));
}
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 * ((z - y) / ((t - z) + 1.0d0)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (a * ((z - y) / ((t - z) + 1.0)));
}
def code(x, y, z, t, a): return x + (a * ((z - y) / ((t - z) + 1.0)))
function code(x, y, z, t, a) return Float64(x + Float64(a * Float64(Float64(z - y) / Float64(Float64(t - z) + 1.0)))) end
function tmp = code(x, y, z, t, a) tmp = x + (a * ((z - y) / ((t - z) + 1.0))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + a \cdot \frac{z - y}{\left(t - z\right) + 1}
\end{array}
Initial program 97.9%
associate-/r/99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(if (<= z -13500.0)
(- x a)
(if (<= z -8e-192)
(- x (* a (/ y t)))
(if (<= z 1.6e-80)
(- x (* y a))
(if (<= z 14.0)
(+ x (* z a))
(if (<= z 2.45e+183) (+ x (/ y (/ z a))) (- x a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -13500.0) {
tmp = x - a;
} else if (z <= -8e-192) {
tmp = x - (a * (y / t));
} else if (z <= 1.6e-80) {
tmp = x - (y * a);
} else if (z <= 14.0) {
tmp = x + (z * a);
} else if (z <= 2.45e+183) {
tmp = x + (y / (z / a));
} 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 (z <= (-13500.0d0)) then
tmp = x - a
else if (z <= (-8d-192)) then
tmp = x - (a * (y / t))
else if (z <= 1.6d-80) then
tmp = x - (y * a)
else if (z <= 14.0d0) then
tmp = x + (z * a)
else if (z <= 2.45d+183) then
tmp = x + (y / (z / a))
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 (z <= -13500.0) {
tmp = x - a;
} else if (z <= -8e-192) {
tmp = x - (a * (y / t));
} else if (z <= 1.6e-80) {
tmp = x - (y * a);
} else if (z <= 14.0) {
tmp = x + (z * a);
} else if (z <= 2.45e+183) {
tmp = x + (y / (z / a));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -13500.0: tmp = x - a elif z <= -8e-192: tmp = x - (a * (y / t)) elif z <= 1.6e-80: tmp = x - (y * a) elif z <= 14.0: tmp = x + (z * a) elif z <= 2.45e+183: tmp = x + (y / (z / a)) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -13500.0) tmp = Float64(x - a); elseif (z <= -8e-192) tmp = Float64(x - Float64(a * Float64(y / t))); elseif (z <= 1.6e-80) tmp = Float64(x - Float64(y * a)); elseif (z <= 14.0) tmp = Float64(x + Float64(z * a)); elseif (z <= 2.45e+183) tmp = Float64(x + Float64(y / Float64(z / a))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -13500.0) tmp = x - a; elseif (z <= -8e-192) tmp = x - (a * (y / t)); elseif (z <= 1.6e-80) tmp = x - (y * a); elseif (z <= 14.0) tmp = x + (z * a); elseif (z <= 2.45e+183) tmp = x + (y / (z / a)); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -13500.0], N[(x - a), $MachinePrecision], If[LessEqual[z, -8e-192], N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e-80], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 14.0], N[(x + N[(z * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.45e+183], N[(x + N[(y / N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -13500:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -8 \cdot 10^{-192}:\\
\;\;\;\;x - a \cdot \frac{y}{t}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-80}:\\
\;\;\;\;x - y \cdot a\\
\mathbf{elif}\;z \leq 14:\\
\;\;\;\;x + z \cdot a\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{+183}:\\
\;\;\;\;x + \frac{y}{\frac{z}{a}}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -13500 or 2.44999999999999986e183 < z Initial program 95.7%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 81.7%
if -13500 < z < -8.0000000000000008e-192Initial program 99.1%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in t around inf 78.8%
Taylor expanded in y around inf 81.5%
if -8.0000000000000008e-192 < z < 1.5999999999999999e-80Initial program 98.7%
associate-/r/99.9%
Simplified99.9%
*-commutative99.9%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 92.7%
Taylor expanded in t around 0 77.9%
if 1.5999999999999999e-80 < z < 14Initial program 99.9%
Taylor expanded in y around 0 82.6%
neg-mul-182.6%
Simplified82.6%
Taylor expanded in z around 0 78.8%
mul-1-neg78.8%
distribute-neg-frac278.8%
distribute-neg-in78.8%
metadata-eval78.8%
unsub-neg78.8%
Simplified78.8%
Taylor expanded in t around 0 79.2%
associate-*r*79.2%
neg-mul-179.2%
cancel-sign-sub79.2%
Simplified79.2%
if 14 < z < 2.44999999999999986e183Initial program 99.9%
Taylor expanded in z around inf 80.1%
associate-*r/80.1%
neg-mul-180.1%
Simplified80.1%
Taylor expanded in y around inf 72.8%
Final simplification79.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6800.0)
(- x a)
(if (<= z -1.45e-192)
(- x (* a (/ y t)))
(if (<= z 4.5e-81)
(- x (* y a))
(if (<= z 4.2e-7) (+ x (* z a)) (- x a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6800.0) {
tmp = x - a;
} else if (z <= -1.45e-192) {
tmp = x - (a * (y / t));
} else if (z <= 4.5e-81) {
tmp = x - (y * a);
} else if (z <= 4.2e-7) {
tmp = x + (z * a);
} 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 (z <= (-6800.0d0)) then
tmp = x - a
else if (z <= (-1.45d-192)) then
tmp = x - (a * (y / t))
else if (z <= 4.5d-81) then
tmp = x - (y * a)
else if (z <= 4.2d-7) then
tmp = x + (z * a)
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 (z <= -6800.0) {
tmp = x - a;
} else if (z <= -1.45e-192) {
tmp = x - (a * (y / t));
} else if (z <= 4.5e-81) {
tmp = x - (y * a);
} else if (z <= 4.2e-7) {
tmp = x + (z * a);
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6800.0: tmp = x - a elif z <= -1.45e-192: tmp = x - (a * (y / t)) elif z <= 4.5e-81: tmp = x - (y * a) elif z <= 4.2e-7: tmp = x + (z * a) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6800.0) tmp = Float64(x - a); elseif (z <= -1.45e-192) tmp = Float64(x - Float64(a * Float64(y / t))); elseif (z <= 4.5e-81) tmp = Float64(x - Float64(y * a)); elseif (z <= 4.2e-7) tmp = Float64(x + Float64(z * a)); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6800.0) tmp = x - a; elseif (z <= -1.45e-192) tmp = x - (a * (y / t)); elseif (z <= 4.5e-81) tmp = x - (y * a); elseif (z <= 4.2e-7) tmp = x + (z * a); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6800.0], N[(x - a), $MachinePrecision], If[LessEqual[z, -1.45e-192], N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e-81], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e-7], N[(x + N[(z * a), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6800:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -1.45 \cdot 10^{-192}:\\
\;\;\;\;x - a \cdot \frac{y}{t}\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-81}:\\
\;\;\;\;x - y \cdot a\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-7}:\\
\;\;\;\;x + z \cdot a\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -6800 or 4.2e-7 < z Initial program 96.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 75.1%
if -6800 < z < -1.45000000000000008e-192Initial program 99.1%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in t around inf 78.8%
Taylor expanded in y around inf 81.5%
if -1.45000000000000008e-192 < z < 4.5e-81Initial program 98.7%
associate-/r/99.9%
Simplified99.9%
*-commutative99.9%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 92.7%
Taylor expanded in t around 0 77.9%
if 4.5e-81 < z < 4.2e-7Initial program 100.0%
Taylor expanded in y around 0 90.4%
neg-mul-190.4%
Simplified90.4%
Taylor expanded in z around 0 86.2%
mul-1-neg86.2%
distribute-neg-frac286.2%
distribute-neg-in86.2%
metadata-eval86.2%
unsub-neg86.2%
Simplified86.2%
Taylor expanded in t around 0 86.6%
associate-*r*86.6%
neg-mul-186.6%
cancel-sign-sub86.6%
Simplified86.6%
Final simplification77.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (- y z) (/ z a)))))
(if (<= z -18000.0)
t_1
(if (<= z 3.8e-74)
(+ x (* a (/ y (- -1.0 t))))
(if (<= z 3.2e+55) (+ x (/ z (/ (- 1.0 z) a))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) / (z / a));
double tmp;
if (z <= -18000.0) {
tmp = t_1;
} else if (z <= 3.8e-74) {
tmp = x + (a * (y / (-1.0 - t)));
} else if (z <= 3.2e+55) {
tmp = x + (z / ((1.0 - z) / 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 + ((y - z) / (z / a))
if (z <= (-18000.0d0)) then
tmp = t_1
else if (z <= 3.8d-74) then
tmp = x + (a * (y / ((-1.0d0) - t)))
else if (z <= 3.2d+55) then
tmp = x + (z / ((1.0d0 - z) / 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 + ((y - z) / (z / a));
double tmp;
if (z <= -18000.0) {
tmp = t_1;
} else if (z <= 3.8e-74) {
tmp = x + (a * (y / (-1.0 - t)));
} else if (z <= 3.2e+55) {
tmp = x + (z / ((1.0 - z) / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) / (z / a)) tmp = 0 if z <= -18000.0: tmp = t_1 elif z <= 3.8e-74: tmp = x + (a * (y / (-1.0 - t))) elif z <= 3.2e+55: tmp = x + (z / ((1.0 - z) / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) / Float64(z / a))) tmp = 0.0 if (z <= -18000.0) tmp = t_1; elseif (z <= 3.8e-74) tmp = Float64(x + Float64(a * Float64(y / Float64(-1.0 - t)))); elseif (z <= 3.2e+55) tmp = Float64(x + Float64(z / Float64(Float64(1.0 - z) / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) / (z / a)); tmp = 0.0; if (z <= -18000.0) tmp = t_1; elseif (z <= 3.8e-74) tmp = x + (a * (y / (-1.0 - t))); elseif (z <= 3.2e+55) tmp = x + (z / ((1.0 - z) / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] / N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -18000.0], t$95$1, If[LessEqual[z, 3.8e-74], N[(x + N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.2e+55], N[(x + N[(z / N[(N[(1.0 - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - z}{\frac{z}{a}}\\
\mathbf{if}\;z \leq -18000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-74}:\\
\;\;\;\;x + a \cdot \frac{y}{-1 - t}\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+55}:\\
\;\;\;\;x + \frac{z}{\frac{1 - z}{a}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -18000 or 3.2000000000000003e55 < z Initial program 96.5%
Taylor expanded in z around inf 85.5%
associate-*r/85.5%
neg-mul-185.5%
Simplified85.5%
if -18000 < z < 3.7999999999999996e-74Initial program 98.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 97.5%
if 3.7999999999999996e-74 < z < 3.2000000000000003e55Initial program 99.9%
Taylor expanded in y around 0 90.7%
neg-mul-190.7%
Simplified90.7%
Taylor expanded in t around 0 85.1%
Final simplification91.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -820000000000.0)
(- x a)
(if (<= z 8.8e+55)
(+ x (* a (/ y (- -1.0 t))))
(if (<= z 7.5e+182) (+ x (/ y (/ z a))) (- x a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -820000000000.0) {
tmp = x - a;
} else if (z <= 8.8e+55) {
tmp = x + (a * (y / (-1.0 - t)));
} else if (z <= 7.5e+182) {
tmp = x + (y / (z / a));
} 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 (z <= (-820000000000.0d0)) then
tmp = x - a
else if (z <= 8.8d+55) then
tmp = x + (a * (y / ((-1.0d0) - t)))
else if (z <= 7.5d+182) then
tmp = x + (y / (z / a))
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 (z <= -820000000000.0) {
tmp = x - a;
} else if (z <= 8.8e+55) {
tmp = x + (a * (y / (-1.0 - t)));
} else if (z <= 7.5e+182) {
tmp = x + (y / (z / a));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -820000000000.0: tmp = x - a elif z <= 8.8e+55: tmp = x + (a * (y / (-1.0 - t))) elif z <= 7.5e+182: tmp = x + (y / (z / a)) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -820000000000.0) tmp = Float64(x - a); elseif (z <= 8.8e+55) tmp = Float64(x + Float64(a * Float64(y / Float64(-1.0 - t)))); elseif (z <= 7.5e+182) tmp = Float64(x + Float64(y / Float64(z / a))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -820000000000.0) tmp = x - a; elseif (z <= 8.8e+55) tmp = x + (a * (y / (-1.0 - t))); elseif (z <= 7.5e+182) tmp = x + (y / (z / a)); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -820000000000.0], N[(x - a), $MachinePrecision], If[LessEqual[z, 8.8e+55], N[(x + N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e+182], N[(x + N[(y / N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -820000000000:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{+55}:\\
\;\;\;\;x + a \cdot \frac{y}{-1 - t}\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{+182}:\\
\;\;\;\;x + \frac{y}{\frac{z}{a}}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -8.2e11 or 7.49999999999999989e182 < z Initial program 95.6%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 82.5%
if -8.2e11 < z < 8.80000000000000042e55Initial program 99.0%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 91.5%
if 8.80000000000000042e55 < z < 7.49999999999999989e182Initial program 99.9%
Taylor expanded in z around inf 79.5%
associate-*r/79.5%
neg-mul-179.5%
Simplified79.5%
Taylor expanded in y around inf 75.7%
Final simplification86.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -17000.0) (not (<= z 5.7e+62))) (+ x (/ (- y z) (/ z a))) (+ x (/ (- y z) (/ (- -1.0 t) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -17000.0) || !(z <= 5.7e+62)) {
tmp = x + ((y - z) / (z / a));
} else {
tmp = x + ((y - z) / ((-1.0 - t) / 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 <= (-17000.0d0)) .or. (.not. (z <= 5.7d+62))) then
tmp = x + ((y - z) / (z / a))
else
tmp = x + ((y - z) / (((-1.0d0) - t) / 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 <= -17000.0) || !(z <= 5.7e+62)) {
tmp = x + ((y - z) / (z / a));
} else {
tmp = x + ((y - z) / ((-1.0 - t) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -17000.0) or not (z <= 5.7e+62): tmp = x + ((y - z) / (z / a)) else: tmp = x + ((y - z) / ((-1.0 - t) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -17000.0) || !(z <= 5.7e+62)) tmp = Float64(x + Float64(Float64(y - z) / Float64(z / a))); else tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(-1.0 - t) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -17000.0) || ~((z <= 5.7e+62))) tmp = x + ((y - z) / (z / a)); else tmp = x + ((y - z) / ((-1.0 - t) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -17000.0], N[Not[LessEqual[z, 5.7e+62]], $MachinePrecision]], N[(x + N[(N[(y - z), $MachinePrecision] / N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(-1.0 - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -17000 \lor \neg \left(z \leq 5.7 \cdot 10^{+62}\right):\\
\;\;\;\;x + \frac{y - z}{\frac{z}{a}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - z}{\frac{-1 - t}{a}}\\
\end{array}
\end{array}
if z < -17000 or 5.69999999999999998e62 < z Initial program 96.5%
Taylor expanded in z around inf 86.9%
associate-*r/86.9%
neg-mul-186.9%
Simplified86.9%
if -17000 < z < 5.69999999999999998e62Initial program 99.0%
Taylor expanded in z around 0 96.2%
Final simplification92.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -15200.0)
(+ x (/ (- y z) (/ z a)))
(if (<= z 9e-73)
(+ x (* a (/ y (- -1.0 t))))
(+ x (* a (/ z (+ (- t z) 1.0)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -15200.0) {
tmp = x + ((y - z) / (z / a));
} else if (z <= 9e-73) {
tmp = x + (a * (y / (-1.0 - t)));
} else {
tmp = x + (a * (z / ((t - z) + 1.0)));
}
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 <= (-15200.0d0)) then
tmp = x + ((y - z) / (z / a))
else if (z <= 9d-73) then
tmp = x + (a * (y / ((-1.0d0) - t)))
else
tmp = x + (a * (z / ((t - z) + 1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -15200.0) {
tmp = x + ((y - z) / (z / a));
} else if (z <= 9e-73) {
tmp = x + (a * (y / (-1.0 - t)));
} else {
tmp = x + (a * (z / ((t - z) + 1.0)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -15200.0: tmp = x + ((y - z) / (z / a)) elif z <= 9e-73: tmp = x + (a * (y / (-1.0 - t))) else: tmp = x + (a * (z / ((t - z) + 1.0))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -15200.0) tmp = Float64(x + Float64(Float64(y - z) / Float64(z / a))); elseif (z <= 9e-73) tmp = Float64(x + Float64(a * Float64(y / Float64(-1.0 - t)))); else tmp = Float64(x + Float64(a * Float64(z / Float64(Float64(t - z) + 1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -15200.0) tmp = x + ((y - z) / (z / a)); elseif (z <= 9e-73) tmp = x + (a * (y / (-1.0 - t))); else tmp = x + (a * (z / ((t - z) + 1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -15200.0], N[(x + N[(N[(y - z), $MachinePrecision] / N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9e-73], N[(x + N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(z / N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -15200:\\
\;\;\;\;x + \frac{y - z}{\frac{z}{a}}\\
\mathbf{elif}\;z \leq 9 \cdot 10^{-73}:\\
\;\;\;\;x + a \cdot \frac{y}{-1 - t}\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \frac{z}{\left(t - z\right) + 1}\\
\end{array}
\end{array}
if z < -15200Initial program 95.5%
Taylor expanded in z around inf 87.6%
associate-*r/87.6%
neg-mul-187.6%
Simplified87.6%
if -15200 < z < 9e-73Initial program 98.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 97.5%
if 9e-73 < z Initial program 98.5%
sub-neg98.5%
+-commutative98.5%
associate-/r/99.9%
distribute-rgt-neg-in99.9%
associate-*l/75.6%
associate-/l*98.6%
fma-define98.6%
distribute-frac-neg98.6%
distribute-neg-frac298.6%
distribute-neg-in98.6%
sub-neg98.6%
distribute-neg-in98.6%
remove-double-neg98.6%
+-commutative98.6%
sub-neg98.6%
metadata-eval98.6%
Simplified98.6%
Taylor expanded in y around 0 63.8%
mul-1-neg63.8%
unsub-neg63.8%
associate-/l*82.8%
associate--r+82.8%
sub-neg82.8%
metadata-eval82.8%
+-commutative82.8%
associate--l+82.8%
Simplified82.8%
Final simplification90.9%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2150000000.0)
(- x a)
(if (<= z 1.65e-80)
(- x (* y a))
(if (<= z 8.2e-5) (+ x (* z a)) (- x a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2150000000.0) {
tmp = x - a;
} else if (z <= 1.65e-80) {
tmp = x - (y * a);
} else if (z <= 8.2e-5) {
tmp = x + (z * a);
} 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 (z <= (-2150000000.0d0)) then
tmp = x - a
else if (z <= 1.65d-80) then
tmp = x - (y * a)
else if (z <= 8.2d-5) then
tmp = x + (z * a)
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 (z <= -2150000000.0) {
tmp = x - a;
} else if (z <= 1.65e-80) {
tmp = x - (y * a);
} else if (z <= 8.2e-5) {
tmp = x + (z * a);
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2150000000.0: tmp = x - a elif z <= 1.65e-80: tmp = x - (y * a) elif z <= 8.2e-5: tmp = x + (z * a) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2150000000.0) tmp = Float64(x - a); elseif (z <= 1.65e-80) tmp = Float64(x - Float64(y * a)); elseif (z <= 8.2e-5) tmp = Float64(x + Float64(z * a)); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2150000000.0) tmp = x - a; elseif (z <= 1.65e-80) tmp = x - (y * a); elseif (z <= 8.2e-5) tmp = x + (z * a); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2150000000.0], N[(x - a), $MachinePrecision], If[LessEqual[z, 1.65e-80], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.2e-5], N[(x + N[(z * a), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2150000000:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{-80}:\\
\;\;\;\;x - y \cdot a\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{-5}:\\
\;\;\;\;x + z \cdot a\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -2.15e9 or 8.20000000000000009e-5 < z Initial program 96.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 75.7%
if -2.15e9 < z < 1.65e-80Initial program 98.8%
associate-/r/99.9%
Simplified99.9%
*-commutative99.9%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 92.0%
Taylor expanded in t around 0 71.9%
if 1.65e-80 < z < 8.20000000000000009e-5Initial program 100.0%
Taylor expanded in y around 0 90.4%
neg-mul-190.4%
Simplified90.4%
Taylor expanded in z around 0 86.2%
mul-1-neg86.2%
distribute-neg-frac286.2%
distribute-neg-in86.2%
metadata-eval86.2%
unsub-neg86.2%
Simplified86.2%
Taylor expanded in t around 0 86.6%
associate-*r*86.6%
neg-mul-186.6%
cancel-sign-sub86.6%
Simplified86.6%
Final simplification74.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -820000000000.0) (- x a) (if (<= z 9e-73) (+ x (* a (/ y (- -1.0 t)))) (+ x (/ z (/ (- 1.0 z) a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -820000000000.0) {
tmp = x - a;
} else if (z <= 9e-73) {
tmp = x + (a * (y / (-1.0 - t)));
} else {
tmp = x + (z / ((1.0 - z) / 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 <= (-820000000000.0d0)) then
tmp = x - a
else if (z <= 9d-73) then
tmp = x + (a * (y / ((-1.0d0) - t)))
else
tmp = x + (z / ((1.0d0 - z) / 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 <= -820000000000.0) {
tmp = x - a;
} else if (z <= 9e-73) {
tmp = x + (a * (y / (-1.0 - t)));
} else {
tmp = x + (z / ((1.0 - z) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -820000000000.0: tmp = x - a elif z <= 9e-73: tmp = x + (a * (y / (-1.0 - t))) else: tmp = x + (z / ((1.0 - z) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -820000000000.0) tmp = Float64(x - a); elseif (z <= 9e-73) tmp = Float64(x + Float64(a * Float64(y / Float64(-1.0 - t)))); else tmp = Float64(x + Float64(z / Float64(Float64(1.0 - z) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -820000000000.0) tmp = x - a; elseif (z <= 9e-73) tmp = x + (a * (y / (-1.0 - t))); else tmp = x + (z / ((1.0 - z) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -820000000000.0], N[(x - a), $MachinePrecision], If[LessEqual[z, 9e-73], N[(x + N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z / N[(N[(1.0 - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -820000000000:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 9 \cdot 10^{-73}:\\
\;\;\;\;x + a \cdot \frac{y}{-1 - t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z}{\frac{1 - z}{a}}\\
\end{array}
\end{array}
if z < -8.2e11Initial program 95.5%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 81.3%
if -8.2e11 < z < 9e-73Initial program 98.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 96.8%
if 9e-73 < z Initial program 98.5%
Taylor expanded in y around 0 82.8%
neg-mul-182.8%
Simplified82.8%
Taylor expanded in t around 0 73.3%
Final simplification86.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -18500.0) (not (<= z 5.9e-5))) (- x a) (+ x (* z a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -18500.0) || !(z <= 5.9e-5)) {
tmp = x - a;
} else {
tmp = x + (z * 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 <= (-18500.0d0)) .or. (.not. (z <= 5.9d-5))) then
tmp = x - a
else
tmp = x + (z * 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 <= -18500.0) || !(z <= 5.9e-5)) {
tmp = x - a;
} else {
tmp = x + (z * a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -18500.0) or not (z <= 5.9e-5): tmp = x - a else: tmp = x + (z * a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -18500.0) || !(z <= 5.9e-5)) tmp = Float64(x - a); else tmp = Float64(x + Float64(z * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -18500.0) || ~((z <= 5.9e-5))) tmp = x - a; else tmp = x + (z * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -18500.0], N[Not[LessEqual[z, 5.9e-5]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x + N[(z * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -18500 \lor \neg \left(z \leq 5.9 \cdot 10^{-5}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot a\\
\end{array}
\end{array}
if z < -18500 or 5.8999999999999998e-5 < z Initial program 96.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 75.7%
if -18500 < z < 5.8999999999999998e-5Initial program 98.9%
Taylor expanded in y around 0 61.4%
neg-mul-161.4%
Simplified61.4%
Taylor expanded in z around 0 61.1%
mul-1-neg61.1%
distribute-neg-frac261.1%
distribute-neg-in61.1%
metadata-eval61.1%
unsub-neg61.1%
Simplified61.1%
Taylor expanded in t around 0 59.8%
associate-*r*59.8%
neg-mul-159.8%
cancel-sign-sub59.8%
Simplified59.8%
Final simplification67.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -12000.0) (not (<= z 20000000000000.0))) (- x a) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -12000.0) || !(z <= 20000000000000.0)) {
tmp = x - a;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-12000.0d0)) .or. (.not. (z <= 20000000000000.0d0))) then
tmp = x - a
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -12000.0) || !(z <= 20000000000000.0)) {
tmp = x - a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -12000.0) or not (z <= 20000000000000.0): tmp = x - a else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -12000.0) || !(z <= 20000000000000.0)) tmp = Float64(x - a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -12000.0) || ~((z <= 20000000000000.0))) tmp = x - a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -12000.0], N[Not[LessEqual[z, 20000000000000.0]], $MachinePrecision]], N[(x - a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -12000 \lor \neg \left(z \leq 20000000000000\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -12000 or 2e13 < z Initial program 96.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 75.5%
if -12000 < z < 2e13Initial program 98.9%
sub-neg98.9%
+-commutative98.9%
associate-/r/99.9%
distribute-rgt-neg-in99.9%
associate-*l/94.9%
associate-/l*99.1%
fma-define99.1%
distribute-frac-neg99.1%
distribute-neg-frac299.1%
distribute-neg-in99.1%
sub-neg99.1%
distribute-neg-in99.1%
remove-double-neg99.1%
+-commutative99.1%
sub-neg99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in a around 0 56.1%
Final simplification65.6%
(FPCore (x y z t a) :precision binary64 (if (<= a -7.4e+140) (- a) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -7.4e+140) {
tmp = -a;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-7.4d+140)) then
tmp = -a
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -7.4e+140) {
tmp = -a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -7.4e+140: tmp = -a else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -7.4e+140) tmp = Float64(-a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -7.4e+140) tmp = -a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -7.4e+140], (-a), x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.4 \cdot 10^{+140}:\\
\;\;\;\;-a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -7.40000000000000006e140Initial program 99.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 37.0%
Taylor expanded in x around 0 31.3%
neg-mul-131.3%
Simplified31.3%
if -7.40000000000000006e140 < a Initial program 97.5%
sub-neg97.5%
+-commutative97.5%
associate-/r/99.9%
distribute-rgt-neg-in99.9%
associate-*l/88.9%
associate-/l*97.6%
fma-define97.6%
distribute-frac-neg97.6%
distribute-neg-frac297.6%
distribute-neg-in97.6%
sub-neg97.6%
distribute-neg-in97.6%
remove-double-neg97.6%
+-commutative97.6%
sub-neg97.6%
metadata-eval97.6%
Simplified97.6%
Taylor expanded in a around 0 61.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.9%
sub-neg97.9%
+-commutative97.9%
associate-/r/99.9%
distribute-rgt-neg-in99.9%
associate-*l/84.5%
associate-/l*98.0%
fma-define98.0%
distribute-frac-neg98.0%
distribute-neg-frac298.0%
distribute-neg-in98.0%
sub-neg98.0%
distribute-neg-in98.0%
remove-double-neg98.0%
+-commutative98.0%
sub-neg98.0%
metadata-eval98.0%
Simplified98.0%
Taylor expanded in a around 0 53.1%
(FPCore (x y z t a) :precision binary64 a)
double code(double x, double y, double z, double t, double a) {
return 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 = a
end function
public static double code(double x, double y, double z, double t, double a) {
return a;
}
def code(x, y, z, t, a): return a
function code(x, y, z, t, a) return a end
function tmp = code(x, y, z, t, a) tmp = a; end
code[x_, y_, z_, t_, a_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 97.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 58.8%
Taylor expanded in x around 0 15.7%
neg-mul-115.7%
Simplified15.7%
neg-sub015.7%
sub-neg15.7%
add-sqr-sqrt7.7%
sqrt-unprod9.5%
sqr-neg9.5%
sqrt-unprod1.9%
add-sqr-sqrt3.5%
Applied egg-rr3.5%
+-lft-identity3.5%
Simplified3.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 2024157
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (- x (* (/ (- y z) (+ (- t z) 1)) a)))
(- x (/ (- y z) (/ (+ (- t z) 1.0) a))))