
(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.7%
Final simplification97.7%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.85e+112)
t
(if (<= y -2400000000000.0)
(* t (/ x z))
(if (<= y -2.1e-14)
t
(if (<= y 14200000.0)
(* x (/ t z))
(if (<= y 6.8e+85) (* t (/ x (- y))) t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.85e+112) {
tmp = t;
} else if (y <= -2400000000000.0) {
tmp = t * (x / z);
} else if (y <= -2.1e-14) {
tmp = t;
} else if (y <= 14200000.0) {
tmp = x * (t / z);
} else if (y <= 6.8e+85) {
tmp = t * (x / -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.85d+112)) then
tmp = t
else if (y <= (-2400000000000.0d0)) then
tmp = t * (x / z)
else if (y <= (-2.1d-14)) then
tmp = t
else if (y <= 14200000.0d0) then
tmp = x * (t / z)
else if (y <= 6.8d+85) then
tmp = t * (x / -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.85e+112) {
tmp = t;
} else if (y <= -2400000000000.0) {
tmp = t * (x / z);
} else if (y <= -2.1e-14) {
tmp = t;
} else if (y <= 14200000.0) {
tmp = x * (t / z);
} else if (y <= 6.8e+85) {
tmp = t * (x / -y);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.85e+112: tmp = t elif y <= -2400000000000.0: tmp = t * (x / z) elif y <= -2.1e-14: tmp = t elif y <= 14200000.0: tmp = x * (t / z) elif y <= 6.8e+85: tmp = t * (x / -y) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.85e+112) tmp = t; elseif (y <= -2400000000000.0) tmp = Float64(t * Float64(x / z)); elseif (y <= -2.1e-14) tmp = t; elseif (y <= 14200000.0) tmp = Float64(x * Float64(t / z)); elseif (y <= 6.8e+85) tmp = Float64(t * Float64(x / Float64(-y))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.85e+112) tmp = t; elseif (y <= -2400000000000.0) tmp = t * (x / z); elseif (y <= -2.1e-14) tmp = t; elseif (y <= 14200000.0) tmp = x * (t / z); elseif (y <= 6.8e+85) tmp = t * (x / -y); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.85e+112], t, If[LessEqual[y, -2400000000000.0], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.1e-14], t, If[LessEqual[y, 14200000.0], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.8e+85], N[(t * N[(x / (-y)), $MachinePrecision]), $MachinePrecision], t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{+112}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -2400000000000:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{elif}\;y \leq -2.1 \cdot 10^{-14}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 14200000:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{+85}:\\
\;\;\;\;t \cdot \frac{x}{-y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.85000000000000002e112 or -2.4e12 < y < -2.0999999999999999e-14 or 6.8000000000000007e85 < y Initial program 99.9%
associate-*l/73.2%
associate-/l*73.2%
Simplified73.2%
Taylor expanded in y around inf 68.9%
if -1.85000000000000002e112 < y < -2.4e12Initial program 99.7%
Taylor expanded in y around 0 49.2%
if -2.0999999999999999e-14 < y < 1.42e7Initial program 95.7%
associate-*l/90.5%
associate-/l*95.9%
Simplified95.9%
Taylor expanded in y around 0 63.1%
*-commutative63.1%
associate-/l*65.8%
Simplified65.8%
if 1.42e7 < y < 6.8000000000000007e85Initial program 99.5%
Taylor expanded in z around 0 76.5%
mul-1-neg76.5%
div-sub76.5%
sub-neg76.5%
*-inverses76.5%
metadata-eval76.5%
Simplified76.5%
Taylor expanded in x around inf 55.0%
Final simplification64.3%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.85e+112)
t
(if (<= y -2100000000000.0)
(* t (/ x z))
(if (<= y -8e-16)
t
(if (<= y 1000000.0)
(* x (/ t z))
(if (<= y 8.2e+85) (/ t (/ y (- x))) t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.85e+112) {
tmp = t;
} else if (y <= -2100000000000.0) {
tmp = t * (x / z);
} else if (y <= -8e-16) {
tmp = t;
} else if (y <= 1000000.0) {
tmp = x * (t / z);
} else if (y <= 8.2e+85) {
tmp = t / (y / -x);
} 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.85d+112)) then
tmp = t
else if (y <= (-2100000000000.0d0)) then
tmp = t * (x / z)
else if (y <= (-8d-16)) then
tmp = t
else if (y <= 1000000.0d0) then
tmp = x * (t / z)
else if (y <= 8.2d+85) then
tmp = t / (y / -x)
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.85e+112) {
tmp = t;
} else if (y <= -2100000000000.0) {
tmp = t * (x / z);
} else if (y <= -8e-16) {
tmp = t;
} else if (y <= 1000000.0) {
tmp = x * (t / z);
} else if (y <= 8.2e+85) {
tmp = t / (y / -x);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.85e+112: tmp = t elif y <= -2100000000000.0: tmp = t * (x / z) elif y <= -8e-16: tmp = t elif y <= 1000000.0: tmp = x * (t / z) elif y <= 8.2e+85: tmp = t / (y / -x) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.85e+112) tmp = t; elseif (y <= -2100000000000.0) tmp = Float64(t * Float64(x / z)); elseif (y <= -8e-16) tmp = t; elseif (y <= 1000000.0) tmp = Float64(x * Float64(t / z)); elseif (y <= 8.2e+85) tmp = Float64(t / Float64(y / Float64(-x))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.85e+112) tmp = t; elseif (y <= -2100000000000.0) tmp = t * (x / z); elseif (y <= -8e-16) tmp = t; elseif (y <= 1000000.0) tmp = x * (t / z); elseif (y <= 8.2e+85) tmp = t / (y / -x); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.85e+112], t, If[LessEqual[y, -2100000000000.0], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -8e-16], t, If[LessEqual[y, 1000000.0], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.2e+85], N[(t / N[(y / (-x)), $MachinePrecision]), $MachinePrecision], t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{+112}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -2100000000000:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{elif}\;y \leq -8 \cdot 10^{-16}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 1000000:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{+85}:\\
\;\;\;\;\frac{t}{\frac{y}{-x}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.85000000000000002e112 or -2.1e12 < y < -7.9999999999999998e-16 or 8.19999999999999957e85 < y Initial program 99.9%
associate-*l/73.2%
associate-/l*73.2%
Simplified73.2%
Taylor expanded in y around inf 68.9%
if -1.85000000000000002e112 < y < -2.1e12Initial program 99.7%
Taylor expanded in y around 0 49.2%
if -7.9999999999999998e-16 < y < 1e6Initial program 95.7%
associate-*l/90.5%
associate-/l*95.9%
Simplified95.9%
Taylor expanded in y around 0 63.1%
*-commutative63.1%
associate-/l*65.8%
Simplified65.8%
if 1e6 < y < 8.19999999999999957e85Initial program 99.5%
associate-*l/89.8%
associate-/l*96.1%
Simplified96.1%
associate-*r/89.8%
associate-*l/99.5%
*-commutative99.5%
clear-num99.5%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 65.5%
Taylor expanded in z around 0 55.1%
neg-mul-155.1%
distribute-neg-frac255.1%
Simplified55.1%
Final simplification64.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ x y)))))
(if (<= y -1.85e+112)
t_1
(if (<= y -2200000000000.0)
(* t (/ x (- z y)))
(if (or (<= y -3.6e-12) (not (<= y 1250000.0)))
t_1
(* (- x y) (/ t z)))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (1.0 - (x / y));
double tmp;
if (y <= -1.85e+112) {
tmp = t_1;
} else if (y <= -2200000000000.0) {
tmp = t * (x / (z - y));
} else if ((y <= -3.6e-12) || !(y <= 1250000.0)) {
tmp = t_1;
} else {
tmp = (x - y) * (t / z);
}
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 <= (-1.85d+112)) then
tmp = t_1
else if (y <= (-2200000000000.0d0)) then
tmp = t * (x / (z - y))
else if ((y <= (-3.6d-12)) .or. (.not. (y <= 1250000.0d0))) then
tmp = t_1
else
tmp = (x - y) * (t / z)
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 <= -1.85e+112) {
tmp = t_1;
} else if (y <= -2200000000000.0) {
tmp = t * (x / (z - y));
} else if ((y <= -3.6e-12) || !(y <= 1250000.0)) {
tmp = t_1;
} else {
tmp = (x - y) * (t / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (1.0 - (x / y)) tmp = 0 if y <= -1.85e+112: tmp = t_1 elif y <= -2200000000000.0: tmp = t * (x / (z - y)) elif (y <= -3.6e-12) or not (y <= 1250000.0): tmp = t_1 else: tmp = (x - y) * (t / z) return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(1.0 - Float64(x / y))) tmp = 0.0 if (y <= -1.85e+112) tmp = t_1; elseif (y <= -2200000000000.0) tmp = Float64(t * Float64(x / Float64(z - y))); elseif ((y <= -3.6e-12) || !(y <= 1250000.0)) tmp = t_1; else tmp = Float64(Float64(x - y) * Float64(t / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (1.0 - (x / y)); tmp = 0.0; if (y <= -1.85e+112) tmp = t_1; elseif (y <= -2200000000000.0) tmp = t * (x / (z - y)); elseif ((y <= -3.6e-12) || ~((y <= 1250000.0))) tmp = t_1; else tmp = (x - y) * (t / z); 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, -1.85e+112], t$95$1, If[LessEqual[y, -2200000000000.0], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -3.6e-12], N[Not[LessEqual[y, 1250000.0]], $MachinePrecision]], t$95$1, N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -1.85 \cdot 10^{+112}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2200000000000:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{elif}\;y \leq -3.6 \cdot 10^{-12} \lor \neg \left(y \leq 1250000\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\end{array}
\end{array}
if y < -1.85000000000000002e112 or -2.2e12 < y < -3.6e-12 or 1.25e6 < y Initial program 99.8%
associate-*l/75.6%
associate-/l*76.9%
Simplified76.9%
associate-*r/75.6%
associate-*l/99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in z around 0 68.1%
mul-1-neg68.1%
associate-/l*88.9%
div-sub88.9%
*-inverses88.9%
sub-neg88.9%
metadata-eval88.9%
distribute-rgt-neg-in88.9%
+-commutative88.9%
distribute-neg-in88.9%
metadata-eval88.9%
sub-neg88.9%
Simplified88.9%
if -1.85000000000000002e112 < y < -2.2e12Initial program 99.7%
Taylor expanded in x around inf 67.4%
if -3.6e-12 < y < 1.25e6Initial program 95.8%
associate-*l/90.7%
associate-/l*96.0%
Simplified96.0%
Taylor expanded in z around inf 74.6%
*-commutative74.6%
associate-/l*77.6%
Simplified77.6%
Final simplification80.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ x y)))))
(if (<= y -1.85e+112)
t_1
(if (<= y -2.9e+70)
(* t (/ (- x y) z))
(if (or (<= y -1.45e-11) (not (<= y 1560000.0)))
t_1
(* (- x y) (/ t z)))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (1.0 - (x / y));
double tmp;
if (y <= -1.85e+112) {
tmp = t_1;
} else if (y <= -2.9e+70) {
tmp = t * ((x - y) / z);
} else if ((y <= -1.45e-11) || !(y <= 1560000.0)) {
tmp = t_1;
} else {
tmp = (x - y) * (t / z);
}
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 <= (-1.85d+112)) then
tmp = t_1
else if (y <= (-2.9d+70)) then
tmp = t * ((x - y) / z)
else if ((y <= (-1.45d-11)) .or. (.not. (y <= 1560000.0d0))) then
tmp = t_1
else
tmp = (x - y) * (t / z)
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 <= -1.85e+112) {
tmp = t_1;
} else if (y <= -2.9e+70) {
tmp = t * ((x - y) / z);
} else if ((y <= -1.45e-11) || !(y <= 1560000.0)) {
tmp = t_1;
} else {
tmp = (x - y) * (t / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (1.0 - (x / y)) tmp = 0 if y <= -1.85e+112: tmp = t_1 elif y <= -2.9e+70: tmp = t * ((x - y) / z) elif (y <= -1.45e-11) or not (y <= 1560000.0): tmp = t_1 else: tmp = (x - y) * (t / z) return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(1.0 - Float64(x / y))) tmp = 0.0 if (y <= -1.85e+112) tmp = t_1; elseif (y <= -2.9e+70) tmp = Float64(t * Float64(Float64(x - y) / z)); elseif ((y <= -1.45e-11) || !(y <= 1560000.0)) tmp = t_1; else tmp = Float64(Float64(x - y) * Float64(t / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (1.0 - (x / y)); tmp = 0.0; if (y <= -1.85e+112) tmp = t_1; elseif (y <= -2.9e+70) tmp = t * ((x - y) / z); elseif ((y <= -1.45e-11) || ~((y <= 1560000.0))) tmp = t_1; else tmp = (x - y) * (t / z); 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, -1.85e+112], t$95$1, If[LessEqual[y, -2.9e+70], N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -1.45e-11], N[Not[LessEqual[y, 1560000.0]], $MachinePrecision]], t$95$1, N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -1.85 \cdot 10^{+112}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.9 \cdot 10^{+70}:\\
\;\;\;\;t \cdot \frac{x - y}{z}\\
\mathbf{elif}\;y \leq -1.45 \cdot 10^{-11} \lor \neg \left(y \leq 1560000\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\end{array}
\end{array}
if y < -1.85000000000000002e112 or -2.8999999999999998e70 < y < -1.45e-11 or 1.56e6 < y Initial program 99.8%
associate-*l/77.8%
associate-/l*78.5%
Simplified78.5%
associate-*r/77.8%
associate-*l/99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in z around 0 67.4%
mul-1-neg67.4%
associate-/l*85.6%
div-sub85.6%
*-inverses85.6%
sub-neg85.6%
metadata-eval85.6%
distribute-rgt-neg-in85.6%
+-commutative85.6%
distribute-neg-in85.6%
metadata-eval85.6%
sub-neg85.6%
Simplified85.6%
if -1.85000000000000002e112 < y < -2.8999999999999998e70Initial program 99.6%
Taylor expanded in z around inf 83.5%
if -1.45e-11 < y < 1.56e6Initial program 95.8%
associate-*l/90.7%
associate-/l*96.0%
Simplified96.0%
Taylor expanded in z around inf 74.6%
*-commutative74.6%
associate-/l*77.6%
Simplified77.6%
Final simplification81.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ x y)))))
(if (<= y -2e+112)
t_1
(if (<= y -2.9e+70)
(* t (/ (- x y) z))
(if (or (<= y -4.6e-9) (not (<= y 1100000.0)))
t_1
(/ (- x y) (/ z t)))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (1.0 - (x / y));
double tmp;
if (y <= -2e+112) {
tmp = t_1;
} else if (y <= -2.9e+70) {
tmp = t * ((x - y) / z);
} else if ((y <= -4.6e-9) || !(y <= 1100000.0)) {
tmp = t_1;
} else {
tmp = (x - y) / (z / 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) :: t_1
real(8) :: tmp
t_1 = t * (1.0d0 - (x / y))
if (y <= (-2d+112)) then
tmp = t_1
else if (y <= (-2.9d+70)) then
tmp = t * ((x - y) / z)
else if ((y <= (-4.6d-9)) .or. (.not. (y <= 1100000.0d0))) then
tmp = t_1
else
tmp = (x - y) / (z / t)
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 <= -2e+112) {
tmp = t_1;
} else if (y <= -2.9e+70) {
tmp = t * ((x - y) / z);
} else if ((y <= -4.6e-9) || !(y <= 1100000.0)) {
tmp = t_1;
} else {
tmp = (x - y) / (z / t);
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (1.0 - (x / y)) tmp = 0 if y <= -2e+112: tmp = t_1 elif y <= -2.9e+70: tmp = t * ((x - y) / z) elif (y <= -4.6e-9) or not (y <= 1100000.0): tmp = t_1 else: tmp = (x - y) / (z / t) return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(1.0 - Float64(x / y))) tmp = 0.0 if (y <= -2e+112) tmp = t_1; elseif (y <= -2.9e+70) tmp = Float64(t * Float64(Float64(x - y) / z)); elseif ((y <= -4.6e-9) || !(y <= 1100000.0)) tmp = t_1; else tmp = Float64(Float64(x - y) / Float64(z / t)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (1.0 - (x / y)); tmp = 0.0; if (y <= -2e+112) tmp = t_1; elseif (y <= -2.9e+70) tmp = t * ((x - y) / z); elseif ((y <= -4.6e-9) || ~((y <= 1100000.0))) tmp = t_1; else tmp = (x - y) / (z / t); 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, -2e+112], t$95$1, If[LessEqual[y, -2.9e+70], N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -4.6e-9], N[Not[LessEqual[y, 1100000.0]], $MachinePrecision]], t$95$1, N[(N[(x - y), $MachinePrecision] / N[(z / t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -2 \cdot 10^{+112}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.9 \cdot 10^{+70}:\\
\;\;\;\;t \cdot \frac{x - y}{z}\\
\mathbf{elif}\;y \leq -4.6 \cdot 10^{-9} \lor \neg \left(y \leq 1100000\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x - y}{\frac{z}{t}}\\
\end{array}
\end{array}
if y < -1.9999999999999999e112 or -2.8999999999999998e70 < y < -4.5999999999999998e-9 or 1.1e6 < y Initial program 99.8%
associate-*l/77.8%
associate-/l*78.5%
Simplified78.5%
associate-*r/77.8%
associate-*l/99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in z around 0 67.4%
mul-1-neg67.4%
associate-/l*85.6%
div-sub85.6%
*-inverses85.6%
sub-neg85.6%
metadata-eval85.6%
distribute-rgt-neg-in85.6%
+-commutative85.6%
distribute-neg-in85.6%
metadata-eval85.6%
sub-neg85.6%
Simplified85.6%
if -1.9999999999999999e112 < y < -2.8999999999999998e70Initial program 99.6%
Taylor expanded in z around inf 83.5%
if -4.5999999999999998e-9 < y < 1.1e6Initial program 95.8%
associate-*l/90.7%
associate-/l*96.0%
Simplified96.0%
clear-num95.9%
un-div-inv96.1%
Applied egg-rr96.1%
Taylor expanded in z around inf 77.6%
Final simplification81.3%
(FPCore (x y z t)
:precision binary64
(if (<= x -1.3e+129)
(* t (/ x (- z y)))
(if (<= x -3.9e+90)
(* t (- 1.0 (/ x y)))
(if (or (<= x -1.3e-30) (not (<= x 4.7e+30)))
(/ t (/ (- z y) x))
(* t (/ y (- y z)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.3e+129) {
tmp = t * (x / (z - y));
} else if (x <= -3.9e+90) {
tmp = t * (1.0 - (x / y));
} else if ((x <= -1.3e-30) || !(x <= 4.7e+30)) {
tmp = t / ((z - y) / x);
} else {
tmp = t * (y / (y - z));
}
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 (x <= (-1.3d+129)) then
tmp = t * (x / (z - y))
else if (x <= (-3.9d+90)) then
tmp = t * (1.0d0 - (x / y))
else if ((x <= (-1.3d-30)) .or. (.not. (x <= 4.7d+30))) then
tmp = t / ((z - y) / x)
else
tmp = t * (y / (y - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.3e+129) {
tmp = t * (x / (z - y));
} else if (x <= -3.9e+90) {
tmp = t * (1.0 - (x / y));
} else if ((x <= -1.3e-30) || !(x <= 4.7e+30)) {
tmp = t / ((z - y) / x);
} else {
tmp = t * (y / (y - z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -1.3e+129: tmp = t * (x / (z - y)) elif x <= -3.9e+90: tmp = t * (1.0 - (x / y)) elif (x <= -1.3e-30) or not (x <= 4.7e+30): tmp = t / ((z - y) / x) else: tmp = t * (y / (y - z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -1.3e+129) tmp = Float64(t * Float64(x / Float64(z - y))); elseif (x <= -3.9e+90) tmp = Float64(t * Float64(1.0 - Float64(x / y))); elseif ((x <= -1.3e-30) || !(x <= 4.7e+30)) tmp = Float64(t / Float64(Float64(z - y) / x)); else tmp = Float64(t * Float64(y / Float64(y - z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -1.3e+129) tmp = t * (x / (z - y)); elseif (x <= -3.9e+90) tmp = t * (1.0 - (x / y)); elseif ((x <= -1.3e-30) || ~((x <= 4.7e+30))) tmp = t / ((z - y) / x); else tmp = t * (y / (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.3e+129], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.9e+90], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -1.3e-30], N[Not[LessEqual[x, 4.7e+30]], $MachinePrecision]], N[(t / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.3 \cdot 10^{+129}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{elif}\;x \leq -3.9 \cdot 10^{+90}:\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{elif}\;x \leq -1.3 \cdot 10^{-30} \lor \neg \left(x \leq 4.7 \cdot 10^{+30}\right):\\
\;\;\;\;\frac{t}{\frac{z - y}{x}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{y - z}\\
\end{array}
\end{array}
if x < -1.30000000000000006e129Initial program 99.7%
Taylor expanded in x around inf 88.3%
if -1.30000000000000006e129 < x < -3.9000000000000002e90Initial program 99.8%
associate-*l/86.3%
associate-/l*86.5%
Simplified86.5%
associate-*r/86.3%
associate-*l/99.8%
*-commutative99.8%
clear-num99.6%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in z around 0 86.3%
mul-1-neg86.3%
associate-/l*99.8%
div-sub100.0%
*-inverses100.0%
sub-neg100.0%
metadata-eval100.0%
distribute-rgt-neg-in100.0%
+-commutative100.0%
distribute-neg-in100.0%
metadata-eval100.0%
sub-neg100.0%
Simplified100.0%
if -3.9000000000000002e90 < x < -1.29999999999999993e-30 or 4.6999999999999999e30 < x Initial program 97.7%
associate-*l/88.2%
associate-/l*87.5%
Simplified87.5%
associate-*r/88.2%
associate-*l/97.7%
*-commutative97.7%
clear-num97.6%
un-div-inv97.8%
Applied egg-rr97.8%
Taylor expanded in x around inf 84.0%
if -1.29999999999999993e-30 < x < 4.6999999999999999e30Initial program 97.1%
Taylor expanded in x around 0 81.0%
neg-mul-181.0%
distribute-neg-frac281.0%
Simplified81.0%
Final simplification83.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.4e+102)
t
(if (or (<= y -1900000000000.0)
(and (not (<= y -1.35e-14)) (<= y 1020000.0)))
(* x (/ t z))
t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.4e+102) {
tmp = t;
} else if ((y <= -1900000000000.0) || (!(y <= -1.35e-14) && (y <= 1020000.0))) {
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 <= (-1.4d+102)) then
tmp = t
else if ((y <= (-1900000000000.0d0)) .or. (.not. (y <= (-1.35d-14))) .and. (y <= 1020000.0d0)) 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 <= -1.4e+102) {
tmp = t;
} else if ((y <= -1900000000000.0) || (!(y <= -1.35e-14) && (y <= 1020000.0))) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.4e+102: tmp = t elif (y <= -1900000000000.0) or (not (y <= -1.35e-14) and (y <= 1020000.0)): tmp = x * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.4e+102) tmp = t; elseif ((y <= -1900000000000.0) || (!(y <= -1.35e-14) && (y <= 1020000.0))) 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 <= -1.4e+102) tmp = t; elseif ((y <= -1900000000000.0) || (~((y <= -1.35e-14)) && (y <= 1020000.0))) tmp = x * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.4e+102], t, If[Or[LessEqual[y, -1900000000000.0], And[N[Not[LessEqual[y, -1.35e-14]], $MachinePrecision], LessEqual[y, 1020000.0]]], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{+102}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -1900000000000 \lor \neg \left(y \leq -1.35 \cdot 10^{-14}\right) \land y \leq 1020000:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.40000000000000009e102 or -1.9e12 < y < -1.3499999999999999e-14 or 1.02e6 < y Initial program 99.8%
associate-*l/76.5%
associate-/l*77.7%
Simplified77.7%
Taylor expanded in y around inf 58.5%
if -1.40000000000000009e102 < y < -1.9e12 or -1.3499999999999999e-14 < y < 1.02e6Initial program 96.3%
associate-*l/91.1%
associate-/l*94.8%
Simplified94.8%
Taylor expanded in y around 0 61.4%
*-commutative61.4%
associate-/l*63.6%
Simplified63.6%
Final simplification61.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.85e+112)
t
(if (<= y -2000000000000.0)
(* t (/ x z))
(if (<= y -1.85e-14) t (if (<= y 11600000.0) (* x (/ t z)) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.85e+112) {
tmp = t;
} else if (y <= -2000000000000.0) {
tmp = t * (x / z);
} else if (y <= -1.85e-14) {
tmp = t;
} else if (y <= 11600000.0) {
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 <= (-1.85d+112)) then
tmp = t
else if (y <= (-2000000000000.0d0)) then
tmp = t * (x / z)
else if (y <= (-1.85d-14)) then
tmp = t
else if (y <= 11600000.0d0) 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 <= -1.85e+112) {
tmp = t;
} else if (y <= -2000000000000.0) {
tmp = t * (x / z);
} else if (y <= -1.85e-14) {
tmp = t;
} else if (y <= 11600000.0) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.85e+112: tmp = t elif y <= -2000000000000.0: tmp = t * (x / z) elif y <= -1.85e-14: tmp = t elif y <= 11600000.0: tmp = x * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.85e+112) tmp = t; elseif (y <= -2000000000000.0) tmp = Float64(t * Float64(x / z)); elseif (y <= -1.85e-14) tmp = t; elseif (y <= 11600000.0) 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 <= -1.85e+112) tmp = t; elseif (y <= -2000000000000.0) tmp = t * (x / z); elseif (y <= -1.85e-14) tmp = t; elseif (y <= 11600000.0) tmp = x * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.85e+112], t, If[LessEqual[y, -2000000000000.0], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.85e-14], t, If[LessEqual[y, 11600000.0], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{+112}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -2000000000000:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{elif}\;y \leq -1.85 \cdot 10^{-14}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 11600000:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.85000000000000002e112 or -2e12 < y < -1.85000000000000001e-14 or 1.16e7 < y Initial program 99.8%
associate-*l/76.3%
associate-/l*77.6%
Simplified77.6%
Taylor expanded in y around inf 60.2%
if -1.85000000000000002e112 < y < -2e12Initial program 99.7%
Taylor expanded in y around 0 49.2%
if -1.85000000000000001e-14 < y < 1.16e7Initial program 95.7%
associate-*l/90.5%
associate-/l*95.9%
Simplified95.9%
Taylor expanded in y around 0 63.1%
*-commutative63.1%
associate-/l*65.8%
Simplified65.8%
Final simplification61.9%
(FPCore (x y z t) :precision binary64 (if (or (<= y -9.5e+115) (not (<= y 1.55e+182))) (* t (- 1.0 (/ x y))) (* (- x y) (/ t (- z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -9.5e+115) || !(y <= 1.55e+182)) {
tmp = t * (1.0 - (x / y));
} else {
tmp = (x - y) * (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) :: tmp
if ((y <= (-9.5d+115)) .or. (.not. (y <= 1.55d+182))) then
tmp = t * (1.0d0 - (x / y))
else
tmp = (x - y) * (t / (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.5e+115) || !(y <= 1.55e+182)) {
tmp = t * (1.0 - (x / y));
} else {
tmp = (x - y) * (t / (z - y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -9.5e+115) or not (y <= 1.55e+182): tmp = t * (1.0 - (x / y)) else: tmp = (x - y) * (t / (z - y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -9.5e+115) || !(y <= 1.55e+182)) tmp = Float64(t * Float64(1.0 - Float64(x / y))); else tmp = Float64(Float64(x - y) * Float64(t / Float64(z - y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -9.5e+115) || ~((y <= 1.55e+182))) tmp = t * (1.0 - (x / y)); else tmp = (x - y) * (t / (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -9.5e+115], N[Not[LessEqual[y, 1.55e+182]], $MachinePrecision]], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{+115} \lor \neg \left(y \leq 1.55 \cdot 10^{+182}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\
\end{array}
\end{array}
if y < -9.4999999999999997e115 or 1.54999999999999998e182 < y Initial program 99.9%
associate-*l/69.5%
associate-/l*62.5%
Simplified62.5%
associate-*r/69.5%
associate-*l/99.9%
*-commutative99.9%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 66.7%
mul-1-neg66.7%
associate-/l*97.1%
div-sub97.1%
*-inverses97.1%
sub-neg97.1%
metadata-eval97.1%
distribute-rgt-neg-in97.1%
+-commutative97.1%
distribute-neg-in97.1%
metadata-eval97.1%
sub-neg97.1%
Simplified97.1%
if -9.4999999999999997e115 < y < 1.54999999999999998e182Initial program 97.2%
associate-*l/88.9%
associate-/l*94.0%
Simplified94.0%
Final simplification94.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4.3e-16) (not (<= y 2500000.0))) (* t (- 1.0 (/ x y))) (* x (/ t z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.3e-16) || !(y <= 2500000.0)) {
tmp = t * (1.0 - (x / y));
} else {
tmp = x * (t / z);
}
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 <= (-4.3d-16)) .or. (.not. (y <= 2500000.0d0))) then
tmp = t * (1.0d0 - (x / y))
else
tmp = x * (t / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.3e-16) || !(y <= 2500000.0)) {
tmp = t * (1.0 - (x / y));
} else {
tmp = x * (t / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -4.3e-16) or not (y <= 2500000.0): tmp = t * (1.0 - (x / y)) else: tmp = x * (t / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -4.3e-16) || !(y <= 2500000.0)) tmp = Float64(t * Float64(1.0 - Float64(x / y))); else tmp = Float64(x * Float64(t / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -4.3e-16) || ~((y <= 2500000.0))) tmp = t * (1.0 - (x / y)); else tmp = x * (t / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -4.3e-16], N[Not[LessEqual[y, 2500000.0]], $MachinePrecision]], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.3 \cdot 10^{-16} \lor \neg \left(y \leq 2500000\right):\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\end{array}
\end{array}
if y < -4.2999999999999999e-16 or 2.5e6 < y Initial program 99.8%
associate-*l/79.6%
associate-/l*79.5%
Simplified79.5%
associate-*r/79.6%
associate-*l/99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in z around 0 62.9%
mul-1-neg62.9%
associate-/l*79.6%
div-sub79.7%
*-inverses79.7%
sub-neg79.7%
metadata-eval79.7%
distribute-rgt-neg-in79.7%
+-commutative79.7%
distribute-neg-in79.7%
metadata-eval79.7%
sub-neg79.7%
Simplified79.7%
if -4.2999999999999999e-16 < y < 2.5e6Initial program 95.7%
associate-*l/90.5%
associate-/l*95.9%
Simplified95.9%
Taylor expanded in y around 0 63.1%
*-commutative63.1%
associate-/l*65.8%
Simplified65.8%
Final simplification72.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.85e-9) (not (<= y 8000000.0))) (* t (- 1.0 (/ x y))) (* (- x y) (/ t z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.85e-9) || !(y <= 8000000.0)) {
tmp = t * (1.0 - (x / y));
} else {
tmp = (x - y) * (t / z);
}
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.85d-9)) .or. (.not. (y <= 8000000.0d0))) then
tmp = t * (1.0d0 - (x / y))
else
tmp = (x - y) * (t / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.85e-9) || !(y <= 8000000.0)) {
tmp = t * (1.0 - (x / y));
} else {
tmp = (x - y) * (t / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.85e-9) or not (y <= 8000000.0): tmp = t * (1.0 - (x / y)) else: tmp = (x - y) * (t / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.85e-9) || !(y <= 8000000.0)) tmp = Float64(t * Float64(1.0 - Float64(x / y))); else tmp = Float64(Float64(x - y) * Float64(t / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.85e-9) || ~((y <= 8000000.0))) tmp = t * (1.0 - (x / y)); else tmp = (x - y) * (t / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.85e-9], N[Not[LessEqual[y, 8000000.0]], $MachinePrecision]], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.85 \cdot 10^{-9} \lor \neg \left(y \leq 8000000\right):\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\end{array}
\end{array}
if y < -2.8499999999999999e-9 or 8e6 < y Initial program 99.8%
associate-*l/79.2%
associate-/l*79.0%
Simplified79.0%
associate-*r/79.2%
associate-*l/99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in z around 0 63.5%
mul-1-neg63.5%
associate-/l*80.7%
div-sub80.7%
*-inverses80.7%
sub-neg80.7%
metadata-eval80.7%
distribute-rgt-neg-in80.7%
+-commutative80.7%
distribute-neg-in80.7%
metadata-eval80.7%
sub-neg80.7%
Simplified80.7%
if -2.8499999999999999e-9 < y < 8e6Initial program 95.8%
associate-*l/90.7%
associate-/l*96.0%
Simplified96.0%
Taylor expanded in z around inf 74.6%
*-commutative74.6%
associate-/l*77.6%
Simplified77.6%
Final simplification79.1%
(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.7%
associate-*l/85.1%
associate-/l*87.8%
Simplified87.8%
Taylor expanded in y around inf 31.4%
Final simplification31.4%
(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 2024055
(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))