
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) t) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((y - z) * t) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * t) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * t) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot t}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) t) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((y - z) * t) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * t) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * t) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot t}{a - z}
\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(Float64(Float64(y - z) / Float64(a - 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[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y - z}{a - z} \cdot t
\end{array}
Initial program 87.1%
Applied egg-rr0
(FPCore (x y z t a)
:precision binary64
(if (<= z -2e+146)
(+ x t)
(if (<= z -3.1e+24)
(* (/ (- y z) (- a z)) t)
(if (<= z -1.7e-77)
(- x (* t (/ y z)))
(if (<= z 1.25e+81) (+ x (* (/ (- y z) a) t)) (+ x t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2e+146) {
tmp = x + t;
} else if (z <= -3.1e+24) {
tmp = ((y - z) / (a - z)) * t;
} else if (z <= -1.7e-77) {
tmp = x - (t * (y / z));
} else if (z <= 1.25e+81) {
tmp = x + (((y - z) / a) * t);
} else {
tmp = x + 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 <= (-2d+146)) then
tmp = x + t
else if (z <= (-3.1d+24)) then
tmp = ((y - z) / (a - z)) * t
else if (z <= (-1.7d-77)) then
tmp = x - (t * (y / z))
else if (z <= 1.25d+81) then
tmp = x + (((y - z) / a) * t)
else
tmp = x + 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 <= -2e+146) {
tmp = x + t;
} else if (z <= -3.1e+24) {
tmp = ((y - z) / (a - z)) * t;
} else if (z <= -1.7e-77) {
tmp = x - (t * (y / z));
} else if (z <= 1.25e+81) {
tmp = x + (((y - z) / a) * t);
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2e+146: tmp = x + t elif z <= -3.1e+24: tmp = ((y - z) / (a - z)) * t elif z <= -1.7e-77: tmp = x - (t * (y / z)) elif z <= 1.25e+81: tmp = x + (((y - z) / a) * t) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2e+146) tmp = Float64(x + t); elseif (z <= -3.1e+24) tmp = Float64(Float64(Float64(y - z) / Float64(a - z)) * t); elseif (z <= -1.7e-77) tmp = Float64(x - Float64(t * Float64(y / z))); elseif (z <= 1.25e+81) tmp = Float64(x + Float64(Float64(Float64(y - z) / a) * t)); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2e+146) tmp = x + t; elseif (z <= -3.1e+24) tmp = ((y - z) / (a - z)) * t; elseif (z <= -1.7e-77) tmp = x - (t * (y / z)); elseif (z <= 1.25e+81) tmp = x + (((y - z) / a) * t); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2e+146], N[(x + t), $MachinePrecision], If[LessEqual[z, -3.1e+24], N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, -1.7e-77], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.25e+81], N[(x + N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+146}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{+24}:\\
\;\;\;\;\frac{y - z}{a - z} \cdot t\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-77}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+81}:\\
\;\;\;\;x + \frac{y - z}{a} \cdot t\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if z < -1.99999999999999987e146 or 1.25e81 < z Initial program 73.7%
Taylor expanded in z around inf 0
Simplified0
if -1.99999999999999987e146 < z < -3.10000000000000011e24Initial program 79.3%
Taylor expanded in x around 0 0
Simplified0
Applied egg-rr0
if -3.10000000000000011e24 < z < -1.69999999999999991e-77Initial program 100.0%
Applied egg-rr0
Applied egg-rr0
Taylor expanded in a around 0 0
Simplified0
Taylor expanded in y around inf 0
Simplified0
if -1.69999999999999991e-77 < z < 1.25e81Initial program 94.9%
Applied egg-rr0
Taylor expanded in a around inf 0
Simplified0
(FPCore (x y z t a)
:precision binary64
(if (<= z -2e+146)
(+ x t)
(if (<= z -4.1e+24)
(* (/ (- y z) (- a z)) t)
(if (<= z -1.7e-77)
(- x (* t (/ y z)))
(if (<= z 9.2e+18) (+ (/ (* t y) a) x) (+ x t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2e+146) {
tmp = x + t;
} else if (z <= -4.1e+24) {
tmp = ((y - z) / (a - z)) * t;
} else if (z <= -1.7e-77) {
tmp = x - (t * (y / z));
} else if (z <= 9.2e+18) {
tmp = ((t * y) / a) + x;
} else {
tmp = x + 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 <= (-2d+146)) then
tmp = x + t
else if (z <= (-4.1d+24)) then
tmp = ((y - z) / (a - z)) * t
else if (z <= (-1.7d-77)) then
tmp = x - (t * (y / z))
else if (z <= 9.2d+18) then
tmp = ((t * y) / a) + x
else
tmp = x + 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 <= -2e+146) {
tmp = x + t;
} else if (z <= -4.1e+24) {
tmp = ((y - z) / (a - z)) * t;
} else if (z <= -1.7e-77) {
tmp = x - (t * (y / z));
} else if (z <= 9.2e+18) {
tmp = ((t * y) / a) + x;
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2e+146: tmp = x + t elif z <= -4.1e+24: tmp = ((y - z) / (a - z)) * t elif z <= -1.7e-77: tmp = x - (t * (y / z)) elif z <= 9.2e+18: tmp = ((t * y) / a) + x else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2e+146) tmp = Float64(x + t); elseif (z <= -4.1e+24) tmp = Float64(Float64(Float64(y - z) / Float64(a - z)) * t); elseif (z <= -1.7e-77) tmp = Float64(x - Float64(t * Float64(y / z))); elseif (z <= 9.2e+18) tmp = Float64(Float64(Float64(t * y) / a) + x); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2e+146) tmp = x + t; elseif (z <= -4.1e+24) tmp = ((y - z) / (a - z)) * t; elseif (z <= -1.7e-77) tmp = x - (t * (y / z)); elseif (z <= 9.2e+18) tmp = ((t * y) / a) + x; else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2e+146], N[(x + t), $MachinePrecision], If[LessEqual[z, -4.1e+24], N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, -1.7e-77], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.2e+18], N[(N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], N[(x + t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+146}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq -4.1 \cdot 10^{+24}:\\
\;\;\;\;\frac{y - z}{a - z} \cdot t\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-77}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{+18}:\\
\;\;\;\;\frac{t \cdot y}{a} + x\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if z < -1.99999999999999987e146 or 9.2e18 < z Initial program 75.2%
Taylor expanded in z around inf 0
Simplified0
if -1.99999999999999987e146 < z < -4.1000000000000001e24Initial program 79.3%
Taylor expanded in x around 0 0
Simplified0
Applied egg-rr0
if -4.1000000000000001e24 < z < -1.69999999999999991e-77Initial program 100.0%
Applied egg-rr0
Applied egg-rr0
Taylor expanded in a around 0 0
Simplified0
Taylor expanded in y around inf 0
Simplified0
if -1.69999999999999991e-77 < z < 9.2e18Initial program 96.6%
Taylor expanded in z around 0 0
Simplified0
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ y z)))))
(if (<= t -3.7e+130)
t_1
(if (<= t -3e+50) (* (/ y a) t) (if (<= t 1.15e+240) (+ x t) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (1.0 - (y / z));
double tmp;
if (t <= -3.7e+130) {
tmp = t_1;
} else if (t <= -3e+50) {
tmp = (y / a) * t;
} else if (t <= 1.15e+240) {
tmp = x + 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 = t * (1.0d0 - (y / z))
if (t <= (-3.7d+130)) then
tmp = t_1
else if (t <= (-3d+50)) then
tmp = (y / a) * t
else if (t <= 1.15d+240) then
tmp = x + 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 = t * (1.0 - (y / z));
double tmp;
if (t <= -3.7e+130) {
tmp = t_1;
} else if (t <= -3e+50) {
tmp = (y / a) * t;
} else if (t <= 1.15e+240) {
tmp = x + t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (1.0 - (y / z)) tmp = 0 if t <= -3.7e+130: tmp = t_1 elif t <= -3e+50: tmp = (y / a) * t elif t <= 1.15e+240: tmp = x + t else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (t <= -3.7e+130) tmp = t_1; elseif (t <= -3e+50) tmp = Float64(Float64(y / a) * t); elseif (t <= 1.15e+240) tmp = Float64(x + t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (1.0 - (y / z)); tmp = 0.0; if (t <= -3.7e+130) tmp = t_1; elseif (t <= -3e+50) tmp = (y / a) * t; elseif (t <= 1.15e+240) tmp = x + t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.7e+130], t$95$1, If[LessEqual[t, -3e+50], N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[t, 1.15e+240], N[(x + t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;t \leq -3.7 \cdot 10^{+130}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -3 \cdot 10^{+50}:\\
\;\;\;\;\frac{y}{a} \cdot t\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+240}:\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.7000000000000001e130 or 1.15000000000000001e240 < t Initial program 60.6%
Applied egg-rr0
Applied egg-rr0
Taylor expanded in a around 0 0
Simplified0
Taylor expanded in x around 0 0
Simplified0
if -3.7000000000000001e130 < t < -2.9999999999999998e50Initial program 85.6%
Taylor expanded in y around inf 0
Simplified0
Applied egg-rr0
Taylor expanded in a around inf 0
Simplified0
if -2.9999999999999998e50 < t < 1.15000000000000001e240Initial program 94.7%
Taylor expanded in z around inf 0
Simplified0
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ (* t (- 1.0 (/ y z))) x))) (if (<= z -5.6e-94) t_1 (if (<= z 6.5e+80) (+ (/ (- y z) (/ a t)) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t * (1.0 - (y / z))) + x;
double tmp;
if (z <= -5.6e-94) {
tmp = t_1;
} else if (z <= 6.5e+80) {
tmp = ((y - z) / (a / t)) + x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (t * (1.0d0 - (y / z))) + x
if (z <= (-5.6d-94)) then
tmp = t_1
else if (z <= 6.5d+80) then
tmp = ((y - z) / (a / t)) + x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (t * (1.0 - (y / z))) + x;
double tmp;
if (z <= -5.6e-94) {
tmp = t_1;
} else if (z <= 6.5e+80) {
tmp = ((y - z) / (a / t)) + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (t * (1.0 - (y / z))) + x tmp = 0 if z <= -5.6e-94: tmp = t_1 elif z <= 6.5e+80: tmp = ((y - z) / (a / t)) + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(t * Float64(1.0 - Float64(y / z))) + x) tmp = 0.0 if (z <= -5.6e-94) tmp = t_1; elseif (z <= 6.5e+80) tmp = Float64(Float64(Float64(y - z) / Float64(a / t)) + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (t * (1.0 - (y / z))) + x; tmp = 0.0; if (z <= -5.6e-94) tmp = t_1; elseif (z <= 6.5e+80) tmp = ((y - z) / (a / t)) + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[z, -5.6e-94], t$95$1, If[LessEqual[z, 6.5e+80], N[(N[(N[(y - z), $MachinePrecision] / N[(a / t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{y}{z}\right) + x\\
\mathbf{if}\;z \leq -5.6 \cdot 10^{-94}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+80}:\\
\;\;\;\;\frac{y - z}{\frac{a}{t}} + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.5999999999999995e-94 or 6.4999999999999998e80 < z Initial program 79.7%
Taylor expanded in a around 0 0
Simplified0
if -5.5999999999999995e-94 < z < 6.4999999999999998e80Initial program 94.7%
Applied egg-rr0
Taylor expanded in a around inf 0
Simplified0
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ (* t (- 1.0 (/ y z))) x))) (if (<= z -5.6e-94) t_1 (if (<= z 2.9e+81) (+ x (* (/ (- y z) a) t)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t * (1.0 - (y / z))) + x;
double tmp;
if (z <= -5.6e-94) {
tmp = t_1;
} else if (z <= 2.9e+81) {
tmp = x + (((y - z) / 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 = (t * (1.0d0 - (y / z))) + x
if (z <= (-5.6d-94)) then
tmp = t_1
else if (z <= 2.9d+81) then
tmp = x + (((y - z) / 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 = (t * (1.0 - (y / z))) + x;
double tmp;
if (z <= -5.6e-94) {
tmp = t_1;
} else if (z <= 2.9e+81) {
tmp = x + (((y - z) / a) * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (t * (1.0 - (y / z))) + x tmp = 0 if z <= -5.6e-94: tmp = t_1 elif z <= 2.9e+81: tmp = x + (((y - z) / a) * t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(t * Float64(1.0 - Float64(y / z))) + x) tmp = 0.0 if (z <= -5.6e-94) tmp = t_1; elseif (z <= 2.9e+81) tmp = Float64(x + Float64(Float64(Float64(y - z) / a) * t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (t * (1.0 - (y / z))) + x; tmp = 0.0; if (z <= -5.6e-94) tmp = t_1; elseif (z <= 2.9e+81) tmp = x + (((y - z) / a) * t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[z, -5.6e-94], t$95$1, If[LessEqual[z, 2.9e+81], N[(x + N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{y}{z}\right) + x\\
\mathbf{if}\;z \leq -5.6 \cdot 10^{-94}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{+81}:\\
\;\;\;\;x + \frac{y - z}{a} \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.5999999999999995e-94 or 2.9e81 < z Initial program 79.7%
Taylor expanded in a around 0 0
Simplified0
if -5.5999999999999995e-94 < z < 2.9e81Initial program 94.7%
Applied egg-rr0
Taylor expanded in a around inf 0
Simplified0
(FPCore (x y z t a) :precision binary64 (if (<= z -4e-62) (+ x t) (if (<= z 6.2e+18) (+ (/ (* t y) a) x) (+ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4e-62) {
tmp = x + t;
} else if (z <= 6.2e+18) {
tmp = ((t * y) / a) + x;
} else {
tmp = x + 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 <= (-4d-62)) then
tmp = x + t
else if (z <= 6.2d+18) then
tmp = ((t * y) / a) + x
else
tmp = x + 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 <= -4e-62) {
tmp = x + t;
} else if (z <= 6.2e+18) {
tmp = ((t * y) / a) + x;
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4e-62: tmp = x + t elif z <= 6.2e+18: tmp = ((t * y) / a) + x else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4e-62) tmp = Float64(x + t); elseif (z <= 6.2e+18) tmp = Float64(Float64(Float64(t * y) / a) + x); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4e-62) tmp = x + t; elseif (z <= 6.2e+18) tmp = ((t * y) / a) + x; else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4e-62], N[(x + t), $MachinePrecision], If[LessEqual[z, 6.2e+18], N[(N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], N[(x + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{-62}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+18}:\\
\;\;\;\;\frac{t \cdot y}{a} + x\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if z < -4.0000000000000002e-62 or 6.2e18 < z Initial program 78.5%
Taylor expanded in z around inf 0
Simplified0
if -4.0000000000000002e-62 < z < 6.2e18Initial program 96.8%
Taylor expanded in z around 0 0
Simplified0
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* y (/ t (- a z))))) (if (<= y -7.8e+125) t_1 (if (<= y 8.5e+158) (+ x t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (t / (a - z));
double tmp;
if (y <= -7.8e+125) {
tmp = t_1;
} else if (y <= 8.5e+158) {
tmp = x + 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 = y * (t / (a - z))
if (y <= (-7.8d+125)) then
tmp = t_1
else if (y <= 8.5d+158) then
tmp = x + 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 = y * (t / (a - z));
double tmp;
if (y <= -7.8e+125) {
tmp = t_1;
} else if (y <= 8.5e+158) {
tmp = x + t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (t / (a - z)) tmp = 0 if y <= -7.8e+125: tmp = t_1 elif y <= 8.5e+158: tmp = x + t else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(t / Float64(a - z))) tmp = 0.0 if (y <= -7.8e+125) tmp = t_1; elseif (y <= 8.5e+158) tmp = Float64(x + t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (t / (a - z)); tmp = 0.0; if (y <= -7.8e+125) tmp = t_1; elseif (y <= 8.5e+158) tmp = x + t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.8e+125], t$95$1, If[LessEqual[y, 8.5e+158], N[(x + t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{t}{a - z}\\
\mathbf{if}\;y \leq -7.8 \cdot 10^{+125}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{+158}:\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -7.8000000000000005e125 or 8.49999999999999978e158 < y Initial program 82.6%
Taylor expanded in y around inf 0
Simplified0
Applied egg-rr0
if -7.8000000000000005e125 < y < 8.49999999999999978e158Initial program 89.2%
Taylor expanded in z around inf 0
Simplified0
(FPCore (x y z t a) :precision binary64 (if (<= z -1.15e-196) (+ x t) (if (<= z 8e-200) (* (/ y a) t) (+ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.15e-196) {
tmp = x + t;
} else if (z <= 8e-200) {
tmp = (y / a) * t;
} else {
tmp = x + 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 <= (-1.15d-196)) then
tmp = x + t
else if (z <= 8d-200) then
tmp = (y / a) * t
else
tmp = x + 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 <= -1.15e-196) {
tmp = x + t;
} else if (z <= 8e-200) {
tmp = (y / a) * t;
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.15e-196: tmp = x + t elif z <= 8e-200: tmp = (y / a) * t else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.15e-196) tmp = Float64(x + t); elseif (z <= 8e-200) tmp = Float64(Float64(y / a) * t); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.15e-196) tmp = x + t; elseif (z <= 8e-200) tmp = (y / a) * t; else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.15e-196], N[(x + t), $MachinePrecision], If[LessEqual[z, 8e-200], N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision], N[(x + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{-196}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq 8 \cdot 10^{-200}:\\
\;\;\;\;\frac{y}{a} \cdot t\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if z < -1.1500000000000001e-196 or 7.9999999999999999e-200 < z Initial program 86.0%
Taylor expanded in z around inf 0
Simplified0
if -1.1500000000000001e-196 < z < 7.9999999999999999e-200Initial program 93.0%
Taylor expanded in y around inf 0
Simplified0
Applied egg-rr0
Taylor expanded in a around inf 0
Simplified0
(FPCore (x y z t a) :precision binary64 (if (<= z -2.15e+40) (+ x t) (if (<= z 6.2e-78) x (+ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.15e+40) {
tmp = x + t;
} else if (z <= 6.2e-78) {
tmp = x;
} else {
tmp = x + 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 <= (-2.15d+40)) then
tmp = x + t
else if (z <= 6.2d-78) then
tmp = x
else
tmp = x + 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 <= -2.15e+40) {
tmp = x + t;
} else if (z <= 6.2e-78) {
tmp = x;
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.15e+40: tmp = x + t elif z <= 6.2e-78: tmp = x else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.15e+40) tmp = Float64(x + t); elseif (z <= 6.2e-78) tmp = x; else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.15e+40) tmp = x + t; elseif (z <= 6.2e-78) tmp = x; else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.15e+40], N[(x + t), $MachinePrecision], If[LessEqual[z, 6.2e-78], x, N[(x + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.15 \cdot 10^{+40}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-78}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if z < -2.1500000000000001e40 or 6.20000000000000035e-78 < z Initial program 79.7%
Taylor expanded in z around inf 0
Simplified0
if -2.1500000000000001e40 < z < 6.20000000000000035e-78Initial program 96.6%
Taylor expanded in x around inf 0
Simplified0
(FPCore (x y z t a) :precision binary64 (if (<= x -6.2e-159) x (if (<= x 6.8e-197) t x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -6.2e-159) {
tmp = x;
} else if (x <= 6.8e-197) {
tmp = t;
} 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-159)) then
tmp = x
else if (x <= 6.8d-197) then
tmp = t
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-159) {
tmp = x;
} else if (x <= 6.8e-197) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -6.2e-159: tmp = x elif x <= 6.8e-197: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -6.2e-159) tmp = x; elseif (x <= 6.8e-197) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -6.2e-159) tmp = x; elseif (x <= 6.8e-197) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -6.2e-159], x, If[LessEqual[x, 6.8e-197], t, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.2 \cdot 10^{-159}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 6.8 \cdot 10^{-197}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -6.2e-159 or 6.7999999999999996e-197 < x Initial program 89.2%
Taylor expanded in x around inf 0
Simplified0
if -6.2e-159 < x < 6.7999999999999996e-197Initial program 79.4%
Taylor expanded in x around 0 0
Simplified0
Taylor expanded in z around inf 0
Simplified0
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
return 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 = t
end function
public static double code(double x, double y, double z, double t, double a) {
return t;
}
def code(x, y, z, t, a): return t
function code(x, y, z, t, a) return t end
function tmp = code(x, y, z, t, a) tmp = t; end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 87.1%
Taylor expanded in x around 0 0
Simplified0
Taylor expanded in z around inf 0
Simplified0
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ (- y z) (- a z)) t))))
(if (< t -1.0682974490174067e-39)
t_1
(if (< t 3.9110949887586375e-141) (+ x (/ (* (- y z) t) (- a z))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - z) / (a - z)) * t);
double tmp;
if (t < -1.0682974490174067e-39) {
tmp = t_1;
} else if (t < 3.9110949887586375e-141) {
tmp = x + (((y - z) * t) / (a - z));
} 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) / (a - z)) * t)
if (t < (-1.0682974490174067d-39)) then
tmp = t_1
else if (t < 3.9110949887586375d-141) then
tmp = x + (((y - z) * t) / (a - z))
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) / (a - z)) * t);
double tmp;
if (t < -1.0682974490174067e-39) {
tmp = t_1;
} else if (t < 3.9110949887586375e-141) {
tmp = x + (((y - z) * t) / (a - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - z) / (a - z)) * t) tmp = 0 if t < -1.0682974490174067e-39: tmp = t_1 elif t < 3.9110949887586375e-141: tmp = x + (((y - z) * t) / (a - z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) / Float64(a - z)) * t)) tmp = 0.0 if (t < -1.0682974490174067e-39) tmp = t_1; elseif (t < 3.9110949887586375e-141) tmp = Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - z) / (a - z)) * t); tmp = 0.0; if (t < -1.0682974490174067e-39) tmp = t_1; elseif (t < 3.9110949887586375e-141) tmp = x + (((y - z) * t) / (a - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.0682974490174067e-39], t$95$1, If[Less[t, 3.9110949887586375e-141], N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - z}{a - z} \cdot t\\
\mathbf{if}\;t < -1.0682974490174067 \cdot 10^{-39}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t < 3.9110949887586375 \cdot 10^{-141}:\\
\;\;\;\;x + \frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024110
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, A"
:precision binary64
:alt
(if (< t -1.0682974490174067e-39) (+ x (* (/ (- y z) (- a z)) t)) (if (< t 3.9110949887586375e-141) (+ x (/ (* (- y z) t) (- a z))) (+ x (* (/ (- y z) (- a z)) t))))
(+ x (/ (* (- y z) t) (- a z))))