
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((x - y) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t): return ((x - y) / (z - y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x - y) / Float64(z - y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x - y) / (z - y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y} \cdot t
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((x - y) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t): return ((x - y) / (z - y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x - y) / Float64(z - y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x - y) / (z - y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y} \cdot t
\end{array}
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((x - y) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t): return ((x - y) / (z - y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x - y) / Float64(z - y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x - y) / (z - y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y} \cdot t
\end{array}
Initial program 97.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (/ (- x y) z) t)) (t_2 (* (- 1.0 (/ x y)) t)))
(if (<= y -1.25e+32)
t_2
(if (<= y -1.3e-196)
t_1
(if (<= y 1.65e-60)
(* (/ x (- z y)) t)
(if (<= y 3e+35)
(/ (* (- y) t) (- z y))
(if (<= y 7e+47)
t_1
(if (<= y 5.6e+207) t_2 (/ t (- 1.0 (/ z y)))))))))))
double code(double x, double y, double z, double t) {
double t_1 = ((x - y) / z) * t;
double t_2 = (1.0 - (x / y)) * t;
double tmp;
if (y <= -1.25e+32) {
tmp = t_2;
} else if (y <= -1.3e-196) {
tmp = t_1;
} else if (y <= 1.65e-60) {
tmp = (x / (z - y)) * t;
} else if (y <= 3e+35) {
tmp = (-y * t) / (z - y);
} else if (y <= 7e+47) {
tmp = t_1;
} else if (y <= 5.6e+207) {
tmp = t_2;
} else {
tmp = t / (1.0 - (z / y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((x - y) / z) * t
t_2 = (1.0d0 - (x / y)) * t
if (y <= (-1.25d+32)) then
tmp = t_2
else if (y <= (-1.3d-196)) then
tmp = t_1
else if (y <= 1.65d-60) then
tmp = (x / (z - y)) * t
else if (y <= 3d+35) then
tmp = (-y * t) / (z - y)
else if (y <= 7d+47) then
tmp = t_1
else if (y <= 5.6d+207) then
tmp = t_2
else
tmp = t / (1.0d0 - (z / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = ((x - y) / z) * t;
double t_2 = (1.0 - (x / y)) * t;
double tmp;
if (y <= -1.25e+32) {
tmp = t_2;
} else if (y <= -1.3e-196) {
tmp = t_1;
} else if (y <= 1.65e-60) {
tmp = (x / (z - y)) * t;
} else if (y <= 3e+35) {
tmp = (-y * t) / (z - y);
} else if (y <= 7e+47) {
tmp = t_1;
} else if (y <= 5.6e+207) {
tmp = t_2;
} else {
tmp = t / (1.0 - (z / y));
}
return tmp;
}
def code(x, y, z, t): t_1 = ((x - y) / z) * t t_2 = (1.0 - (x / y)) * t tmp = 0 if y <= -1.25e+32: tmp = t_2 elif y <= -1.3e-196: tmp = t_1 elif y <= 1.65e-60: tmp = (x / (z - y)) * t elif y <= 3e+35: tmp = (-y * t) / (z - y) elif y <= 7e+47: tmp = t_1 elif y <= 5.6e+207: tmp = t_2 else: tmp = t / (1.0 - (z / y)) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(Float64(x - y) / z) * t) t_2 = Float64(Float64(1.0 - Float64(x / y)) * t) tmp = 0.0 if (y <= -1.25e+32) tmp = t_2; elseif (y <= -1.3e-196) tmp = t_1; elseif (y <= 1.65e-60) tmp = Float64(Float64(x / Float64(z - y)) * t); elseif (y <= 3e+35) tmp = Float64(Float64(Float64(-y) * t) / Float64(z - y)); elseif (y <= 7e+47) tmp = t_1; elseif (y <= 5.6e+207) tmp = t_2; else tmp = Float64(t / Float64(1.0 - Float64(z / y))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = ((x - y) / z) * t; t_2 = (1.0 - (x / y)) * t; tmp = 0.0; if (y <= -1.25e+32) tmp = t_2; elseif (y <= -1.3e-196) tmp = t_1; elseif (y <= 1.65e-60) tmp = (x / (z - y)) * t; elseif (y <= 3e+35) tmp = (-y * t) / (z - y); elseif (y <= 7e+47) tmp = t_1; elseif (y <= 5.6e+207) tmp = t_2; else tmp = t / (1.0 - (z / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[y, -1.25e+32], t$95$2, If[LessEqual[y, -1.3e-196], t$95$1, If[LessEqual[y, 1.65e-60], N[(N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y, 3e+35], N[(N[((-y) * t), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7e+47], t$95$1, If[LessEqual[y, 5.6e+207], t$95$2, N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x - y}{z} \cdot t\\
t_2 := \left(1 - \frac{x}{y}\right) \cdot t\\
\mathbf{if}\;y \leq -1.25 \cdot 10^{+32}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{-196}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.65 \cdot 10^{-60}:\\
\;\;\;\;\frac{x}{z - y} \cdot t\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+35}:\\
\;\;\;\;\frac{\left(-y\right) \cdot t}{z - y}\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 5.6 \cdot 10^{+207}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{1 - \frac{z}{y}}\\
\end{array}
\end{array}
if y < -1.2499999999999999e32 or 7.00000000000000031e47 < y < 5.60000000000000022e207Initial program 99.8%
Taylor expanded in z around 0 0
Simplified0
if -1.2499999999999999e32 < y < -1.2999999999999999e-196 or 2.99999999999999991e35 < y < 7.00000000000000031e47Initial program 98.0%
Taylor expanded in z around inf 0
Simplified0
if -1.2999999999999999e-196 < y < 1.6499999999999999e-60Initial program 93.6%
Taylor expanded in x around inf 0
Simplified0
if 1.6499999999999999e-60 < y < 2.99999999999999991e35Initial program 96.8%
Simplified0
Taylor expanded in x around 0 0
Simplified0
if 5.60000000000000022e207 < y Initial program 99.8%
Taylor expanded in x around 0 0
Simplified0
Applied egg-rr0
Applied egg-rr0
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (/ (- x y) z) t)) (t_2 (* (- 1.0 (/ x y)) t)))
(if (<= y -1.2e+34)
t_2
(if (<= y -1.4e-195)
t_1
(if (<= y 1.56e-59)
(* (/ x (- z y)) t)
(if (<= y 2.75e+39)
(/ y (/ (- y z) t))
(if (<= y 4.6e+48)
t_1
(if (<= y 1.25e+212) t_2 (/ t (- 1.0 (/ z y)))))))))))
double code(double x, double y, double z, double t) {
double t_1 = ((x - y) / z) * t;
double t_2 = (1.0 - (x / y)) * t;
double tmp;
if (y <= -1.2e+34) {
tmp = t_2;
} else if (y <= -1.4e-195) {
tmp = t_1;
} else if (y <= 1.56e-59) {
tmp = (x / (z - y)) * t;
} else if (y <= 2.75e+39) {
tmp = y / ((y - z) / t);
} else if (y <= 4.6e+48) {
tmp = t_1;
} else if (y <= 1.25e+212) {
tmp = t_2;
} else {
tmp = t / (1.0 - (z / y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((x - y) / z) * t
t_2 = (1.0d0 - (x / y)) * t
if (y <= (-1.2d+34)) then
tmp = t_2
else if (y <= (-1.4d-195)) then
tmp = t_1
else if (y <= 1.56d-59) then
tmp = (x / (z - y)) * t
else if (y <= 2.75d+39) then
tmp = y / ((y - z) / t)
else if (y <= 4.6d+48) then
tmp = t_1
else if (y <= 1.25d+212) then
tmp = t_2
else
tmp = t / (1.0d0 - (z / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = ((x - y) / z) * t;
double t_2 = (1.0 - (x / y)) * t;
double tmp;
if (y <= -1.2e+34) {
tmp = t_2;
} else if (y <= -1.4e-195) {
tmp = t_1;
} else if (y <= 1.56e-59) {
tmp = (x / (z - y)) * t;
} else if (y <= 2.75e+39) {
tmp = y / ((y - z) / t);
} else if (y <= 4.6e+48) {
tmp = t_1;
} else if (y <= 1.25e+212) {
tmp = t_2;
} else {
tmp = t / (1.0 - (z / y));
}
return tmp;
}
def code(x, y, z, t): t_1 = ((x - y) / z) * t t_2 = (1.0 - (x / y)) * t tmp = 0 if y <= -1.2e+34: tmp = t_2 elif y <= -1.4e-195: tmp = t_1 elif y <= 1.56e-59: tmp = (x / (z - y)) * t elif y <= 2.75e+39: tmp = y / ((y - z) / t) elif y <= 4.6e+48: tmp = t_1 elif y <= 1.25e+212: tmp = t_2 else: tmp = t / (1.0 - (z / y)) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(Float64(x - y) / z) * t) t_2 = Float64(Float64(1.0 - Float64(x / y)) * t) tmp = 0.0 if (y <= -1.2e+34) tmp = t_2; elseif (y <= -1.4e-195) tmp = t_1; elseif (y <= 1.56e-59) tmp = Float64(Float64(x / Float64(z - y)) * t); elseif (y <= 2.75e+39) tmp = Float64(y / Float64(Float64(y - z) / t)); elseif (y <= 4.6e+48) tmp = t_1; elseif (y <= 1.25e+212) tmp = t_2; else tmp = Float64(t / Float64(1.0 - Float64(z / y))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = ((x - y) / z) * t; t_2 = (1.0 - (x / y)) * t; tmp = 0.0; if (y <= -1.2e+34) tmp = t_2; elseif (y <= -1.4e-195) tmp = t_1; elseif (y <= 1.56e-59) tmp = (x / (z - y)) * t; elseif (y <= 2.75e+39) tmp = y / ((y - z) / t); elseif (y <= 4.6e+48) tmp = t_1; elseif (y <= 1.25e+212) tmp = t_2; else tmp = t / (1.0 - (z / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[y, -1.2e+34], t$95$2, If[LessEqual[y, -1.4e-195], t$95$1, If[LessEqual[y, 1.56e-59], N[(N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y, 2.75e+39], N[(y / N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.6e+48], t$95$1, If[LessEqual[y, 1.25e+212], t$95$2, N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x - y}{z} \cdot t\\
t_2 := \left(1 - \frac{x}{y}\right) \cdot t\\
\mathbf{if}\;y \leq -1.2 \cdot 10^{+34}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -1.4 \cdot 10^{-195}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.56 \cdot 10^{-59}:\\
\;\;\;\;\frac{x}{z - y} \cdot t\\
\mathbf{elif}\;y \leq 2.75 \cdot 10^{+39}:\\
\;\;\;\;\frac{y}{\frac{y - z}{t}}\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{+48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{+212}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{1 - \frac{z}{y}}\\
\end{array}
\end{array}
if y < -1.19999999999999993e34 or 4.6e48 < y < 1.24999999999999998e212Initial program 99.8%
Taylor expanded in z around 0 0
Simplified0
if -1.19999999999999993e34 < y < -1.40000000000000002e-195 or 2.7499999999999999e39 < y < 4.6e48Initial program 98.0%
Taylor expanded in z around inf 0
Simplified0
if -1.40000000000000002e-195 < y < 1.5600000000000001e-59Initial program 93.6%
Taylor expanded in x around inf 0
Simplified0
if 1.5600000000000001e-59 < y < 2.7499999999999999e39Initial program 96.8%
Taylor expanded in x around 0 0
Simplified0
Applied egg-rr0
if 1.24999999999999998e212 < y Initial program 99.8%
Taylor expanded in x around 0 0
Simplified0
Applied egg-rr0
Applied egg-rr0
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (/ t z) (- x y))) (t_2 (* (- 1.0 (/ x y)) t)))
(if (<= y -6.5e+34)
t_2
(if (<= y -8.6e-198)
t_1
(if (<= y 3.35e-177)
(* (/ t (- z y)) x)
(if (<= y 5.5e-38) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = (t / z) * (x - y);
double t_2 = (1.0 - (x / y)) * t;
double tmp;
if (y <= -6.5e+34) {
tmp = t_2;
} else if (y <= -8.6e-198) {
tmp = t_1;
} else if (y <= 3.35e-177) {
tmp = (t / (z - y)) * x;
} else if (y <= 5.5e-38) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (t / z) * (x - y)
t_2 = (1.0d0 - (x / y)) * t
if (y <= (-6.5d+34)) then
tmp = t_2
else if (y <= (-8.6d-198)) then
tmp = t_1
else if (y <= 3.35d-177) then
tmp = (t / (z - y)) * x
else if (y <= 5.5d-38) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (t / z) * (x - y);
double t_2 = (1.0 - (x / y)) * t;
double tmp;
if (y <= -6.5e+34) {
tmp = t_2;
} else if (y <= -8.6e-198) {
tmp = t_1;
} else if (y <= 3.35e-177) {
tmp = (t / (z - y)) * x;
} else if (y <= 5.5e-38) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = (t / z) * (x - y) t_2 = (1.0 - (x / y)) * t tmp = 0 if y <= -6.5e+34: tmp = t_2 elif y <= -8.6e-198: tmp = t_1 elif y <= 3.35e-177: tmp = (t / (z - y)) * x elif y <= 5.5e-38: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(t / z) * Float64(x - y)) t_2 = Float64(Float64(1.0 - Float64(x / y)) * t) tmp = 0.0 if (y <= -6.5e+34) tmp = t_2; elseif (y <= -8.6e-198) tmp = t_1; elseif (y <= 3.35e-177) tmp = Float64(Float64(t / Float64(z - y)) * x); elseif (y <= 5.5e-38) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (t / z) * (x - y); t_2 = (1.0 - (x / y)) * t; tmp = 0.0; if (y <= -6.5e+34) tmp = t_2; elseif (y <= -8.6e-198) tmp = t_1; elseif (y <= 3.35e-177) tmp = (t / (z - y)) * x; elseif (y <= 5.5e-38) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t / z), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[y, -6.5e+34], t$95$2, If[LessEqual[y, -8.6e-198], t$95$1, If[LessEqual[y, 3.35e-177], N[(N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[y, 5.5e-38], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{z} \cdot \left(x - y\right)\\
t_2 := \left(1 - \frac{x}{y}\right) \cdot t\\
\mathbf{if}\;y \leq -6.5 \cdot 10^{+34}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -8.6 \cdot 10^{-198}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.35 \cdot 10^{-177}:\\
\;\;\;\;\frac{t}{z - y} \cdot x\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{-38}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -6.50000000000000017e34 or 5.50000000000000005e-38 < y Initial program 99.8%
Taylor expanded in z around 0 0
Simplified0
if -6.50000000000000017e34 < y < -8.6000000000000007e-198 or 3.35e-177 < y < 5.50000000000000005e-38Initial program 96.7%
Applied egg-rr0
Taylor expanded in z around inf 0
Simplified0
if -8.6000000000000007e-198 < y < 3.35e-177Initial program 92.7%
Taylor expanded in x around inf 0
Simplified0
Applied egg-rr0
(FPCore (x y z t)
:precision binary64
(if (<= y -1.65e+36)
(* (- 1.0 (/ x y)) t)
(if (<= y -1.15e-197)
(* (/ (- x y) z) t)
(if (<= y 2.7e-38) (* (/ x (- z y)) t) (/ t (/ (- y z) y))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.65e+36) {
tmp = (1.0 - (x / y)) * t;
} else if (y <= -1.15e-197) {
tmp = ((x - y) / z) * t;
} else if (y <= 2.7e-38) {
tmp = (x / (z - y)) * t;
} else {
tmp = t / ((y - z) / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.65d+36)) then
tmp = (1.0d0 - (x / y)) * t
else if (y <= (-1.15d-197)) then
tmp = ((x - y) / z) * t
else if (y <= 2.7d-38) then
tmp = (x / (z - y)) * t
else
tmp = t / ((y - z) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.65e+36) {
tmp = (1.0 - (x / y)) * t;
} else if (y <= -1.15e-197) {
tmp = ((x - y) / z) * t;
} else if (y <= 2.7e-38) {
tmp = (x / (z - y)) * t;
} else {
tmp = t / ((y - z) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.65e+36: tmp = (1.0 - (x / y)) * t elif y <= -1.15e-197: tmp = ((x - y) / z) * t elif y <= 2.7e-38: tmp = (x / (z - y)) * t else: tmp = t / ((y - z) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.65e+36) tmp = Float64(Float64(1.0 - Float64(x / y)) * t); elseif (y <= -1.15e-197) tmp = Float64(Float64(Float64(x - y) / z) * t); elseif (y <= 2.7e-38) tmp = Float64(Float64(x / Float64(z - y)) * t); else tmp = Float64(t / Float64(Float64(y - z) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.65e+36) tmp = (1.0 - (x / y)) * t; elseif (y <= -1.15e-197) tmp = ((x - y) / z) * t; elseif (y <= 2.7e-38) tmp = (x / (z - y)) * t; else tmp = t / ((y - z) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.65e+36], N[(N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y, -1.15e-197], N[(N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y, 2.7e-38], N[(N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], N[(t / N[(N[(y - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.65 \cdot 10^{+36}:\\
\;\;\;\;\left(1 - \frac{x}{y}\right) \cdot t\\
\mathbf{elif}\;y \leq -1.15 \cdot 10^{-197}:\\
\;\;\;\;\frac{x - y}{z} \cdot t\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{-38}:\\
\;\;\;\;\frac{x}{z - y} \cdot t\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{y - z}{y}}\\
\end{array}
\end{array}
if y < -1.6499999999999999e36Initial program 99.8%
Taylor expanded in z around 0 0
Simplified0
if -1.6499999999999999e36 < y < -1.15e-197Initial program 97.9%
Taylor expanded in z around inf 0
Simplified0
if -1.15e-197 < y < 2.70000000000000005e-38Initial program 93.3%
Taylor expanded in x around inf 0
Simplified0
if 2.70000000000000005e-38 < y Initial program 99.8%
Taylor expanded in x around 0 0
Simplified0
Applied egg-rr0
(FPCore (x y z t)
:precision binary64
(if (<= y -9.8e+32)
(* (- 1.0 (/ x y)) t)
(if (<= y -3.4e-195)
(* (/ (- x y) z) t)
(if (<= y 5.2e-38) (* (/ x (- z y)) t) (/ t (- 1.0 (/ z y)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9.8e+32) {
tmp = (1.0 - (x / y)) * t;
} else if (y <= -3.4e-195) {
tmp = ((x - y) / z) * t;
} else if (y <= 5.2e-38) {
tmp = (x / (z - y)) * t;
} else {
tmp = t / (1.0 - (z / y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-9.8d+32)) then
tmp = (1.0d0 - (x / y)) * t
else if (y <= (-3.4d-195)) then
tmp = ((x - y) / z) * t
else if (y <= 5.2d-38) then
tmp = (x / (z - y)) * t
else
tmp = t / (1.0d0 - (z / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9.8e+32) {
tmp = (1.0 - (x / y)) * t;
} else if (y <= -3.4e-195) {
tmp = ((x - y) / z) * t;
} else if (y <= 5.2e-38) {
tmp = (x / (z - y)) * t;
} else {
tmp = t / (1.0 - (z / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -9.8e+32: tmp = (1.0 - (x / y)) * t elif y <= -3.4e-195: tmp = ((x - y) / z) * t elif y <= 5.2e-38: tmp = (x / (z - y)) * t else: tmp = t / (1.0 - (z / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -9.8e+32) tmp = Float64(Float64(1.0 - Float64(x / y)) * t); elseif (y <= -3.4e-195) tmp = Float64(Float64(Float64(x - y) / z) * t); elseif (y <= 5.2e-38) tmp = Float64(Float64(x / Float64(z - y)) * t); else tmp = Float64(t / Float64(1.0 - Float64(z / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -9.8e+32) tmp = (1.0 - (x / y)) * t; elseif (y <= -3.4e-195) tmp = ((x - y) / z) * t; elseif (y <= 5.2e-38) tmp = (x / (z - y)) * t; else tmp = t / (1.0 - (z / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -9.8e+32], N[(N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y, -3.4e-195], N[(N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y, 5.2e-38], N[(N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.8 \cdot 10^{+32}:\\
\;\;\;\;\left(1 - \frac{x}{y}\right) \cdot t\\
\mathbf{elif}\;y \leq -3.4 \cdot 10^{-195}:\\
\;\;\;\;\frac{x - y}{z} \cdot t\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{-38}:\\
\;\;\;\;\frac{x}{z - y} \cdot t\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{1 - \frac{z}{y}}\\
\end{array}
\end{array}
if y < -9.8000000000000003e32Initial program 99.8%
Taylor expanded in z around 0 0
Simplified0
if -9.8000000000000003e32 < y < -3.40000000000000001e-195Initial program 97.9%
Taylor expanded in z around inf 0
Simplified0
if -3.40000000000000001e-195 < y < 5.20000000000000022e-38Initial program 93.3%
Taylor expanded in x around inf 0
Simplified0
if 5.20000000000000022e-38 < y Initial program 99.8%
Taylor expanded in x around 0 0
Simplified0
Applied egg-rr0
Applied egg-rr0
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- 1.0 (/ x y)) t)))
(if (<= y -2.1e+32)
t_1
(if (<= y -1.15e-197)
(* (/ (- x y) z) t)
(if (<= y 8.2e-39) (* (/ x (- z y)) t) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = (1.0 - (x / y)) * t;
double tmp;
if (y <= -2.1e+32) {
tmp = t_1;
} else if (y <= -1.15e-197) {
tmp = ((x - y) / z) * t;
} else if (y <= 8.2e-39) {
tmp = (x / (z - y)) * t;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (1.0d0 - (x / y)) * t
if (y <= (-2.1d+32)) then
tmp = t_1
else if (y <= (-1.15d-197)) then
tmp = ((x - y) / z) * t
else if (y <= 8.2d-39) then
tmp = (x / (z - y)) * t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (1.0 - (x / y)) * t;
double tmp;
if (y <= -2.1e+32) {
tmp = t_1;
} else if (y <= -1.15e-197) {
tmp = ((x - y) / z) * t;
} else if (y <= 8.2e-39) {
tmp = (x / (z - y)) * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (1.0 - (x / y)) * t tmp = 0 if y <= -2.1e+32: tmp = t_1 elif y <= -1.15e-197: tmp = ((x - y) / z) * t elif y <= 8.2e-39: tmp = (x / (z - y)) * t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(1.0 - Float64(x / y)) * t) tmp = 0.0 if (y <= -2.1e+32) tmp = t_1; elseif (y <= -1.15e-197) tmp = Float64(Float64(Float64(x - y) / z) * t); elseif (y <= 8.2e-39) tmp = Float64(Float64(x / Float64(z - y)) * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (1.0 - (x / y)) * t; tmp = 0.0; if (y <= -2.1e+32) tmp = t_1; elseif (y <= -1.15e-197) tmp = ((x - y) / z) * t; elseif (y <= 8.2e-39) tmp = (x / (z - y)) * t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[y, -2.1e+32], t$95$1, If[LessEqual[y, -1.15e-197], N[(N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y, 8.2e-39], N[(N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(1 - \frac{x}{y}\right) \cdot t\\
\mathbf{if}\;y \leq -2.1 \cdot 10^{+32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.15 \cdot 10^{-197}:\\
\;\;\;\;\frac{x - y}{z} \cdot t\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{-39}:\\
\;\;\;\;\frac{x}{z - y} \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.1000000000000001e32 or 8.2e-39 < y Initial program 99.8%
Taylor expanded in z around 0 0
Simplified0
if -2.1000000000000001e32 < y < -1.15e-197Initial program 97.9%
Taylor expanded in z around inf 0
Simplified0
if -1.15e-197 < y < 8.2e-39Initial program 93.3%
Taylor expanded in x around inf 0
Simplified0
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ t (- 1.0 (/ z y)))))
(if (<= y -7.5e+160)
t_1
(if (<= y 1.6e+186) (* (/ t (- z y)) (- x y)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = t / (1.0 - (z / y));
double tmp;
if (y <= -7.5e+160) {
tmp = t_1;
} else if (y <= 1.6e+186) {
tmp = (t / (z - y)) * (x - y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = t / (1.0d0 - (z / y))
if (y <= (-7.5d+160)) then
tmp = t_1
else if (y <= 1.6d+186) then
tmp = (t / (z - y)) * (x - y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t / (1.0 - (z / y));
double tmp;
if (y <= -7.5e+160) {
tmp = t_1;
} else if (y <= 1.6e+186) {
tmp = (t / (z - y)) * (x - y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t / (1.0 - (z / y)) tmp = 0 if y <= -7.5e+160: tmp = t_1 elif y <= 1.6e+186: tmp = (t / (z - y)) * (x - y) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t / Float64(1.0 - Float64(z / y))) tmp = 0.0 if (y <= -7.5e+160) tmp = t_1; elseif (y <= 1.6e+186) tmp = Float64(Float64(t / Float64(z - y)) * Float64(x - y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t / (1.0 - (z / y)); tmp = 0.0; if (y <= -7.5e+160) tmp = t_1; elseif (y <= 1.6e+186) tmp = (t / (z - y)) * (x - y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.5e+160], t$95$1, If[LessEqual[y, 1.6e+186], N[(N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{1 - \frac{z}{y}}\\
\mathbf{if}\;y \leq -7.5 \cdot 10^{+160}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{+186}:\\
\;\;\;\;\frac{t}{z - y} \cdot \left(x - y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -7.50000000000000028e160 or 1.6e186 < y Initial program 99.9%
Taylor expanded in x around 0 0
Simplified0
Applied egg-rr0
Applied egg-rr0
if -7.50000000000000028e160 < y < 1.6e186Initial program 96.5%
Applied egg-rr0
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* (- 1.0 (/ x y)) t))) (if (<= y -2.85e+32) t_1 (if (<= y 1.8e-41) (* (/ t z) (- x y)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = (1.0 - (x / y)) * t;
double tmp;
if (y <= -2.85e+32) {
tmp = t_1;
} else if (y <= 1.8e-41) {
tmp = (t / z) * (x - y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (1.0d0 - (x / y)) * t
if (y <= (-2.85d+32)) then
tmp = t_1
else if (y <= 1.8d-41) then
tmp = (t / z) * (x - y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (1.0 - (x / y)) * t;
double tmp;
if (y <= -2.85e+32) {
tmp = t_1;
} else if (y <= 1.8e-41) {
tmp = (t / z) * (x - y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (1.0 - (x / y)) * t tmp = 0 if y <= -2.85e+32: tmp = t_1 elif y <= 1.8e-41: tmp = (t / z) * (x - y) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(1.0 - Float64(x / y)) * t) tmp = 0.0 if (y <= -2.85e+32) tmp = t_1; elseif (y <= 1.8e-41) tmp = Float64(Float64(t / z) * Float64(x - y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (1.0 - (x / y)) * t; tmp = 0.0; if (y <= -2.85e+32) tmp = t_1; elseif (y <= 1.8e-41) tmp = (t / z) * (x - y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[y, -2.85e+32], t$95$1, If[LessEqual[y, 1.8e-41], N[(N[(t / z), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(1 - \frac{x}{y}\right) \cdot t\\
\mathbf{if}\;y \leq -2.85 \cdot 10^{+32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{-41}:\\
\;\;\;\;\frac{t}{z} \cdot \left(x - y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.85e32 or 1.8e-41 < y Initial program 99.8%
Taylor expanded in z around 0 0
Simplified0
if -2.85e32 < y < 1.8e-41Initial program 95.0%
Applied egg-rr0
Taylor expanded in z around inf 0
Simplified0
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* (- 1.0 (/ x y)) t))) (if (<= y -1.65e-48) t_1 (if (<= y 1.22e-42) (/ t (/ z x)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = (1.0 - (x / y)) * t;
double tmp;
if (y <= -1.65e-48) {
tmp = t_1;
} else if (y <= 1.22e-42) {
tmp = t / (z / x);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (1.0d0 - (x / y)) * t
if (y <= (-1.65d-48)) then
tmp = t_1
else if (y <= 1.22d-42) then
tmp = 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 t_1 = (1.0 - (x / y)) * t;
double tmp;
if (y <= -1.65e-48) {
tmp = t_1;
} else if (y <= 1.22e-42) {
tmp = t / (z / x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (1.0 - (x / y)) * t tmp = 0 if y <= -1.65e-48: tmp = t_1 elif y <= 1.22e-42: tmp = t / (z / x) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(1.0 - Float64(x / y)) * t) tmp = 0.0 if (y <= -1.65e-48) tmp = t_1; elseif (y <= 1.22e-42) tmp = Float64(t / Float64(z / x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (1.0 - (x / y)) * t; tmp = 0.0; if (y <= -1.65e-48) tmp = t_1; elseif (y <= 1.22e-42) tmp = t / (z / x); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[y, -1.65e-48], t$95$1, If[LessEqual[y, 1.22e-42], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(1 - \frac{x}{y}\right) \cdot t\\
\mathbf{if}\;y \leq -1.65 \cdot 10^{-48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.22 \cdot 10^{-42}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.65e-48 or 1.22000000000000007e-42 < y Initial program 99.8%
Taylor expanded in z around 0 0
Simplified0
if -1.65e-48 < y < 1.22000000000000007e-42Initial program 94.2%
Taylor expanded in y around 0 0
Simplified0
Applied egg-rr0
(FPCore (x y z t) :precision binary64 (if (<= y -8.8e+64) t (if (<= y 2.4e-38) (* (/ x z) t) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8.8e+64) {
tmp = t;
} else if (y <= 2.4e-38) {
tmp = (x / z) * t;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-8.8d+64)) then
tmp = t
else if (y <= 2.4d-38) then
tmp = (x / z) * t
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8.8e+64) {
tmp = t;
} else if (y <= 2.4e-38) {
tmp = (x / z) * t;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -8.8e+64: tmp = t elif y <= 2.4e-38: tmp = (x / z) * t else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -8.8e+64) tmp = t; elseif (y <= 2.4e-38) tmp = Float64(Float64(x / z) * t); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -8.8e+64) tmp = t; elseif (y <= 2.4e-38) tmp = (x / z) * t; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -8.8e+64], t, If[LessEqual[y, 2.4e-38], N[(N[(x / z), $MachinePrecision] * t), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.8 \cdot 10^{+64}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{-38}:\\
\;\;\;\;\frac{x}{z} \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -8.80000000000000007e64 or 2.40000000000000022e-38 < y Initial program 99.8%
Taylor expanded in y around inf 0
Simplified0
if -8.80000000000000007e64 < y < 2.40000000000000022e-38Initial program 95.2%
Taylor expanded in y around 0 0
Simplified0
(FPCore (x y z t) :precision binary64 (if (<= y -8e+64) t (if (<= y 3.9e-51) (* x (/ t z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8e+64) {
tmp = t;
} else if (y <= 3.9e-51) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-8d+64)) then
tmp = t
else if (y <= 3.9d-51) then
tmp = x * (t / z)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8e+64) {
tmp = t;
} else if (y <= 3.9e-51) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -8e+64: tmp = t elif y <= 3.9e-51: tmp = x * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -8e+64) tmp = t; elseif (y <= 3.9e-51) tmp = Float64(x * Float64(t / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -8e+64) tmp = t; elseif (y <= 3.9e-51) tmp = x * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -8e+64], t, If[LessEqual[y, 3.9e-51], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+64}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 3.9 \cdot 10^{-51}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -8.00000000000000017e64 or 3.8999999999999997e-51 < y Initial program 99.8%
Taylor expanded in y around inf 0
Simplified0
if -8.00000000000000017e64 < y < 3.8999999999999997e-51Initial program 95.2%
Taylor expanded in y around 0 0
Simplified0
Applied egg-rr0
(FPCore (x y z t) :precision binary64 t)
double code(double x, double y, double z, double t) {
return t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = t
end function
public static double code(double x, double y, double z, double t) {
return t;
}
def code(x, y, z, t): return t
function code(x, y, z, t) return t end
function tmp = code(x, y, z, t) tmp = t; end
code[x_, y_, z_, t_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 97.3%
Taylor expanded in y around inf 0
Simplified0
(FPCore (x y z t) :precision binary64 (/ t (/ (- z y) (- x y))))
double code(double x, double y, double z, double t) {
return t / ((z - y) / (x - y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = t / ((z - y) / (x - y))
end function
public static double code(double x, double y, double z, double t) {
return t / ((z - y) / (x - y));
}
def code(x, y, z, t): return t / ((z - y) / (x - y))
function code(x, y, z, t) return Float64(t / Float64(Float64(z - y) / Float64(x - y))) end
function tmp = code(x, y, z, t) tmp = t / ((z - y) / (x - y)); end
code[x_, y_, z_, t_] := N[(t / N[(N[(z - y), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t}{\frac{z - y}{x - y}}
\end{array}
herbie shell --seed 2024110
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
:precision binary64
:alt
(/ t (/ (- z y) (- x y)))
(* (/ (- x y) (- z y)) t))