
(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(y * Float64(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[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{z - a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 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(y * Float64(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[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{z - a}
\end{array}
(FPCore (x y z t a) :precision binary64 (- x (/ y (/ (- a z) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x - (y / ((a - z) / (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 / ((a - z) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - (y / ((a - z) / (z - t)));
}
def code(x, y, z, t, a): return x - (y / ((a - z) / (z - t)))
function code(x, y, z, t, a) return Float64(x - Float64(y / Float64(Float64(a - z) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x - (y / ((a - z) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x - N[(y / N[(N[(a - z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y}{\frac{a - z}{z - t}}
\end{array}
Initial program 98.8%
Simplified0
Applied egg-rr0
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (- 1.0 (/ t z)))))
(if (<= y -1.26e+127)
t_1
(if (<= y 1.25e+170)
(+ y x)
(if (<= y 1.4e+230)
(* t (/ y a))
(if (<= y 5.9e+286) (* (/ z (- z a)) y) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (1.0 - (t / z));
double tmp;
if (y <= -1.26e+127) {
tmp = t_1;
} else if (y <= 1.25e+170) {
tmp = y + x;
} else if (y <= 1.4e+230) {
tmp = t * (y / a);
} else if (y <= 5.9e+286) {
tmp = (z / (z - a)) * y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * (1.0d0 - (t / z))
if (y <= (-1.26d+127)) then
tmp = t_1
else if (y <= 1.25d+170) then
tmp = y + x
else if (y <= 1.4d+230) then
tmp = t * (y / a)
else if (y <= 5.9d+286) then
tmp = (z / (z - a)) * y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (1.0 - (t / z));
double tmp;
if (y <= -1.26e+127) {
tmp = t_1;
} else if (y <= 1.25e+170) {
tmp = y + x;
} else if (y <= 1.4e+230) {
tmp = t * (y / a);
} else if (y <= 5.9e+286) {
tmp = (z / (z - a)) * y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (1.0 - (t / z)) tmp = 0 if y <= -1.26e+127: tmp = t_1 elif y <= 1.25e+170: tmp = y + x elif y <= 1.4e+230: tmp = t * (y / a) elif y <= 5.9e+286: tmp = (z / (z - a)) * y else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(1.0 - Float64(t / z))) tmp = 0.0 if (y <= -1.26e+127) tmp = t_1; elseif (y <= 1.25e+170) tmp = Float64(y + x); elseif (y <= 1.4e+230) tmp = Float64(t * Float64(y / a)); elseif (y <= 5.9e+286) tmp = Float64(Float64(z / Float64(z - a)) * y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (1.0 - (t / z)); tmp = 0.0; if (y <= -1.26e+127) tmp = t_1; elseif (y <= 1.25e+170) tmp = y + x; elseif (y <= 1.4e+230) tmp = t * (y / a); elseif (y <= 5.9e+286) tmp = (z / (z - a)) * y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.26e+127], t$95$1, If[LessEqual[y, 1.25e+170], N[(y + x), $MachinePrecision], If[LessEqual[y, 1.4e+230], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.9e+286], N[(N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{if}\;y \leq -1.26 \cdot 10^{+127}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{+170}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{+230}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;y \leq 5.9 \cdot 10^{+286}:\\
\;\;\;\;\frac{z}{z - a} \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.25999999999999995e127 or 5.90000000000000017e286 < y Initial program 98.0%
Taylor expanded in x around 0 0
Simplified0
Taylor expanded in a around 0 0
Simplified0
if -1.25999999999999995e127 < y < 1.24999999999999994e170Initial program 98.9%
Taylor expanded in z around inf 0
Simplified0
if 1.24999999999999994e170 < y < 1.4000000000000001e230Initial program 99.8%
Taylor expanded in z around 0 0
Simplified0
Applied egg-rr0
Taylor expanded in y around inf 0
Simplified0
if 1.4000000000000001e230 < y < 5.90000000000000017e286Initial program 99.7%
Taylor expanded in x around 0 0
Simplified0
Taylor expanded in t around 0 0
Simplified0
Applied egg-rr0
(FPCore (x y z t a) :precision binary64 (if (<= a -1.25e+27) (+ x (* y (/ (- t z) a))) (if (<= a 0.28) (+ (* y (- 1.0 (/ t z))) x) (- x (/ (- z t) (/ a y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.25e+27) {
tmp = x + (y * ((t - z) / a));
} else if (a <= 0.28) {
tmp = (y * (1.0 - (t / z))) + x;
} else {
tmp = x - ((z - t) / (a / 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 (a <= (-1.25d+27)) then
tmp = x + (y * ((t - z) / a))
else if (a <= 0.28d0) then
tmp = (y * (1.0d0 - (t / z))) + x
else
tmp = x - ((z - t) / (a / y))
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.25e+27) {
tmp = x + (y * ((t - z) / a));
} else if (a <= 0.28) {
tmp = (y * (1.0 - (t / z))) + x;
} else {
tmp = x - ((z - t) / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.25e+27: tmp = x + (y * ((t - z) / a)) elif a <= 0.28: tmp = (y * (1.0 - (t / z))) + x else: tmp = x - ((z - t) / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.25e+27) tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a))); elseif (a <= 0.28) tmp = Float64(Float64(y * Float64(1.0 - Float64(t / z))) + x); else tmp = Float64(x - Float64(Float64(z - t) / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.25e+27) tmp = x + (y * ((t - z) / a)); elseif (a <= 0.28) tmp = (y * (1.0 - (t / z))) + x; else tmp = x - ((z - t) / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.25e+27], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 0.28], N[(N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(x - N[(N[(z - t), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.25 \cdot 10^{+27}:\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\mathbf{elif}\;a \leq 0.28:\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right) + x\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z - t}{\frac{a}{y}}\\
\end{array}
\end{array}
if a < -1.24999999999999995e27Initial program 99.9%
Taylor expanded in a around inf 0
Simplified0
if -1.24999999999999995e27 < a < 0.28000000000000003Initial program 98.4%
Taylor expanded in a around 0 0
Simplified0
if 0.28000000000000003 < a Initial program 98.3%
Simplified0
Applied egg-rr0
Applied egg-rr0
Taylor expanded in a around inf 0
Simplified0
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ x (* y (/ (- t z) a))))) (if (<= a -2.2e+26) t_1 (if (<= a 82.0) (+ (* y (- 1.0 (/ t z))) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((t - z) / a));
double tmp;
if (a <= -2.2e+26) {
tmp = t_1;
} else if (a <= 82.0) {
tmp = (y * (1.0 - (t / z))) + 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 = x + (y * ((t - z) / a))
if (a <= (-2.2d+26)) then
tmp = t_1
else if (a <= 82.0d0) then
tmp = (y * (1.0d0 - (t / z))) + 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 = x + (y * ((t - z) / a));
double tmp;
if (a <= -2.2e+26) {
tmp = t_1;
} else if (a <= 82.0) {
tmp = (y * (1.0 - (t / z))) + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * ((t - z) / a)) tmp = 0 if a <= -2.2e+26: tmp = t_1 elif a <= 82.0: tmp = (y * (1.0 - (t / z))) + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(Float64(t - z) / a))) tmp = 0.0 if (a <= -2.2e+26) tmp = t_1; elseif (a <= 82.0) tmp = Float64(Float64(y * Float64(1.0 - Float64(t / z))) + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * ((t - z) / a)); tmp = 0.0; if (a <= -2.2e+26) tmp = t_1; elseif (a <= 82.0) tmp = (y * (1.0 - (t / z))) + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.2e+26], t$95$1, If[LessEqual[a, 82.0], N[(N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{t - z}{a}\\
\mathbf{if}\;a \leq -2.2 \cdot 10^{+26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 82:\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right) + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.20000000000000007e26 or 82 < a Initial program 99.1%
Taylor expanded in a around inf 0
Simplified0
if -2.20000000000000007e26 < a < 82Initial program 98.4%
Taylor expanded in a around 0 0
Simplified0
(FPCore (x y z t a) :precision binary64 (if (<= z -7e-94) (+ y x) (if (<= z 4.6e+81) (+ x (* y (/ (- t z) a))) (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7e-94) {
tmp = y + x;
} else if (z <= 4.6e+81) {
tmp = x + (y * ((t - z) / a));
} else {
tmp = y + 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 <= (-7d-94)) then
tmp = y + x
else if (z <= 4.6d+81) then
tmp = x + (y * ((t - z) / a))
else
tmp = y + 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 <= -7e-94) {
tmp = y + x;
} else if (z <= 4.6e+81) {
tmp = x + (y * ((t - z) / a));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -7e-94: tmp = y + x elif z <= 4.6e+81: tmp = x + (y * ((t - z) / a)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7e-94) tmp = Float64(y + x); elseif (z <= 4.6e+81) tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -7e-94) tmp = y + x; elseif (z <= 4.6e+81) tmp = x + (y * ((t - z) / a)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7e-94], N[(y + x), $MachinePrecision], If[LessEqual[z, 4.6e+81], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{-94}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{+81}:\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -6.99999999999999996e-94 or 4.5999999999999998e81 < z Initial program 100.0%
Taylor expanded in z around inf 0
Simplified0
if -6.99999999999999996e-94 < z < 4.5999999999999998e81Initial program 97.6%
Taylor expanded in a around inf 0
Simplified0
(FPCore (x y z t a) :precision binary64 (if (<= z -6.5e-94) (+ y x) (if (<= z 6.5e+80) (+ (/ y (/ a t)) x) (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.5e-94) {
tmp = y + x;
} else if (z <= 6.5e+80) {
tmp = (y / (a / t)) + x;
} else {
tmp = y + 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 <= (-6.5d-94)) then
tmp = y + x
else if (z <= 6.5d+80) then
tmp = (y / (a / t)) + x
else
tmp = y + 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 <= -6.5e-94) {
tmp = y + x;
} else if (z <= 6.5e+80) {
tmp = (y / (a / t)) + x;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.5e-94: tmp = y + x elif z <= 6.5e+80: tmp = (y / (a / t)) + x else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.5e-94) tmp = Float64(y + x); elseif (z <= 6.5e+80) tmp = Float64(Float64(y / Float64(a / t)) + x); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.5e-94) tmp = y + x; elseif (z <= 6.5e+80) tmp = (y / (a / t)) + x; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.5e-94], N[(y + x), $MachinePrecision], If[LessEqual[z, 6.5e+80], N[(N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{-94}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+80}:\\
\;\;\;\;\frac{y}{\frac{a}{t}} + x\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -6.4999999999999996e-94 or 6.4999999999999998e80 < z Initial program 100.0%
Taylor expanded in z around inf 0
Simplified0
if -6.4999999999999996e-94 < z < 6.4999999999999998e80Initial program 97.6%
Taylor expanded in z around 0 0
Simplified0
Applied egg-rr0
(FPCore (x y z t a) :precision binary64 (if (<= z -7.5e-94) (+ y x) (if (<= z 7e+80) (+ x (* y (/ t a))) (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.5e-94) {
tmp = y + x;
} else if (z <= 7e+80) {
tmp = x + (y * (t / a));
} else {
tmp = y + 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 <= (-7.5d-94)) then
tmp = y + x
else if (z <= 7d+80) then
tmp = x + (y * (t / a))
else
tmp = y + 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 <= -7.5e-94) {
tmp = y + x;
} else if (z <= 7e+80) {
tmp = x + (y * (t / a));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -7.5e-94: tmp = y + x elif z <= 7e+80: tmp = x + (y * (t / a)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7.5e-94) tmp = Float64(y + x); elseif (z <= 7e+80) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -7.5e-94) tmp = y + x; elseif (z <= 7e+80) tmp = x + (y * (t / a)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7.5e-94], N[(y + x), $MachinePrecision], If[LessEqual[z, 7e+80], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{-94}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+80}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -7.5000000000000003e-94 or 6.99999999999999987e80 < z Initial program 100.0%
Taylor expanded in z around inf 0
Simplified0
if -7.5000000000000003e-94 < z < 6.99999999999999987e80Initial program 97.6%
Taylor expanded in z around 0 0
Simplified0
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* y (- 1.0 (/ t z))))) (if (<= y -6.6e+127) t_1 (if (<= y 3.6e+168) (+ y x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (1.0 - (t / z));
double tmp;
if (y <= -6.6e+127) {
tmp = t_1;
} else if (y <= 3.6e+168) {
tmp = y + x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * (1.0d0 - (t / z))
if (y <= (-6.6d+127)) then
tmp = t_1
else if (y <= 3.6d+168) then
tmp = y + x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (1.0 - (t / z));
double tmp;
if (y <= -6.6e+127) {
tmp = t_1;
} else if (y <= 3.6e+168) {
tmp = y + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (1.0 - (t / z)) tmp = 0 if y <= -6.6e+127: tmp = t_1 elif y <= 3.6e+168: tmp = y + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(1.0 - Float64(t / z))) tmp = 0.0 if (y <= -6.6e+127) tmp = t_1; elseif (y <= 3.6e+168) tmp = Float64(y + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (1.0 - (t / z)); tmp = 0.0; if (y <= -6.6e+127) tmp = t_1; elseif (y <= 3.6e+168) tmp = y + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.6e+127], t$95$1, If[LessEqual[y, 3.6e+168], N[(y + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{if}\;y \leq -6.6 \cdot 10^{+127}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{+168}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -6.59999999999999953e127 or 3.5999999999999999e168 < y Initial program 98.6%
Taylor expanded in x around 0 0
Simplified0
Taylor expanded in a around 0 0
Simplified0
if -6.59999999999999953e127 < y < 3.5999999999999999e168Initial program 98.9%
Taylor expanded in z around inf 0
Simplified0
(FPCore (x y z t a) :precision binary64 (if (<= x -4.2e-121) x (if (<= x 3.7e-169) y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -4.2e-121) {
tmp = x;
} else if (x <= 3.7e-169) {
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 <= (-4.2d-121)) then
tmp = x
else if (x <= 3.7d-169) 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 <= -4.2e-121) {
tmp = x;
} else if (x <= 3.7e-169) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -4.2e-121: tmp = x elif x <= 3.7e-169: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -4.2e-121) tmp = x; elseif (x <= 3.7e-169) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -4.2e-121) tmp = x; elseif (x <= 3.7e-169) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -4.2e-121], x, If[LessEqual[x, 3.7e-169], y, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.2 \cdot 10^{-121}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 3.7 \cdot 10^{-169}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -4.1999999999999997e-121 or 3.6999999999999997e-169 < x Initial program 98.8%
Taylor expanded in x around inf 0
Simplified0
if -4.1999999999999997e-121 < x < 3.6999999999999997e-169Initial program 98.7%
Taylor expanded in x around 0 0
Simplified0
Taylor expanded in z around inf 0
Simplified0
(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(y * Float64(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[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{z - a}
\end{array}
Initial program 98.8%
(FPCore (x y z t a) :precision binary64 (if (<= y 9.4e+170) (+ y x) (* t (/ y a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 9.4e+170) {
tmp = y + x;
} else {
tmp = t * (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 (y <= 9.4d+170) then
tmp = y + x
else
tmp = t * (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 (y <= 9.4e+170) {
tmp = y + x;
} else {
tmp = t * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 9.4e+170: tmp = y + x else: tmp = t * (y / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 9.4e+170) tmp = Float64(y + x); else tmp = Float64(t * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= 9.4e+170) tmp = y + x; else tmp = t * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 9.4e+170], N[(y + x), $MachinePrecision], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 9.4 \cdot 10^{+170}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if y < 9.40000000000000008e170Initial program 98.6%
Taylor expanded in z around inf 0
Simplified0
if 9.40000000000000008e170 < y Initial program 99.8%
Taylor expanded in z around 0 0
Simplified0
Applied egg-rr0
Taylor expanded in y around inf 0
Simplified0
(FPCore (x y z t a) :precision binary64 (+ y x))
double code(double x, double y, double z, double t, double a) {
return y + 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 = y + x
end function
public static double code(double x, double y, double z, double t, double a) {
return y + x;
}
def code(x, y, z, t, a): return y + x
function code(x, y, z, t, a) return Float64(y + x) end
function tmp = code(x, y, z, t, a) tmp = y + x; end
code[x_, y_, z_, t_, a_] := N[(y + x), $MachinePrecision]
\begin{array}{l}
\\
y + x
\end{array}
Initial program 98.8%
Taylor expanded in z around inf 0
Simplified0
(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 98.8%
Taylor expanded in x around inf 0
Simplified0
(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 2024110
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, A"
:precision binary64
:alt
(+ x (/ y (/ (- z a) (- z t))))
(+ x (* y (/ (- z t) (- z a)))))