
(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 15 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.9%
Final simplification97.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ x y)))))
(if (<= y -4.8e+17)
t_1
(if (<= y -2300000000000.0)
(/ (* y (- t)) z)
(if (<= y -6.8e-34)
t_1
(if (<= y -1.92e-107)
(* t (/ (- x y) z))
(if (<= y 1.35e-20) (* t (/ x (- z y))) t_1)))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (1.0 - (x / y));
double tmp;
if (y <= -4.8e+17) {
tmp = t_1;
} else if (y <= -2300000000000.0) {
tmp = (y * -t) / z;
} else if (y <= -6.8e-34) {
tmp = t_1;
} else if (y <= -1.92e-107) {
tmp = t * ((x - y) / z);
} else if (y <= 1.35e-20) {
tmp = t * (x / (z - 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 - (x / y))
if (y <= (-4.8d+17)) then
tmp = t_1
else if (y <= (-2300000000000.0d0)) then
tmp = (y * -t) / z
else if (y <= (-6.8d-34)) then
tmp = t_1
else if (y <= (-1.92d-107)) then
tmp = t * ((x - y) / z)
else if (y <= 1.35d-20) then
tmp = t * (x / (z - 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 - (x / y));
double tmp;
if (y <= -4.8e+17) {
tmp = t_1;
} else if (y <= -2300000000000.0) {
tmp = (y * -t) / z;
} else if (y <= -6.8e-34) {
tmp = t_1;
} else if (y <= -1.92e-107) {
tmp = t * ((x - y) / z);
} else if (y <= 1.35e-20) {
tmp = t * (x / (z - y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (1.0 - (x / y)) tmp = 0 if y <= -4.8e+17: tmp = t_1 elif y <= -2300000000000.0: tmp = (y * -t) / z elif y <= -6.8e-34: tmp = t_1 elif y <= -1.92e-107: tmp = t * ((x - y) / z) elif y <= 1.35e-20: tmp = t * (x / (z - y)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(1.0 - Float64(x / y))) tmp = 0.0 if (y <= -4.8e+17) tmp = t_1; elseif (y <= -2300000000000.0) tmp = Float64(Float64(y * Float64(-t)) / z); elseif (y <= -6.8e-34) tmp = t_1; elseif (y <= -1.92e-107) tmp = Float64(t * Float64(Float64(x - y) / z)); elseif (y <= 1.35e-20) tmp = Float64(t * Float64(x / Float64(z - y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (1.0 - (x / y)); tmp = 0.0; if (y <= -4.8e+17) tmp = t_1; elseif (y <= -2300000000000.0) tmp = (y * -t) / z; elseif (y <= -6.8e-34) tmp = t_1; elseif (y <= -1.92e-107) tmp = t * ((x - y) / z); elseif (y <= 1.35e-20) tmp = t * (x / (z - 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[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.8e+17], t$95$1, If[LessEqual[y, -2300000000000.0], N[(N[(y * (-t)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, -6.8e-34], t$95$1, If[LessEqual[y, -1.92e-107], N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.35e-20], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -4.8 \cdot 10^{+17}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2300000000000:\\
\;\;\;\;\frac{y \cdot \left(-t\right)}{z}\\
\mathbf{elif}\;y \leq -6.8 \cdot 10^{-34}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.92 \cdot 10^{-107}:\\
\;\;\;\;t \cdot \frac{x - y}{z}\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{-20}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -4.8e17 or -2.3e12 < y < -6.8000000000000001e-34 or 1.35e-20 < y Initial program 99.9%
Taylor expanded in y around inf 76.9%
associate--l+76.9%
distribute-lft-out--76.9%
div-sub76.9%
mul-1-neg76.9%
unsub-neg76.9%
Simplified76.9%
Taylor expanded in x around inf 77.5%
if -4.8e17 < y < -2.3e12Initial program 99.4%
associate-*l/100.0%
associate-*r/99.4%
Simplified99.4%
Taylor expanded in z around inf 100.0%
Taylor expanded in x around 0 100.0%
mul-1-neg100.0%
distribute-lft-neg-out100.0%
*-commutative100.0%
Simplified100.0%
if -6.8000000000000001e-34 < y < -1.92000000000000014e-107Initial program 99.6%
Taylor expanded in z around inf 87.6%
if -1.92000000000000014e-107 < y < 1.35e-20Initial program 94.7%
Taylor expanded in x around inf 87.6%
Final simplification82.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- x y) (/ t (- z y)))) (t_2 (* t (- 1.0 (/ x y)))))
(if (<= y -5.5e+164)
t_2
(if (<= y 9.6e-287)
t_1
(if (<= y 1.9e-110)
(/ (* x t) (- z y))
(if (<= y 1.12e+147) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = (x - y) * (t / (z - y));
double t_2 = t * (1.0 - (x / y));
double tmp;
if (y <= -5.5e+164) {
tmp = t_2;
} else if (y <= 9.6e-287) {
tmp = t_1;
} else if (y <= 1.9e-110) {
tmp = (x * t) / (z - y);
} else if (y <= 1.12e+147) {
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 = (x - y) * (t / (z - y))
t_2 = t * (1.0d0 - (x / y))
if (y <= (-5.5d+164)) then
tmp = t_2
else if (y <= 9.6d-287) then
tmp = t_1
else if (y <= 1.9d-110) then
tmp = (x * t) / (z - y)
else if (y <= 1.12d+147) 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 = (x - y) * (t / (z - y));
double t_2 = t * (1.0 - (x / y));
double tmp;
if (y <= -5.5e+164) {
tmp = t_2;
} else if (y <= 9.6e-287) {
tmp = t_1;
} else if (y <= 1.9e-110) {
tmp = (x * t) / (z - y);
} else if (y <= 1.12e+147) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x - y) * (t / (z - y)) t_2 = t * (1.0 - (x / y)) tmp = 0 if y <= -5.5e+164: tmp = t_2 elif y <= 9.6e-287: tmp = t_1 elif y <= 1.9e-110: tmp = (x * t) / (z - y) elif y <= 1.12e+147: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x - y) * Float64(t / Float64(z - y))) t_2 = Float64(t * Float64(1.0 - Float64(x / y))) tmp = 0.0 if (y <= -5.5e+164) tmp = t_2; elseif (y <= 9.6e-287) tmp = t_1; elseif (y <= 1.9e-110) tmp = Float64(Float64(x * t) / Float64(z - y)); elseif (y <= 1.12e+147) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x - y) * (t / (z - y)); t_2 = t * (1.0 - (x / y)); tmp = 0.0; if (y <= -5.5e+164) tmp = t_2; elseif (y <= 9.6e-287) tmp = t_1; elseif (y <= 1.9e-110) tmp = (x * t) / (z - y); elseif (y <= 1.12e+147) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.5e+164], t$95$2, If[LessEqual[y, 9.6e-287], t$95$1, If[LessEqual[y, 1.9e-110], N[(N[(x * t), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.12e+147], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x - y\right) \cdot \frac{t}{z - y}\\
t_2 := t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -5.5 \cdot 10^{+164}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 9.6 \cdot 10^{-287}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-110}:\\
\;\;\;\;\frac{x \cdot t}{z - y}\\
\mathbf{elif}\;y \leq 1.12 \cdot 10^{+147}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -5.4999999999999998e164 or 1.12e147 < y Initial program 99.8%
Taylor expanded in y around inf 92.6%
associate--l+92.6%
distribute-lft-out--92.6%
div-sub92.6%
mul-1-neg92.6%
unsub-neg92.6%
Simplified92.6%
Taylor expanded in x around inf 92.8%
if -5.4999999999999998e164 < y < 9.59999999999999997e-287 or 1.8999999999999999e-110 < y < 1.12e147Initial program 97.8%
associate-*l/87.0%
associate-*r/95.5%
Simplified95.5%
if 9.59999999999999997e-287 < y < 1.8999999999999999e-110Initial program 94.3%
associate-*l/99.7%
associate-*r/83.6%
Simplified83.6%
Taylor expanded in x around inf 97.0%
Final simplification95.0%
(FPCore (x y z t)
:precision binary64
(if (<= y -49000000.0)
(/ t (- 1.0 (/ z y)))
(if (<= y -4e-34)
(* t (- 1.0 (/ x y)))
(if (<= y -4.2e-108)
(* t (/ (- x y) z))
(if (<= y 5.6e-21) (* t (/ x (- z y))) (* t (/ (- y) (- z y))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -49000000.0) {
tmp = t / (1.0 - (z / y));
} else if (y <= -4e-34) {
tmp = t * (1.0 - (x / y));
} else if (y <= -4.2e-108) {
tmp = t * ((x - y) / z);
} else if (y <= 5.6e-21) {
tmp = t * (x / (z - y));
} 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 <= (-49000000.0d0)) then
tmp = t / (1.0d0 - (z / y))
else if (y <= (-4d-34)) then
tmp = t * (1.0d0 - (x / y))
else if (y <= (-4.2d-108)) then
tmp = t * ((x - y) / z)
else if (y <= 5.6d-21) then
tmp = t * (x / (z - y))
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 <= -49000000.0) {
tmp = t / (1.0 - (z / y));
} else if (y <= -4e-34) {
tmp = t * (1.0 - (x / y));
} else if (y <= -4.2e-108) {
tmp = t * ((x - y) / z);
} else if (y <= 5.6e-21) {
tmp = t * (x / (z - y));
} else {
tmp = t * (-y / (z - y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -49000000.0: tmp = t / (1.0 - (z / y)) elif y <= -4e-34: tmp = t * (1.0 - (x / y)) elif y <= -4.2e-108: tmp = t * ((x - y) / z) elif y <= 5.6e-21: tmp = t * (x / (z - y)) else: tmp = t * (-y / (z - y)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -49000000.0) tmp = Float64(t / Float64(1.0 - Float64(z / y))); elseif (y <= -4e-34) tmp = Float64(t * Float64(1.0 - Float64(x / y))); elseif (y <= -4.2e-108) tmp = Float64(t * Float64(Float64(x - y) / z)); elseif (y <= 5.6e-21) tmp = Float64(t * Float64(x / Float64(z - y))); else tmp = Float64(t * Float64(Float64(-y) / Float64(z - y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -49000000.0) tmp = t / (1.0 - (z / y)); elseif (y <= -4e-34) tmp = t * (1.0 - (x / y)); elseif (y <= -4.2e-108) tmp = t * ((x - y) / z); elseif (y <= 5.6e-21) tmp = t * (x / (z - y)); else tmp = t * (-y / (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -49000000.0], N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4e-34], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.2e-108], N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.6e-21], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[((-y) / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -49000000:\\
\;\;\;\;\frac{t}{1 - \frac{z}{y}}\\
\mathbf{elif}\;y \leq -4 \cdot 10^{-34}:\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{elif}\;y \leq -4.2 \cdot 10^{-108}:\\
\;\;\;\;t \cdot \frac{x - y}{z}\\
\mathbf{elif}\;y \leq 5.6 \cdot 10^{-21}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{-y}{z - y}\\
\end{array}
\end{array}
if y < -4.9e7Initial program 99.8%
associate-*l/75.4%
associate-*r/70.6%
Simplified70.6%
associate-*r/75.4%
associate-*l/99.8%
*-commutative99.8%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 77.3%
mul-1-neg77.3%
neg-sub077.3%
div-sub77.3%
*-inverses77.3%
associate-+l-77.3%
neg-sub077.3%
neg-mul-177.3%
+-commutative77.3%
neg-mul-177.3%
unsub-neg77.3%
Simplified77.3%
if -4.9e7 < y < -3.99999999999999971e-34Initial program 99.9%
Taylor expanded in y around inf 91.0%
associate--l+91.0%
distribute-lft-out--91.0%
div-sub91.0%
mul-1-neg91.0%
unsub-neg91.0%
Simplified91.0%
Taylor expanded in x around inf 91.0%
if -3.99999999999999971e-34 < y < -4.1999999999999998e-108Initial program 99.6%
Taylor expanded in z around inf 87.6%
if -4.1999999999999998e-108 < y < 5.60000000000000008e-21Initial program 94.7%
Taylor expanded in x around inf 87.6%
if 5.60000000000000008e-21 < y Initial program 99.9%
Taylor expanded in x around 0 78.1%
neg-mul-178.1%
distribute-neg-frac78.1%
Simplified78.1%
Final simplification82.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ x y)))))
(if (<= y -4.8e+17)
t_1
(if (<= y -2300000000000.0)
(/ (* y (- t)) z)
(if (or (<= y -4.4e-34) (not (<= y 6.5e-20)))
t_1
(* x (/ t (- z y))))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (1.0 - (x / y));
double tmp;
if (y <= -4.8e+17) {
tmp = t_1;
} else if (y <= -2300000000000.0) {
tmp = (y * -t) / z;
} else if ((y <= -4.4e-34) || !(y <= 6.5e-20)) {
tmp = t_1;
} else {
tmp = x * (t / (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) :: tmp
t_1 = t * (1.0d0 - (x / y))
if (y <= (-4.8d+17)) then
tmp = t_1
else if (y <= (-2300000000000.0d0)) then
tmp = (y * -t) / z
else if ((y <= (-4.4d-34)) .or. (.not. (y <= 6.5d-20))) then
tmp = t_1
else
tmp = x * (t / (z - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t * (1.0 - (x / y));
double tmp;
if (y <= -4.8e+17) {
tmp = t_1;
} else if (y <= -2300000000000.0) {
tmp = (y * -t) / z;
} else if ((y <= -4.4e-34) || !(y <= 6.5e-20)) {
tmp = t_1;
} else {
tmp = x * (t / (z - y));
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (1.0 - (x / y)) tmp = 0 if y <= -4.8e+17: tmp = t_1 elif y <= -2300000000000.0: tmp = (y * -t) / z elif (y <= -4.4e-34) or not (y <= 6.5e-20): tmp = t_1 else: tmp = x * (t / (z - y)) return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(1.0 - Float64(x / y))) tmp = 0.0 if (y <= -4.8e+17) tmp = t_1; elseif (y <= -2300000000000.0) tmp = Float64(Float64(y * Float64(-t)) / z); elseif ((y <= -4.4e-34) || !(y <= 6.5e-20)) tmp = t_1; else tmp = Float64(x * Float64(t / Float64(z - y))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (1.0 - (x / y)); tmp = 0.0; if (y <= -4.8e+17) tmp = t_1; elseif (y <= -2300000000000.0) tmp = (y * -t) / z; elseif ((y <= -4.4e-34) || ~((y <= 6.5e-20))) tmp = t_1; else tmp = x * (t / (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.8e+17], t$95$1, If[LessEqual[y, -2300000000000.0], N[(N[(y * (-t)), $MachinePrecision] / z), $MachinePrecision], If[Or[LessEqual[y, -4.4e-34], N[Not[LessEqual[y, 6.5e-20]], $MachinePrecision]], t$95$1, N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -4.8 \cdot 10^{+17}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2300000000000:\\
\;\;\;\;\frac{y \cdot \left(-t\right)}{z}\\
\mathbf{elif}\;y \leq -4.4 \cdot 10^{-34} \lor \neg \left(y \leq 6.5 \cdot 10^{-20}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\end{array}
\end{array}
if y < -4.8e17 or -2.3e12 < y < -4.3999999999999998e-34 or 6.50000000000000032e-20 < y Initial program 99.9%
Taylor expanded in y around inf 76.9%
associate--l+76.9%
distribute-lft-out--76.9%
div-sub76.9%
mul-1-neg76.9%
unsub-neg76.9%
Simplified76.9%
Taylor expanded in x around inf 77.5%
if -4.8e17 < y < -2.3e12Initial program 99.4%
associate-*l/100.0%
associate-*r/99.4%
Simplified99.4%
Taylor expanded in z around inf 100.0%
Taylor expanded in x around 0 100.0%
mul-1-neg100.0%
distribute-lft-neg-out100.0%
*-commutative100.0%
Simplified100.0%
if -4.3999999999999998e-34 < y < 6.50000000000000032e-20Initial program 95.5%
associate-*l/89.9%
associate-*r/91.6%
Simplified91.6%
Taylor expanded in x around inf 78.3%
associate-*l/79.0%
*-commutative79.0%
Simplified79.0%
Final simplification78.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ x y)))) (t_2 (* (- x y) (/ t z))))
(if (<= z -36000000000.0)
t_2
(if (<= z -3.8e-22)
t_1
(if (<= z -4.7e-35) (/ t (/ z x)) (if (<= z 70000.0) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (1.0 - (x / y));
double t_2 = (x - y) * (t / z);
double tmp;
if (z <= -36000000000.0) {
tmp = t_2;
} else if (z <= -3.8e-22) {
tmp = t_1;
} else if (z <= -4.7e-35) {
tmp = t / (z / x);
} else if (z <= 70000.0) {
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 * (1.0d0 - (x / y))
t_2 = (x - y) * (t / z)
if (z <= (-36000000000.0d0)) then
tmp = t_2
else if (z <= (-3.8d-22)) then
tmp = t_1
else if (z <= (-4.7d-35)) then
tmp = t / (z / x)
else if (z <= 70000.0d0) 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 * (1.0 - (x / y));
double t_2 = (x - y) * (t / z);
double tmp;
if (z <= -36000000000.0) {
tmp = t_2;
} else if (z <= -3.8e-22) {
tmp = t_1;
} else if (z <= -4.7e-35) {
tmp = t / (z / x);
} else if (z <= 70000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (1.0 - (x / y)) t_2 = (x - y) * (t / z) tmp = 0 if z <= -36000000000.0: tmp = t_2 elif z <= -3.8e-22: tmp = t_1 elif z <= -4.7e-35: tmp = t / (z / x) elif z <= 70000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(1.0 - Float64(x / y))) t_2 = Float64(Float64(x - y) * Float64(t / z)) tmp = 0.0 if (z <= -36000000000.0) tmp = t_2; elseif (z <= -3.8e-22) tmp = t_1; elseif (z <= -4.7e-35) tmp = Float64(t / Float64(z / x)); elseif (z <= 70000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (1.0 - (x / y)); t_2 = (x - y) * (t / z); tmp = 0.0; if (z <= -36000000000.0) tmp = t_2; elseif (z <= -3.8e-22) tmp = t_1; elseif (z <= -4.7e-35) tmp = t / (z / x); elseif (z <= 70000.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -36000000000.0], t$95$2, If[LessEqual[z, -3.8e-22], t$95$1, If[LessEqual[z, -4.7e-35], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 70000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{x}{y}\right)\\
t_2 := \left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{if}\;z \leq -36000000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-22}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4.7 \cdot 10^{-35}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{elif}\;z \leq 70000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -3.6e10 or 7e4 < z Initial program 96.7%
associate-*l/85.2%
associate-*r/86.7%
Simplified86.7%
Taylor expanded in z around inf 76.5%
if -3.6e10 < z < -3.80000000000000023e-22 or -4.7e-35 < z < 7e4Initial program 99.1%
Taylor expanded in y around inf 84.6%
associate--l+84.6%
distribute-lft-out--84.6%
div-sub84.6%
mul-1-neg84.6%
unsub-neg84.6%
Simplified84.6%
Taylor expanded in x around inf 84.7%
if -3.80000000000000023e-22 < z < -4.7e-35Initial program 99.1%
associate-*l/99.7%
associate-*r/99.7%
Simplified99.7%
Taylor expanded in y around 0 99.7%
associate-/l*100.0%
Simplified100.0%
Final simplification80.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ t (- 1.0 (/ z y)))))
(if (<= y -50000000.0)
t_1
(if (<= y -6.5e-34)
(* t (- 1.0 (/ x y)))
(if (<= y -4.8e-106)
(* t (/ (- x y) z))
(if (<= y 5.6e-20) (* t (/ x (- z 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 <= -50000000.0) {
tmp = t_1;
} else if (y <= -6.5e-34) {
tmp = t * (1.0 - (x / y));
} else if (y <= -4.8e-106) {
tmp = t * ((x - y) / z);
} else if (y <= 5.6e-20) {
tmp = t * (x / (z - 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 <= (-50000000.0d0)) then
tmp = t_1
else if (y <= (-6.5d-34)) then
tmp = t * (1.0d0 - (x / y))
else if (y <= (-4.8d-106)) then
tmp = t * ((x - y) / z)
else if (y <= 5.6d-20) then
tmp = t * (x / (z - 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 <= -50000000.0) {
tmp = t_1;
} else if (y <= -6.5e-34) {
tmp = t * (1.0 - (x / y));
} else if (y <= -4.8e-106) {
tmp = t * ((x - y) / z);
} else if (y <= 5.6e-20) {
tmp = t * (x / (z - y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t / (1.0 - (z / y)) tmp = 0 if y <= -50000000.0: tmp = t_1 elif y <= -6.5e-34: tmp = t * (1.0 - (x / y)) elif y <= -4.8e-106: tmp = t * ((x - y) / z) elif y <= 5.6e-20: tmp = t * (x / (z - 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 <= -50000000.0) tmp = t_1; elseif (y <= -6.5e-34) tmp = Float64(t * Float64(1.0 - Float64(x / y))); elseif (y <= -4.8e-106) tmp = Float64(t * Float64(Float64(x - y) / z)); elseif (y <= 5.6e-20) tmp = Float64(t * Float64(x / Float64(z - 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 <= -50000000.0) tmp = t_1; elseif (y <= -6.5e-34) tmp = t * (1.0 - (x / y)); elseif (y <= -4.8e-106) tmp = t * ((x - y) / z); elseif (y <= 5.6e-20) tmp = t * (x / (z - 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, -50000000.0], t$95$1, If[LessEqual[y, -6.5e-34], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.8e-106], N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.6e-20], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{1 - \frac{z}{y}}\\
\mathbf{if}\;y \leq -50000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -6.5 \cdot 10^{-34}:\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{elif}\;y \leq -4.8 \cdot 10^{-106}:\\
\;\;\;\;t \cdot \frac{x - y}{z}\\
\mathbf{elif}\;y \leq 5.6 \cdot 10^{-20}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -5e7 or 5.6000000000000005e-20 < y Initial program 99.8%
associate-*l/76.7%
associate-*r/75.7%
Simplified75.7%
associate-*r/76.7%
associate-*l/99.8%
*-commutative99.8%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 77.7%
mul-1-neg77.7%
neg-sub077.7%
div-sub77.7%
*-inverses77.7%
associate-+l-77.7%
neg-sub077.7%
neg-mul-177.7%
+-commutative77.7%
neg-mul-177.7%
unsub-neg77.7%
Simplified77.7%
if -5e7 < y < -6.49999999999999985e-34Initial program 99.9%
Taylor expanded in y around inf 91.0%
associate--l+91.0%
distribute-lft-out--91.0%
div-sub91.0%
mul-1-neg91.0%
unsub-neg91.0%
Simplified91.0%
Taylor expanded in x around inf 91.0%
if -6.49999999999999985e-34 < y < -4.7999999999999995e-106Initial program 99.6%
Taylor expanded in z around inf 87.6%
if -4.7999999999999995e-106 < y < 5.6000000000000005e-20Initial program 94.7%
Taylor expanded in x around inf 87.6%
Final simplification82.7%
(FPCore (x y z t) :precision binary64 (if (<= y -2.15e+94) t (if (<= y -3.3e-26) (* (/ t y) (- x)) (if (<= y 2.9e-21) (* t (/ x z)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.15e+94) {
tmp = t;
} else if (y <= -3.3e-26) {
tmp = (t / y) * -x;
} else if (y <= 2.9e-21) {
tmp = t * (x / 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 <= (-2.15d+94)) then
tmp = t
else if (y <= (-3.3d-26)) then
tmp = (t / y) * -x
else if (y <= 2.9d-21) then
tmp = t * (x / 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 <= -2.15e+94) {
tmp = t;
} else if (y <= -3.3e-26) {
tmp = (t / y) * -x;
} else if (y <= 2.9e-21) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.15e+94: tmp = t elif y <= -3.3e-26: tmp = (t / y) * -x elif y <= 2.9e-21: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.15e+94) tmp = t; elseif (y <= -3.3e-26) tmp = Float64(Float64(t / y) * Float64(-x)); elseif (y <= 2.9e-21) tmp = Float64(t * Float64(x / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.15e+94) tmp = t; elseif (y <= -3.3e-26) tmp = (t / y) * -x; elseif (y <= 2.9e-21) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.15e+94], t, If[LessEqual[y, -3.3e-26], N[(N[(t / y), $MachinePrecision] * (-x)), $MachinePrecision], If[LessEqual[y, 2.9e-21], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.15 \cdot 10^{+94}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -3.3 \cdot 10^{-26}:\\
\;\;\;\;\frac{t}{y} \cdot \left(-x\right)\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{-21}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -2.15e94 or 2.9e-21 < y Initial program 99.9%
associate-*l/74.4%
associate-*r/71.6%
Simplified71.6%
Taylor expanded in y around inf 66.4%
if -2.15e94 < y < -3.2999999999999998e-26Initial program 99.8%
Taylor expanded in x around inf 44.4%
Taylor expanded in z around 0 41.7%
associate-*r/41.7%
neg-mul-141.7%
Simplified41.7%
distribute-frac-neg41.7%
distribute-lft-neg-out41.7%
associate-/r/41.7%
div-inv41.6%
clear-num41.7%
Applied egg-rr41.7%
if -3.2999999999999998e-26 < y < 2.9e-21Initial program 95.5%
Taylor expanded in y around 0 70.9%
Final simplification65.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.52e+94)
t
(if (<= y -8.4e-50)
(/ (- y) (/ z t))
(if (<= y 1.65e-19) (* t (/ x z)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.52e+94) {
tmp = t;
} else if (y <= -8.4e-50) {
tmp = -y / (z / t);
} else if (y <= 1.65e-19) {
tmp = t * (x / 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 <= (-1.52d+94)) then
tmp = t
else if (y <= (-8.4d-50)) then
tmp = -y / (z / t)
else if (y <= 1.65d-19) then
tmp = t * (x / 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 <= -1.52e+94) {
tmp = t;
} else if (y <= -8.4e-50) {
tmp = -y / (z / t);
} else if (y <= 1.65e-19) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.52e+94: tmp = t elif y <= -8.4e-50: tmp = -y / (z / t) elif y <= 1.65e-19: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.52e+94) tmp = t; elseif (y <= -8.4e-50) tmp = Float64(Float64(-y) / Float64(z / t)); elseif (y <= 1.65e-19) tmp = Float64(t * Float64(x / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.52e+94) tmp = t; elseif (y <= -8.4e-50) tmp = -y / (z / t); elseif (y <= 1.65e-19) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.52e+94], t, If[LessEqual[y, -8.4e-50], N[((-y) / N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.65e-19], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.52 \cdot 10^{+94}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -8.4 \cdot 10^{-50}:\\
\;\;\;\;\frac{-y}{\frac{z}{t}}\\
\mathbf{elif}\;y \leq 1.65 \cdot 10^{-19}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.5199999999999999e94 or 1.6499999999999999e-19 < y Initial program 99.9%
associate-*l/74.4%
associate-*r/71.6%
Simplified71.6%
Taylor expanded in y around inf 66.4%
if -1.5199999999999999e94 < y < -8.4000000000000003e-50Initial program 99.8%
associate-*l/94.3%
associate-*r/99.7%
Simplified99.7%
Taylor expanded in z around inf 50.0%
Taylor expanded in x around 0 46.9%
mul-1-neg46.9%
associate-/l*44.4%
Simplified44.4%
if -8.4000000000000003e-50 < y < 1.6499999999999999e-19Initial program 95.3%
Taylor expanded in y around 0 72.5%
Final simplification66.2%
(FPCore (x y z t) :precision binary64 (if (<= y -8.4e+94) t (if (<= y -1.9e-49) (* (- t) (/ y z)) (if (<= y 2.5e-19) (* t (/ x z)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8.4e+94) {
tmp = t;
} else if (y <= -1.9e-49) {
tmp = -t * (y / z);
} else if (y <= 2.5e-19) {
tmp = t * (x / 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 <= (-8.4d+94)) then
tmp = t
else if (y <= (-1.9d-49)) then
tmp = -t * (y / z)
else if (y <= 2.5d-19) then
tmp = t * (x / 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 <= -8.4e+94) {
tmp = t;
} else if (y <= -1.9e-49) {
tmp = -t * (y / z);
} else if (y <= 2.5e-19) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -8.4e+94: tmp = t elif y <= -1.9e-49: tmp = -t * (y / z) elif y <= 2.5e-19: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -8.4e+94) tmp = t; elseif (y <= -1.9e-49) tmp = Float64(Float64(-t) * Float64(y / z)); elseif (y <= 2.5e-19) tmp = Float64(t * Float64(x / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -8.4e+94) tmp = t; elseif (y <= -1.9e-49) tmp = -t * (y / z); elseif (y <= 2.5e-19) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -8.4e+94], t, If[LessEqual[y, -1.9e-49], N[((-t) * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.5e-19], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.4 \cdot 10^{+94}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -1.9 \cdot 10^{-49}:\\
\;\;\;\;\left(-t\right) \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{-19}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -8.39999999999999958e94 or 2.5000000000000002e-19 < y Initial program 99.9%
associate-*l/74.4%
associate-*r/71.6%
Simplified71.6%
Taylor expanded in y around inf 66.4%
if -8.39999999999999958e94 < y < -1.8999999999999999e-49Initial program 99.8%
associate-*l/94.3%
associate-*r/99.7%
Simplified99.7%
Taylor expanded in z around inf 47.1%
Taylor expanded in x around 0 46.9%
mul-1-neg46.9%
distribute-lft-neg-out46.9%
*-commutative46.9%
Simplified46.9%
Taylor expanded in t around 0 46.9%
associate-*r/46.9%
*-commutative46.9%
associate-*r*46.9%
neg-mul-146.9%
associate-*r/47.0%
Simplified47.0%
if -1.8999999999999999e-49 < y < 2.5000000000000002e-19Initial program 95.3%
Taylor expanded in y around 0 72.5%
Final simplification66.6%
(FPCore (x y z t) :precision binary64 (if (<= y -1.62e+94) t (if (<= y 2.8e-19) (* x (/ t (- z y))) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.62e+94) {
tmp = t;
} else if (y <= 2.8e-19) {
tmp = x * (t / (z - y));
} 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 <= (-1.62d+94)) then
tmp = t
else if (y <= 2.8d-19) then
tmp = x * (t / (z - y))
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 <= -1.62e+94) {
tmp = t;
} else if (y <= 2.8e-19) {
tmp = x * (t / (z - y));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.62e+94: tmp = t elif y <= 2.8e-19: tmp = x * (t / (z - y)) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.62e+94) tmp = t; elseif (y <= 2.8e-19) tmp = Float64(x * Float64(t / Float64(z - y))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.62e+94) tmp = t; elseif (y <= 2.8e-19) tmp = x * (t / (z - y)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.62e+94], t, If[LessEqual[y, 2.8e-19], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.62 \cdot 10^{+94}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{-19}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.61999999999999997e94 or 2.80000000000000003e-19 < y Initial program 99.9%
associate-*l/74.4%
associate-*r/71.6%
Simplified71.6%
Taylor expanded in y around inf 66.4%
if -1.61999999999999997e94 < y < 2.80000000000000003e-19Initial program 96.3%
associate-*l/90.7%
associate-*r/93.3%
Simplified93.3%
Taylor expanded in x around inf 69.8%
associate-*l/71.6%
*-commutative71.6%
Simplified71.6%
Final simplification69.3%
(FPCore (x y z t) :precision binary64 (if (<= y -1.45e-53) t (if (<= y 1.15e-21) (* t (/ y z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.45e-53) {
tmp = t;
} else if (y <= 1.15e-21) {
tmp = t * (y / 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 <= (-1.45d-53)) then
tmp = t
else if (y <= 1.15d-21) then
tmp = t * (y / 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 <= -1.45e-53) {
tmp = t;
} else if (y <= 1.15e-21) {
tmp = t * (y / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.45e-53: tmp = t elif y <= 1.15e-21: tmp = t * (y / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.45e-53) tmp = t; elseif (y <= 1.15e-21) tmp = Float64(t * Float64(y / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.45e-53) tmp = t; elseif (y <= 1.15e-21) tmp = t * (y / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.45e-53], t, If[LessEqual[y, 1.15e-21], N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{-53}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-21}:\\
\;\;\;\;t \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.4499999999999999e-53 or 1.15e-21 < y Initial program 99.8%
associate-*l/79.1%
associate-*r/78.2%
Simplified78.2%
Taylor expanded in y around inf 56.0%
if -1.4499999999999999e-53 < y < 1.15e-21Initial program 95.3%
associate-*l/89.6%
associate-*r/91.4%
Simplified91.4%
Taylor expanded in z around inf 77.0%
Taylor expanded in x around 0 24.8%
mul-1-neg24.8%
distribute-lft-neg-out24.8%
*-commutative24.8%
Simplified24.8%
expm1-log1p-u21.7%
expm1-udef16.0%
div-inv16.0%
associate-*l*16.0%
add-sqr-sqrt7.7%
sqrt-unprod16.3%
sqr-neg16.3%
sqrt-unprod8.6%
add-sqr-sqrt14.8%
div-inv14.8%
Applied egg-rr14.8%
expm1-def14.7%
expm1-log1p15.0%
Simplified15.0%
Final simplification38.1%
(FPCore (x y z t) :precision binary64 (if (<= y -7.2e-34) t (if (<= y 1.7e-19) (* x (/ t z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.2e-34) {
tmp = t;
} else if (y <= 1.7e-19) {
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 <= (-7.2d-34)) then
tmp = t
else if (y <= 1.7d-19) 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 <= -7.2e-34) {
tmp = t;
} else if (y <= 1.7e-19) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7.2e-34: tmp = t elif y <= 1.7e-19: tmp = x * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7.2e-34) tmp = t; elseif (y <= 1.7e-19) 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 <= -7.2e-34) tmp = t; elseif (y <= 1.7e-19) tmp = x * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7.2e-34], t, If[LessEqual[y, 1.7e-19], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.2 \cdot 10^{-34}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{-19}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -7.20000000000000016e-34 or 1.7000000000000001e-19 < y Initial program 99.8%
associate-*l/78.5%
associate-*r/77.6%
Simplified77.6%
Taylor expanded in y around inf 57.4%
if -7.20000000000000016e-34 < y < 1.7000000000000001e-19Initial program 95.5%
associate-*l/89.9%
associate-*r/91.6%
Simplified91.6%
associate-*r/89.9%
associate-*l/95.5%
*-commutative95.5%
clear-num94.7%
un-div-inv95.1%
Applied egg-rr95.1%
Taylor expanded in y around 0 66.3%
associate-*l/67.7%
*-commutative67.7%
Simplified67.7%
Final simplification62.1%
(FPCore (x y z t) :precision binary64 (if (<= y -7.5e-34) t (if (<= y 5.5e-20) (* t (/ x z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.5e-34) {
tmp = t;
} else if (y <= 5.5e-20) {
tmp = t * (x / 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 <= (-7.5d-34)) then
tmp = t
else if (y <= 5.5d-20) then
tmp = t * (x / 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 <= -7.5e-34) {
tmp = t;
} else if (y <= 5.5e-20) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7.5e-34: tmp = t elif y <= 5.5e-20: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7.5e-34) tmp = t; elseif (y <= 5.5e-20) tmp = Float64(t * Float64(x / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -7.5e-34) tmp = t; elseif (y <= 5.5e-20) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7.5e-34], t, If[LessEqual[y, 5.5e-20], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{-34}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{-20}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -7.5000000000000004e-34 or 5.4999999999999996e-20 < y Initial program 99.8%
associate-*l/78.5%
associate-*r/77.6%
Simplified77.6%
Taylor expanded in y around inf 57.4%
if -7.5000000000000004e-34 < y < 5.4999999999999996e-20Initial program 95.5%
Taylor expanded in y around 0 71.5%
Final simplification63.8%
(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.9%
associate-*l/83.7%
associate-*r/84.0%
Simplified84.0%
Taylor expanded in y around inf 33.6%
Final simplification33.6%
(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 2023221
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
:precision binary64
:herbie-target
(/ t (/ (- z y) (- x y)))
(* (/ (- x y) (- z y)) t))