
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - 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 - a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (z - a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 8 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - 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 - a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (z - a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- z a) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - 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 = x + (y / ((z - a) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((z - a) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(z - a) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((z - a) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{z - a}{z - t}}
\end{array}
Initial program 84.4%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6498.6%
Applied egg-rr98.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (- 1.0 (/ t z))))))
(if (<= z -6.6e+125)
t_1
(if (<= z -6.2e-108)
(+ x (* z (/ y (- z a))))
(if (<= z 1.35e-136) (+ x (/ y (/ a t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (1.0 - (t / z)));
double tmp;
if (z <= -6.6e+125) {
tmp = t_1;
} else if (z <= -6.2e-108) {
tmp = x + (z * (y / (z - a)));
} else if (z <= 1.35e-136) {
tmp = x + (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 = x + (y * (1.0d0 - (t / z)))
if (z <= (-6.6d+125)) then
tmp = t_1
else if (z <= (-6.2d-108)) then
tmp = x + (z * (y / (z - a)))
else if (z <= 1.35d-136) then
tmp = x + (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 = x + (y * (1.0 - (t / z)));
double tmp;
if (z <= -6.6e+125) {
tmp = t_1;
} else if (z <= -6.2e-108) {
tmp = x + (z * (y / (z - a)));
} else if (z <= 1.35e-136) {
tmp = x + (y / (a / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (1.0 - (t / z))) tmp = 0 if z <= -6.6e+125: tmp = t_1 elif z <= -6.2e-108: tmp = x + (z * (y / (z - a))) elif z <= 1.35e-136: tmp = x + (y / (a / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))) tmp = 0.0 if (z <= -6.6e+125) tmp = t_1; elseif (z <= -6.2e-108) tmp = Float64(x + Float64(z * Float64(y / Float64(z - a)))); elseif (z <= 1.35e-136) tmp = Float64(x + Float64(y / Float64(a / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (1.0 - (t / z))); tmp = 0.0; if (z <= -6.6e+125) tmp = t_1; elseif (z <= -6.2e-108) tmp = x + (z * (y / (z - a))); elseif (z <= 1.35e-136) tmp = x + (y / (a / t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.6e+125], t$95$1, If[LessEqual[z, -6.2e-108], N[(x + N[(z * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e-136], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{if}\;z \leq -6.6 \cdot 10^{+125}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{-108}:\\
\;\;\;\;x + z \cdot \frac{y}{z - a}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-136}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.60000000000000011e125 or 1.3499999999999999e-136 < z Initial program 75.2%
Taylor expanded in a around 0
+-lowering-+.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
div-subN/A
*-inversesN/A
--lowering--.f64N/A
/-lowering-/.f6487.2%
Simplified87.2%
if -6.60000000000000011e125 < z < -6.20000000000000028e-108Initial program 92.2%
Taylor expanded in t around 0
+-lowering-+.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6489.9%
Simplified89.9%
if -6.20000000000000028e-108 < z < 1.3499999999999999e-136Initial program 95.5%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6498.4%
Applied egg-rr98.4%
Taylor expanded in z around 0
/-lowering-/.f6484.3%
Simplified84.3%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ x (* z (/ y (- z a)))))) (if (<= x -5e-148) t_1 (if (<= x 3.2e-143) (/ y (/ (- z a) (- z t))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z * (y / (z - a)));
double tmp;
if (x <= -5e-148) {
tmp = t_1;
} else if (x <= 3.2e-143) {
tmp = y / ((z - a) / (z - 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 = x + (z * (y / (z - a)))
if (x <= (-5d-148)) then
tmp = t_1
else if (x <= 3.2d-143) then
tmp = y / ((z - a) / (z - 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 = x + (z * (y / (z - a)));
double tmp;
if (x <= -5e-148) {
tmp = t_1;
} else if (x <= 3.2e-143) {
tmp = y / ((z - a) / (z - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (z * (y / (z - a))) tmp = 0 if x <= -5e-148: tmp = t_1 elif x <= 3.2e-143: tmp = y / ((z - a) / (z - t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(z * Float64(y / Float64(z - a)))) tmp = 0.0 if (x <= -5e-148) tmp = t_1; elseif (x <= 3.2e-143) tmp = Float64(y / Float64(Float64(z - a) / Float64(z - t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (z * (y / (z - a))); tmp = 0.0; if (x <= -5e-148) tmp = t_1; elseif (x <= 3.2e-143) tmp = y / ((z - a) / (z - t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5e-148], t$95$1, If[LessEqual[x, 3.2e-143], N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y}{z - a}\\
\mathbf{if}\;x \leq -5 \cdot 10^{-148}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{-143}:\\
\;\;\;\;\frac{y}{\frac{z - a}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -4.9999999999999999e-148 or 3.1999999999999998e-143 < x Initial program 83.3%
Taylor expanded in t around 0
+-lowering-+.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6487.9%
Simplified87.9%
if -4.9999999999999999e-148 < x < 3.1999999999999998e-143Initial program 86.6%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6469.9%
Simplified69.9%
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6483.1%
Applied egg-rr83.1%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ x (* y (- 1.0 (/ t z)))))) (if (<= z -9.2e+26) t_1 (if (<= z 1.45e-136) (+ x (/ y (/ a t))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (1.0 - (t / z)));
double tmp;
if (z <= -9.2e+26) {
tmp = t_1;
} else if (z <= 1.45e-136) {
tmp = x + (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 = x + (y * (1.0d0 - (t / z)))
if (z <= (-9.2d+26)) then
tmp = t_1
else if (z <= 1.45d-136) then
tmp = x + (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 = x + (y * (1.0 - (t / z)));
double tmp;
if (z <= -9.2e+26) {
tmp = t_1;
} else if (z <= 1.45e-136) {
tmp = x + (y / (a / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (1.0 - (t / z))) tmp = 0 if z <= -9.2e+26: tmp = t_1 elif z <= 1.45e-136: tmp = x + (y / (a / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))) tmp = 0.0 if (z <= -9.2e+26) tmp = t_1; elseif (z <= 1.45e-136) tmp = Float64(x + Float64(y / Float64(a / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (1.0 - (t / z))); tmp = 0.0; if (z <= -9.2e+26) tmp = t_1; elseif (z <= 1.45e-136) tmp = x + (y / (a / t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.2e+26], t$95$1, If[LessEqual[z, 1.45e-136], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{if}\;z \leq -9.2 \cdot 10^{+26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-136}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -9.2000000000000002e26 or 1.44999999999999997e-136 < z Initial program 76.6%
Taylor expanded in a around 0
+-lowering-+.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
div-subN/A
*-inversesN/A
--lowering--.f64N/A
/-lowering-/.f6484.2%
Simplified84.2%
if -9.2000000000000002e26 < z < 1.44999999999999997e-136Initial program 96.2%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6496.6%
Applied egg-rr96.6%
Taylor expanded in z around 0
/-lowering-/.f6481.0%
Simplified81.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -200000000000.0) (+ x y) (if (<= z 1.4e-118) (+ x (/ y (/ a t))) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -200000000000.0) {
tmp = x + y;
} else if (z <= 1.4e-118) {
tmp = x + (y / (a / t));
} else {
tmp = x + y;
}
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 <= (-200000000000.0d0)) then
tmp = x + y
else if (z <= 1.4d-118) then
tmp = x + (y / (a / t))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -200000000000.0) {
tmp = x + y;
} else if (z <= 1.4e-118) {
tmp = x + (y / (a / t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -200000000000.0: tmp = x + y elif z <= 1.4e-118: tmp = x + (y / (a / t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -200000000000.0) tmp = Float64(x + y); elseif (z <= 1.4e-118) tmp = Float64(x + Float64(y / Float64(a / t))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -200000000000.0) tmp = x + y; elseif (z <= 1.4e-118) tmp = x + (y / (a / t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -200000000000.0], N[(x + y), $MachinePrecision], If[LessEqual[z, 1.4e-118], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -200000000000:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-118}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -2e11 or 1.4e-118 < z Initial program 77.2%
Taylor expanded in z around inf
+-commutativeN/A
+-lowering-+.f6478.1%
Simplified78.1%
if -2e11 < z < 1.4e-118Initial program 96.0%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6496.4%
Applied egg-rr96.4%
Taylor expanded in z around 0
/-lowering-/.f6479.4%
Simplified79.4%
Final simplification78.6%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.7e+180) x (if (<= a 4.2e+126) (+ x y) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.7e+180) {
tmp = x;
} else if (a <= 4.2e+126) {
tmp = x + y;
} 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 <= (-1.7d+180)) then
tmp = x
else if (a <= 4.2d+126) then
tmp = x + y
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 <= -1.7e+180) {
tmp = x;
} else if (a <= 4.2e+126) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.7e+180: tmp = x elif a <= 4.2e+126: tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.7e+180) tmp = x; elseif (a <= 4.2e+126) tmp = Float64(x + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.7e+180) tmp = x; elseif (a <= 4.2e+126) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.7e+180], x, If[LessEqual[a, 4.2e+126], N[(x + y), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.7 \cdot 10^{+180}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 4.2 \cdot 10^{+126}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.69999999999999992e180 or 4.1999999999999998e126 < a Initial program 83.0%
Taylor expanded in x around inf
Simplified70.5%
if -1.69999999999999992e180 < a < 4.1999999999999998e126Initial program 85.0%
Taylor expanded in z around inf
+-commutativeN/A
+-lowering-+.f6471.0%
Simplified71.0%
Final simplification70.9%
(FPCore (x y z t a) :precision binary64 (if (<= x -6.2e-183) x (if (<= x 5.3e-119) y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -6.2e-183) {
tmp = x;
} else if (x <= 5.3e-119) {
tmp = y;
} 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 (x <= (-6.2d-183)) then
tmp = x
else if (x <= 5.3d-119) then
tmp = y
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 (x <= -6.2e-183) {
tmp = x;
} else if (x <= 5.3e-119) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -6.2e-183: tmp = x elif x <= 5.3e-119: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -6.2e-183) tmp = x; elseif (x <= 5.3e-119) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -6.2e-183) tmp = x; elseif (x <= 5.3e-119) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -6.2e-183], x, If[LessEqual[x, 5.3e-119], y, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.2 \cdot 10^{-183}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 5.3 \cdot 10^{-119}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -6.19999999999999999e-183 or 5.3000000000000004e-119 < x Initial program 84.8%
Taylor expanded in x around inf
Simplified67.8%
if -6.19999999999999999e-183 < x < 5.3000000000000004e-119Initial program 83.6%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6468.2%
Simplified68.2%
Taylor expanded in z around inf
Simplified39.6%
(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 84.4%
Taylor expanded in x around inf
Simplified51.8%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- z a) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - 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 = x + (y / ((z - a) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((z - a) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(z - a) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((z - a) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{z - a}{z - t}}
\end{array}
herbie shell --seed 2024191
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
:precision binary64
:alt
(! :herbie-platform default (+ x (/ y (/ (- z a) (- z t)))))
(+ x (/ (* y (- z t)) (- z a))))