
(FPCore (x y z t) :precision binary64 (/ x (* (- y z) (- t z))))
double code(double x, double y, double z, double t) {
return x / ((y - z) * (t - z));
}
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) * (t - z))
end function
public static double code(double x, double y, double z, double t) {
return x / ((y - z) * (t - z));
}
def code(x, y, z, t): return x / ((y - z) * (t - z))
function code(x, y, z, t) return Float64(x / Float64(Float64(y - z) * Float64(t - z))) end
function tmp = code(x, y, z, t) tmp = x / ((y - z) * (t - z)); end
code[x_, y_, z_, t_] := N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (/ x (* (- y z) (- t z))))
double code(double x, double y, double z, double t) {
return x / ((y - z) * (t - z));
}
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) * (t - z))
end function
public static double code(double x, double y, double z, double t) {
return x / ((y - z) * (t - z));
}
def code(x, y, z, t): return x / ((y - z) * (t - z))
function code(x, y, z, t) return Float64(x / Float64(Float64(y - z) * Float64(t - z))) end
function tmp = code(x, y, z, t) tmp = x / ((y - z) * (t - z)); end
code[x_, y_, z_, t_] := N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}
\end{array}
(FPCore (x y z t) :precision binary64 (let* ((t_1 (/ x (* (- y z) (- t z))))) (if (<= t_1 0.0) (/ (/ x (- t z)) (- y z)) t_1)))
double code(double x, double y, double z, double t) {
double t_1 = x / ((y - z) * (t - z));
double tmp;
if (t_1 <= 0.0) {
tmp = (x / (t - z)) / (y - z);
} 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 = x / ((y - z) * (t - z))
if (t_1 <= 0.0d0) then
tmp = (x / (t - z)) / (y - z)
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 = x / ((y - z) * (t - z));
double tmp;
if (t_1 <= 0.0) {
tmp = (x / (t - z)) / (y - z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / ((y - z) * (t - z)) tmp = 0 if t_1 <= 0.0: tmp = (x / (t - z)) / (y - z) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(Float64(y - z) * Float64(t - z))) tmp = 0.0 if (t_1 <= 0.0) tmp = Float64(Float64(x / Float64(t - z)) / Float64(y - z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / ((y - z) * (t - z)); tmp = 0.0; if (t_1 <= 0.0) tmp = (x / (t - z)) / (y - z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], t$95$1]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\
\mathbf{if}\;t_1 \leq 0:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y - z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z))) < 0.0Initial program 83.8%
associate-/l/98.6%
Simplified98.6%
if 0.0 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z))) Initial program 99.5%
Final simplification98.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- y z) (- t z))) (t_2 (/ x (- t z))))
(if (<= t_1 (- INFINITY))
(/ t_2 y)
(if (<= t_1 4e+305) (/ x t_1) (* t_2 (/ -1.0 z))))))
double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double t_2 = x / (t - z);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t_2 / y;
} else if (t_1 <= 4e+305) {
tmp = x / t_1;
} else {
tmp = t_2 * (-1.0 / z);
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double t_2 = x / (t - z);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = t_2 / y;
} else if (t_1 <= 4e+305) {
tmp = x / t_1;
} else {
tmp = t_2 * (-1.0 / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - z) * (t - z) t_2 = x / (t - z) tmp = 0 if t_1 <= -math.inf: tmp = t_2 / y elif t_1 <= 4e+305: tmp = x / t_1 else: tmp = t_2 * (-1.0 / z) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - z) * Float64(t - z)) t_2 = Float64(x / Float64(t - z)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(t_2 / y); elseif (t_1 <= 4e+305) tmp = Float64(x / t_1); else tmp = Float64(t_2 * Float64(-1.0 / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - z) * (t - z); t_2 = x / (t - z); tmp = 0.0; if (t_1 <= -Inf) tmp = t_2 / y; elseif (t_1 <= 4e+305) tmp = x / t_1; else tmp = t_2 * (-1.0 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(t$95$2 / y), $MachinePrecision], If[LessEqual[t$95$1, 4e+305], N[(x / t$95$1), $MachinePrecision], N[(t$95$2 * N[(-1.0 / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
t_2 := \frac{x}{t - z}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;\frac{t_2}{y}\\
\mathbf{elif}\;t_1 \leq 4 \cdot 10^{+305}:\\
\;\;\;\;\frac{x}{t_1}\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot \frac{-1}{z}\\
\end{array}
\end{array}
if (*.f64 (-.f64 y z) (-.f64 t z)) < -inf.0Initial program 70.5%
Taylor expanded in y around inf 63.4%
*-commutative63.4%
associate-/r*86.0%
Simplified86.0%
if -inf.0 < (*.f64 (-.f64 y z) (-.f64 t z)) < 3.9999999999999998e305Initial program 99.1%
if 3.9999999999999998e305 < (*.f64 (-.f64 y z) (-.f64 t z)) Initial program 68.8%
Taylor expanded in y around 0 61.8%
associate-*r/61.8%
neg-mul-161.8%
Simplified61.8%
neg-mul-161.8%
times-frac84.3%
Applied egg-rr84.3%
Final simplification93.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- y z) (- t z))))
(if (<= t_1 (- INFINITY))
(/ (/ x (- t z)) y)
(if (<= t_1 4e+305) (/ x t_1) (/ (/ -1.0 z) (/ (- t z) x))))))
double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (x / (t - z)) / y;
} else if (t_1 <= 4e+305) {
tmp = x / t_1;
} else {
tmp = (-1.0 / z) / ((t - z) / x);
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = (x / (t - z)) / y;
} else if (t_1 <= 4e+305) {
tmp = x / t_1;
} else {
tmp = (-1.0 / z) / ((t - z) / x);
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - z) * (t - z) tmp = 0 if t_1 <= -math.inf: tmp = (x / (t - z)) / y elif t_1 <= 4e+305: tmp = x / t_1 else: tmp = (-1.0 / z) / ((t - z) / x) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - z) * Float64(t - z)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (t_1 <= 4e+305) tmp = Float64(x / t_1); else tmp = Float64(Float64(-1.0 / z) / Float64(Float64(t - z) / x)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - z) * (t - z); tmp = 0.0; if (t_1 <= -Inf) tmp = (x / (t - z)) / y; elseif (t_1 <= 4e+305) tmp = x / t_1; else tmp = (-1.0 / z) / ((t - z) / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t$95$1, 4e+305], N[(x / t$95$1), $MachinePrecision], N[(N[(-1.0 / z), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;t_1 \leq 4 \cdot 10^{+305}:\\
\;\;\;\;\frac{x}{t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{-1}{z}}{\frac{t - z}{x}}\\
\end{array}
\end{array}
if (*.f64 (-.f64 y z) (-.f64 t z)) < -inf.0Initial program 70.5%
Taylor expanded in y around inf 63.4%
*-commutative63.4%
associate-/r*86.0%
Simplified86.0%
if -inf.0 < (*.f64 (-.f64 y z) (-.f64 t z)) < 3.9999999999999998e305Initial program 99.1%
if 3.9999999999999998e305 < (*.f64 (-.f64 y z) (-.f64 t z)) Initial program 68.8%
Taylor expanded in y around 0 61.8%
associate-*r/61.8%
neg-mul-161.8%
Simplified61.8%
neg-mul-161.8%
times-frac84.3%
Applied egg-rr84.3%
clear-num85.6%
un-div-inv85.6%
Applied egg-rr85.6%
Final simplification94.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (- x) z)))
(if (<= y -1.15e+210)
(/ (/ x (- t z)) y)
(if (<= y -2.4e-5)
(/ x (* y (- t z)))
(if (<= y -1.15e-112)
(/ t_1 (- y z))
(if (or (<= y -5.6e-133) (not (<= y 1.12e-98)))
(/ (/ x t) (- y z))
(/ t_1 (- t z))))))))
double code(double x, double y, double z, double t) {
double t_1 = -x / z;
double tmp;
if (y <= -1.15e+210) {
tmp = (x / (t - z)) / y;
} else if (y <= -2.4e-5) {
tmp = x / (y * (t - z));
} else if (y <= -1.15e-112) {
tmp = t_1 / (y - z);
} else if ((y <= -5.6e-133) || !(y <= 1.12e-98)) {
tmp = (x / t) / (y - z);
} else {
tmp = t_1 / (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 = -x / z
if (y <= (-1.15d+210)) then
tmp = (x / (t - z)) / y
else if (y <= (-2.4d-5)) then
tmp = x / (y * (t - z))
else if (y <= (-1.15d-112)) then
tmp = t_1 / (y - z)
else if ((y <= (-5.6d-133)) .or. (.not. (y <= 1.12d-98))) then
tmp = (x / t) / (y - z)
else
tmp = t_1 / (t - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = -x / z;
double tmp;
if (y <= -1.15e+210) {
tmp = (x / (t - z)) / y;
} else if (y <= -2.4e-5) {
tmp = x / (y * (t - z));
} else if (y <= -1.15e-112) {
tmp = t_1 / (y - z);
} else if ((y <= -5.6e-133) || !(y <= 1.12e-98)) {
tmp = (x / t) / (y - z);
} else {
tmp = t_1 / (t - z);
}
return tmp;
}
def code(x, y, z, t): t_1 = -x / z tmp = 0 if y <= -1.15e+210: tmp = (x / (t - z)) / y elif y <= -2.4e-5: tmp = x / (y * (t - z)) elif y <= -1.15e-112: tmp = t_1 / (y - z) elif (y <= -5.6e-133) or not (y <= 1.12e-98): tmp = (x / t) / (y - z) else: tmp = t_1 / (t - z) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(-x) / z) tmp = 0.0 if (y <= -1.15e+210) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (y <= -2.4e-5) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (y <= -1.15e-112) tmp = Float64(t_1 / Float64(y - z)); elseif ((y <= -5.6e-133) || !(y <= 1.12e-98)) tmp = Float64(Float64(x / t) / Float64(y - z)); else tmp = Float64(t_1 / Float64(t - z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = -x / z; tmp = 0.0; if (y <= -1.15e+210) tmp = (x / (t - z)) / y; elseif (y <= -2.4e-5) tmp = x / (y * (t - z)); elseif (y <= -1.15e-112) tmp = t_1 / (y - z); elseif ((y <= -5.6e-133) || ~((y <= 1.12e-98))) tmp = (x / t) / (y - z); else tmp = t_1 / (t - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[((-x) / z), $MachinePrecision]}, If[LessEqual[y, -1.15e+210], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -2.4e-5], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.15e-112], N[(t$95$1 / N[(y - z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -5.6e-133], N[Not[LessEqual[y, 1.12e-98]], $MachinePrecision]], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(t - z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-x}{z}\\
\mathbf{if}\;y \leq -1.15 \cdot 10^{+210}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;y \leq -2.4 \cdot 10^{-5}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;y \leq -1.15 \cdot 10^{-112}:\\
\;\;\;\;\frac{t_1}{y - z}\\
\mathbf{elif}\;y \leq -5.6 \cdot 10^{-133} \lor \neg \left(y \leq 1.12 \cdot 10^{-98}\right):\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{t - z}\\
\end{array}
\end{array}
if y < -1.1499999999999999e210Initial program 77.6%
Taylor expanded in y around inf 77.6%
*-commutative77.6%
associate-/r*95.9%
Simplified95.9%
if -1.1499999999999999e210 < y < -2.4000000000000001e-5Initial program 91.6%
Taylor expanded in y around inf 83.2%
*-commutative83.2%
Simplified83.2%
if -2.4000000000000001e-5 < y < -1.14999999999999995e-112Initial program 94.1%
Taylor expanded in t around 0 50.2%
associate-*r/50.2%
neg-mul-150.2%
*-commutative50.2%
associate-/r*52.2%
Simplified52.2%
if -1.14999999999999995e-112 < y < -5.5999999999999997e-133 or 1.12e-98 < y Initial program 83.9%
associate-/l/96.4%
Simplified96.4%
Taylor expanded in t around inf 60.4%
if -5.5999999999999997e-133 < y < 1.12e-98Initial program 91.5%
Taylor expanded in y around 0 84.6%
mul-1-neg84.6%
distribute-frac-neg84.6%
associate-/r*90.3%
Simplified90.3%
Final simplification75.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (- x) z)))
(if (<= y -1.3e+210)
(* (/ x (- t z)) (/ 1.0 y))
(if (<= y -0.00012)
(/ x (* y (- t z)))
(if (<= y -2.3e-110)
(/ t_1 (- y z))
(if (or (<= y -3e-132) (not (<= y 2.2e-93)))
(/ (/ x t) (- y z))
(/ t_1 (- t z))))))))
double code(double x, double y, double z, double t) {
double t_1 = -x / z;
double tmp;
if (y <= -1.3e+210) {
tmp = (x / (t - z)) * (1.0 / y);
} else if (y <= -0.00012) {
tmp = x / (y * (t - z));
} else if (y <= -2.3e-110) {
tmp = t_1 / (y - z);
} else if ((y <= -3e-132) || !(y <= 2.2e-93)) {
tmp = (x / t) / (y - z);
} else {
tmp = t_1 / (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 = -x / z
if (y <= (-1.3d+210)) then
tmp = (x / (t - z)) * (1.0d0 / y)
else if (y <= (-0.00012d0)) then
tmp = x / (y * (t - z))
else if (y <= (-2.3d-110)) then
tmp = t_1 / (y - z)
else if ((y <= (-3d-132)) .or. (.not. (y <= 2.2d-93))) then
tmp = (x / t) / (y - z)
else
tmp = t_1 / (t - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = -x / z;
double tmp;
if (y <= -1.3e+210) {
tmp = (x / (t - z)) * (1.0 / y);
} else if (y <= -0.00012) {
tmp = x / (y * (t - z));
} else if (y <= -2.3e-110) {
tmp = t_1 / (y - z);
} else if ((y <= -3e-132) || !(y <= 2.2e-93)) {
tmp = (x / t) / (y - z);
} else {
tmp = t_1 / (t - z);
}
return tmp;
}
def code(x, y, z, t): t_1 = -x / z tmp = 0 if y <= -1.3e+210: tmp = (x / (t - z)) * (1.0 / y) elif y <= -0.00012: tmp = x / (y * (t - z)) elif y <= -2.3e-110: tmp = t_1 / (y - z) elif (y <= -3e-132) or not (y <= 2.2e-93): tmp = (x / t) / (y - z) else: tmp = t_1 / (t - z) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(-x) / z) tmp = 0.0 if (y <= -1.3e+210) tmp = Float64(Float64(x / Float64(t - z)) * Float64(1.0 / y)); elseif (y <= -0.00012) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (y <= -2.3e-110) tmp = Float64(t_1 / Float64(y - z)); elseif ((y <= -3e-132) || !(y <= 2.2e-93)) tmp = Float64(Float64(x / t) / Float64(y - z)); else tmp = Float64(t_1 / Float64(t - z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = -x / z; tmp = 0.0; if (y <= -1.3e+210) tmp = (x / (t - z)) * (1.0 / y); elseif (y <= -0.00012) tmp = x / (y * (t - z)); elseif (y <= -2.3e-110) tmp = t_1 / (y - z); elseif ((y <= -3e-132) || ~((y <= 2.2e-93))) tmp = (x / t) / (y - z); else tmp = t_1 / (t - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[((-x) / z), $MachinePrecision]}, If[LessEqual[y, -1.3e+210], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -0.00012], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.3e-110], N[(t$95$1 / N[(y - z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -3e-132], N[Not[LessEqual[y, 2.2e-93]], $MachinePrecision]], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(t - z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-x}{z}\\
\mathbf{if}\;y \leq -1.3 \cdot 10^{+210}:\\
\;\;\;\;\frac{x}{t - z} \cdot \frac{1}{y}\\
\mathbf{elif}\;y \leq -0.00012:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;y \leq -2.3 \cdot 10^{-110}:\\
\;\;\;\;\frac{t_1}{y - z}\\
\mathbf{elif}\;y \leq -3 \cdot 10^{-132} \lor \neg \left(y \leq 2.2 \cdot 10^{-93}\right):\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{t - z}\\
\end{array}
\end{array}
if y < -1.29999999999999995e210Initial program 77.6%
Taylor expanded in y around inf 77.6%
*-commutative77.6%
Simplified77.6%
associate-/r*95.9%
*-un-lft-identity95.9%
associate-*l/95.9%
div-inv95.9%
associate-*l/95.9%
*-un-lft-identity95.9%
Applied egg-rr95.9%
if -1.29999999999999995e210 < y < -1.20000000000000003e-4Initial program 91.6%
Taylor expanded in y around inf 83.2%
*-commutative83.2%
Simplified83.2%
if -1.20000000000000003e-4 < y < -2.3000000000000001e-110Initial program 94.1%
Taylor expanded in t around 0 50.2%
associate-*r/50.2%
neg-mul-150.2%
*-commutative50.2%
associate-/r*52.2%
Simplified52.2%
if -2.3000000000000001e-110 < y < -3e-132 or 2.19999999999999996e-93 < y Initial program 84.7%
associate-/l/96.4%
Simplified96.4%
Taylor expanded in t around inf 61.0%
if -3e-132 < y < 2.19999999999999996e-93Initial program 90.3%
Taylor expanded in y around 0 83.6%
mul-1-neg83.6%
distribute-frac-neg83.6%
associate-/r*90.4%
Simplified90.4%
Final simplification75.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ 1.0 (* t (/ y x)))))
(if (<= z -3.05)
(* (/ x z) (/ 1.0 z))
(if (<= z 2.35e-48)
t_1
(if (<= z 2050000000000.0)
(/ (- x) (* y z))
(if (<= z 1.02e+61) t_1 (/ (/ x z) z)))))))
double code(double x, double y, double z, double t) {
double t_1 = 1.0 / (t * (y / x));
double tmp;
if (z <= -3.05) {
tmp = (x / z) * (1.0 / z);
} else if (z <= 2.35e-48) {
tmp = t_1;
} else if (z <= 2050000000000.0) {
tmp = -x / (y * z);
} else if (z <= 1.02e+61) {
tmp = t_1;
} else {
tmp = (x / z) / 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 = 1.0d0 / (t * (y / x))
if (z <= (-3.05d0)) then
tmp = (x / z) * (1.0d0 / z)
else if (z <= 2.35d-48) then
tmp = t_1
else if (z <= 2050000000000.0d0) then
tmp = -x / (y * z)
else if (z <= 1.02d+61) then
tmp = t_1
else
tmp = (x / z) / z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = 1.0 / (t * (y / x));
double tmp;
if (z <= -3.05) {
tmp = (x / z) * (1.0 / z);
} else if (z <= 2.35e-48) {
tmp = t_1;
} else if (z <= 2050000000000.0) {
tmp = -x / (y * z);
} else if (z <= 1.02e+61) {
tmp = t_1;
} else {
tmp = (x / z) / z;
}
return tmp;
}
def code(x, y, z, t): t_1 = 1.0 / (t * (y / x)) tmp = 0 if z <= -3.05: tmp = (x / z) * (1.0 / z) elif z <= 2.35e-48: tmp = t_1 elif z <= 2050000000000.0: tmp = -x / (y * z) elif z <= 1.02e+61: tmp = t_1 else: tmp = (x / z) / z return tmp
function code(x, y, z, t) t_1 = Float64(1.0 / Float64(t * Float64(y / x))) tmp = 0.0 if (z <= -3.05) tmp = Float64(Float64(x / z) * Float64(1.0 / z)); elseif (z <= 2.35e-48) tmp = t_1; elseif (z <= 2050000000000.0) tmp = Float64(Float64(-x) / Float64(y * z)); elseif (z <= 1.02e+61) tmp = t_1; else tmp = Float64(Float64(x / z) / z); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 1.0 / (t * (y / x)); tmp = 0.0; if (z <= -3.05) tmp = (x / z) * (1.0 / z); elseif (z <= 2.35e-48) tmp = t_1; elseif (z <= 2050000000000.0) tmp = -x / (y * z); elseif (z <= 1.02e+61) tmp = t_1; else tmp = (x / z) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(1.0 / N[(t * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.05], N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.35e-48], t$95$1, If[LessEqual[z, 2050000000000.0], N[((-x) / N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.02e+61], t$95$1, N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{1}{t \cdot \frac{y}{x}}\\
\mathbf{if}\;z \leq -3.05:\\
\;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\
\mathbf{elif}\;z \leq 2.35 \cdot 10^{-48}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2050000000000:\\
\;\;\;\;\frac{-x}{y \cdot z}\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{+61}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\end{array}
\end{array}
if z < -3.0499999999999998Initial program 87.0%
Taylor expanded in z around inf 69.5%
unpow269.5%
Simplified69.5%
associate-/r*74.4%
div-inv74.4%
Applied egg-rr74.4%
if -3.0499999999999998 < z < 2.3499999999999999e-48 or 2.05e12 < z < 1.01999999999999999e61Initial program 89.7%
Taylor expanded in z around 0 55.7%
frac-2neg55.7%
neg-sub055.7%
metadata-eval55.7%
div-sub53.2%
metadata-eval53.2%
distribute-rgt-neg-in53.2%
add-sqr-sqrt26.5%
sqrt-unprod33.9%
sqr-neg33.9%
sqrt-unprod7.8%
add-sqr-sqrt21.7%
frac-2neg21.7%
associate-/r*23.9%
Applied egg-rr23.9%
div024.8%
neg-sub024.8%
distribute-neg-frac24.8%
distribute-neg-frac24.8%
Simplified24.8%
clear-num24.9%
inv-pow24.9%
div-inv24.8%
clear-num24.8%
add-sqr-sqrt10.2%
sqrt-unprod35.0%
sqr-neg35.0%
sqrt-unprod32.8%
add-sqr-sqrt63.3%
Applied egg-rr63.3%
unpow-163.3%
Simplified63.3%
if 2.3499999999999999e-48 < z < 2.05e12Initial program 99.9%
Taylor expanded in y around inf 19.6%
*-commutative19.6%
Simplified19.6%
Taylor expanded in t around 0 18.6%
mul-1-neg18.6%
Simplified18.6%
if 1.01999999999999999e61 < z Initial program 80.7%
Taylor expanded in z around inf 68.3%
unpow268.3%
associate-/r*84.4%
Simplified84.4%
Final simplification68.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (* (- y z) t))))
(if (<= z -4.3e+55)
(* (/ x z) (/ 1.0 z))
(if (<= z 4.2e-48)
t_1
(if (<= z 1400000000000.0)
(/ (- x) (* y z))
(if (<= z 3.3e+66) t_1 (/ (/ x z) z)))))))
double code(double x, double y, double z, double t) {
double t_1 = x / ((y - z) * t);
double tmp;
if (z <= -4.3e+55) {
tmp = (x / z) * (1.0 / z);
} else if (z <= 4.2e-48) {
tmp = t_1;
} else if (z <= 1400000000000.0) {
tmp = -x / (y * z);
} else if (z <= 3.3e+66) {
tmp = t_1;
} else {
tmp = (x / z) / 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 = x / ((y - z) * t)
if (z <= (-4.3d+55)) then
tmp = (x / z) * (1.0d0 / z)
else if (z <= 4.2d-48) then
tmp = t_1
else if (z <= 1400000000000.0d0) then
tmp = -x / (y * z)
else if (z <= 3.3d+66) then
tmp = t_1
else
tmp = (x / z) / z
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 tmp;
if (z <= -4.3e+55) {
tmp = (x / z) * (1.0 / z);
} else if (z <= 4.2e-48) {
tmp = t_1;
} else if (z <= 1400000000000.0) {
tmp = -x / (y * z);
} else if (z <= 3.3e+66) {
tmp = t_1;
} else {
tmp = (x / z) / z;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / ((y - z) * t) tmp = 0 if z <= -4.3e+55: tmp = (x / z) * (1.0 / z) elif z <= 4.2e-48: tmp = t_1 elif z <= 1400000000000.0: tmp = -x / (y * z) elif z <= 3.3e+66: tmp = t_1 else: tmp = (x / z) / z return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(Float64(y - z) * t)) tmp = 0.0 if (z <= -4.3e+55) tmp = Float64(Float64(x / z) * Float64(1.0 / z)); elseif (z <= 4.2e-48) tmp = t_1; elseif (z <= 1400000000000.0) tmp = Float64(Float64(-x) / Float64(y * z)); elseif (z <= 3.3e+66) tmp = t_1; else tmp = Float64(Float64(x / z) / z); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / ((y - z) * t); tmp = 0.0; if (z <= -4.3e+55) tmp = (x / z) * (1.0 / z); elseif (z <= 4.2e-48) tmp = t_1; elseif (z <= 1400000000000.0) tmp = -x / (y * z); elseif (z <= 3.3e+66) tmp = t_1; else tmp = (x / z) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.3e+55], N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e-48], t$95$1, If[LessEqual[z, 1400000000000.0], N[((-x) / N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.3e+66], t$95$1, N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{if}\;z \leq -4.3 \cdot 10^{+55}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-48}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1400000000000:\\
\;\;\;\;\frac{-x}{y \cdot z}\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{+66}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\end{array}
\end{array}
if z < -4.2999999999999999e55Initial program 84.3%
Taylor expanded in z around inf 75.5%
unpow275.5%
Simplified75.5%
associate-/r*81.3%
div-inv81.4%
Applied egg-rr81.4%
if -4.2999999999999999e55 < z < 4.19999999999999977e-48 or 1.4e12 < z < 3.3000000000000001e66Initial program 90.7%
Taylor expanded in t around inf 67.4%
if 4.19999999999999977e-48 < z < 1.4e12Initial program 99.9%
Taylor expanded in y around inf 19.6%
*-commutative19.6%
Simplified19.6%
Taylor expanded in t around 0 18.6%
mul-1-neg18.6%
Simplified18.6%
if 3.3000000000000001e66 < z Initial program 80.4%
Taylor expanded in z around inf 69.7%
unpow269.7%
associate-/r*86.2%
Simplified86.2%
Final simplification72.0%
(FPCore (x y z t)
:precision binary64
(if (<= y -1e+210)
(/ (/ x (- t z)) y)
(if (<= y -1.35e-27)
(/ x (* y (- t z)))
(if (<= y 4.8e-94) (/ (- x) (* z (- t z))) (/ (/ x t) (- y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1e+210) {
tmp = (x / (t - z)) / y;
} else if (y <= -1.35e-27) {
tmp = x / (y * (t - z));
} else if (y <= 4.8e-94) {
tmp = -x / (z * (t - z));
} else {
tmp = (x / t) / (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 (y <= (-1d+210)) then
tmp = (x / (t - z)) / y
else if (y <= (-1.35d-27)) then
tmp = x / (y * (t - z))
else if (y <= 4.8d-94) then
tmp = -x / (z * (t - z))
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1e+210) {
tmp = (x / (t - z)) / y;
} else if (y <= -1.35e-27) {
tmp = x / (y * (t - z));
} else if (y <= 4.8e-94) {
tmp = -x / (z * (t - z));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1e+210: tmp = (x / (t - z)) / y elif y <= -1.35e-27: tmp = x / (y * (t - z)) elif y <= 4.8e-94: tmp = -x / (z * (t - z)) else: tmp = (x / t) / (y - z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1e+210) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (y <= -1.35e-27) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (y <= 4.8e-94) tmp = Float64(Float64(-x) / Float64(z * Float64(t - z))); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1e+210) tmp = (x / (t - z)) / y; elseif (y <= -1.35e-27) tmp = x / (y * (t - z)); elseif (y <= 4.8e-94) tmp = -x / (z * (t - z)); else tmp = (x / t) / (y - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1e+210], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -1.35e-27], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e-94], N[((-x) / N[(z * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+210}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;y \leq -1.35 \cdot 10^{-27}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-94}:\\
\;\;\;\;\frac{-x}{z \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -9.99999999999999927e209Initial program 77.6%
Taylor expanded in y around inf 77.6%
*-commutative77.6%
associate-/r*95.9%
Simplified95.9%
if -9.99999999999999927e209 < y < -1.34999999999999994e-27Initial program 92.3%
Taylor expanded in y around inf 80.8%
*-commutative80.8%
Simplified80.8%
if -1.34999999999999994e-27 < y < 4.8e-94Initial program 91.5%
Taylor expanded in y around 0 76.6%
associate-*r/76.6%
neg-mul-176.6%
Simplified76.6%
if 4.8e-94 < y Initial program 83.7%
associate-/l/96.1%
Simplified96.1%
Taylor expanded in t around inf 59.2%
Final simplification73.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -5.1e+210)
(/ (/ x (- t z)) y)
(if (<= y -6e-28)
(/ x (* y (- t z)))
(if (<= y 8e-95) (/ (/ (- x) z) (- t z)) (/ (/ x t) (- y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.1e+210) {
tmp = (x / (t - z)) / y;
} else if (y <= -6e-28) {
tmp = x / (y * (t - z));
} else if (y <= 8e-95) {
tmp = (-x / z) / (t - z);
} else {
tmp = (x / t) / (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 (y <= (-5.1d+210)) then
tmp = (x / (t - z)) / y
else if (y <= (-6d-28)) then
tmp = x / (y * (t - z))
else if (y <= 8d-95) then
tmp = (-x / z) / (t - z)
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.1e+210) {
tmp = (x / (t - z)) / y;
} else if (y <= -6e-28) {
tmp = x / (y * (t - z));
} else if (y <= 8e-95) {
tmp = (-x / z) / (t - z);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5.1e+210: tmp = (x / (t - z)) / y elif y <= -6e-28: tmp = x / (y * (t - z)) elif y <= 8e-95: tmp = (-x / z) / (t - z) else: tmp = (x / t) / (y - z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5.1e+210) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (y <= -6e-28) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (y <= 8e-95) tmp = Float64(Float64(Float64(-x) / z) / Float64(t - z)); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -5.1e+210) tmp = (x / (t - z)) / y; elseif (y <= -6e-28) tmp = x / (y * (t - z)); elseif (y <= 8e-95) tmp = (-x / z) / (t - z); else tmp = (x / t) / (y - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.1e+210], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -6e-28], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8e-95], N[(N[((-x) / z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.1 \cdot 10^{+210}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;y \leq -6 \cdot 10^{-28}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;y \leq 8 \cdot 10^{-95}:\\
\;\;\;\;\frac{\frac{-x}{z}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -5.1000000000000001e210Initial program 77.6%
Taylor expanded in y around inf 77.6%
*-commutative77.6%
associate-/r*95.9%
Simplified95.9%
if -5.1000000000000001e210 < y < -6.00000000000000005e-28Initial program 92.3%
Taylor expanded in y around inf 80.8%
*-commutative80.8%
Simplified80.8%
if -6.00000000000000005e-28 < y < 7.99999999999999992e-95Initial program 92.3%
Taylor expanded in y around 0 77.3%
mul-1-neg77.3%
distribute-frac-neg77.3%
associate-/r*82.9%
Simplified82.9%
if 7.99999999999999992e-95 < y Initial program 82.8%
associate-/l/96.2%
Simplified96.2%
Taylor expanded in t around inf 58.5%
Final simplification75.7%
(FPCore (x y z t) :precision binary64 (if (<= t 3.55e-270) (/ x (* y (- t z))) (if (<= t 8.2e+24) (/ (/ x z) z) (/ x (* (- y z) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 3.55e-270) {
tmp = x / (y * (t - z));
} else if (t <= 8.2e+24) {
tmp = (x / z) / z;
} 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) :: tmp
if (t <= 3.55d-270) then
tmp = x / (y * (t - z))
else if (t <= 8.2d+24) then
tmp = (x / z) / z
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 tmp;
if (t <= 3.55e-270) {
tmp = x / (y * (t - z));
} else if (t <= 8.2e+24) {
tmp = (x / z) / z;
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= 3.55e-270: tmp = x / (y * (t - z)) elif t <= 8.2e+24: tmp = (x / z) / z else: tmp = x / ((y - z) * t) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= 3.55e-270) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (t <= 8.2e+24) tmp = Float64(Float64(x / z) / z); else tmp = Float64(x / Float64(Float64(y - z) * t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= 3.55e-270) tmp = x / (y * (t - z)); elseif (t <= 8.2e+24) tmp = (x / z) / z; else tmp = x / ((y - z) * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, 3.55e-270], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.2e+24], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.55 \cdot 10^{-270}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;t \leq 8.2 \cdot 10^{+24}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < 3.5500000000000001e-270Initial program 91.1%
Taylor expanded in y around inf 60.3%
*-commutative60.3%
Simplified60.3%
if 3.5500000000000001e-270 < t < 8.2000000000000002e24Initial program 89.0%
Taylor expanded in z around inf 48.4%
unpow248.4%
associate-/r*57.7%
Simplified57.7%
if 8.2000000000000002e24 < t Initial program 80.0%
Taylor expanded in t around inf 75.5%
Final simplification63.7%
(FPCore (x y z t) :precision binary64 (if (<= t 3.7e-270) (/ x (* y (- t z))) (if (<= t 4.7e+21) (/ (/ x z) z) (/ (/ x t) (- y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 3.7e-270) {
tmp = x / (y * (t - z));
} else if (t <= 4.7e+21) {
tmp = (x / z) / z;
} else {
tmp = (x / t) / (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 (t <= 3.7d-270) then
tmp = x / (y * (t - z))
else if (t <= 4.7d+21) then
tmp = (x / z) / z
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= 3.7e-270) {
tmp = x / (y * (t - z));
} else if (t <= 4.7e+21) {
tmp = (x / z) / z;
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= 3.7e-270: tmp = x / (y * (t - z)) elif t <= 4.7e+21: tmp = (x / z) / z else: tmp = (x / t) / (y - z) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= 3.7e-270) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (t <= 4.7e+21) tmp = Float64(Float64(x / z) / z); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= 3.7e-270) tmp = x / (y * (t - z)); elseif (t <= 4.7e+21) tmp = (x / z) / z; else tmp = (x / t) / (y - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, 3.7e-270], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.7e+21], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.7 \cdot 10^{-270}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;t \leq 4.7 \cdot 10^{+21}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < 3.7000000000000001e-270Initial program 91.1%
Taylor expanded in y around inf 60.3%
*-commutative60.3%
Simplified60.3%
if 3.7000000000000001e-270 < t < 4.7e21Initial program 89.0%
Taylor expanded in z around inf 48.4%
unpow248.4%
associate-/r*57.7%
Simplified57.7%
if 4.7e21 < t Initial program 80.0%
associate-/l/96.6%
Simplified96.6%
Taylor expanded in t around inf 86.7%
Final simplification66.6%
(FPCore (x y z t) :precision binary64 (if (or (<= z -2.25e-7) (not (<= z 4.2e-48))) (/ x (* z z)) (/ x (* y t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.25e-7) || !(z <= 4.2e-48)) {
tmp = x / (z * z);
} else {
tmp = x / (y * 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 ((z <= (-2.25d-7)) .or. (.not. (z <= 4.2d-48))) then
tmp = x / (z * z)
else
tmp = x / (y * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.25e-7) || !(z <= 4.2e-48)) {
tmp = x / (z * z);
} else {
tmp = x / (y * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -2.25e-7) or not (z <= 4.2e-48): tmp = x / (z * z) else: tmp = x / (y * t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -2.25e-7) || !(z <= 4.2e-48)) tmp = Float64(x / Float64(z * z)); else tmp = Float64(x / Float64(y * t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -2.25e-7) || ~((z <= 4.2e-48))) tmp = x / (z * z); else tmp = x / (y * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -2.25e-7], N[Not[LessEqual[z, 4.2e-48]], $MachinePrecision]], N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.25 \cdot 10^{-7} \lor \neg \left(z \leq 4.2 \cdot 10^{-48}\right):\\
\;\;\;\;\frac{x}{z \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -2.2499999999999999e-7 or 4.19999999999999977e-48 < z Initial program 86.6%
Taylor expanded in z around inf 62.2%
unpow262.2%
Simplified62.2%
if -2.2499999999999999e-7 < z < 4.19999999999999977e-48Initial program 89.3%
Taylor expanded in z around 0 58.0%
Final simplification60.5%
(FPCore (x y z t) :precision binary64 (if (or (<= z -3.2e-8) (not (<= z 4.2e-48))) (/ (/ x z) z) (/ x (* y t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.2e-8) || !(z <= 4.2e-48)) {
tmp = (x / z) / z;
} else {
tmp = x / (y * 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 ((z <= (-3.2d-8)) .or. (.not. (z <= 4.2d-48))) then
tmp = (x / z) / z
else
tmp = x / (y * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.2e-8) || !(z <= 4.2e-48)) {
tmp = (x / z) / z;
} else {
tmp = x / (y * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -3.2e-8) or not (z <= 4.2e-48): tmp = (x / z) / z else: tmp = x / (y * t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -3.2e-8) || !(z <= 4.2e-48)) tmp = Float64(Float64(x / z) / z); else tmp = Float64(x / Float64(y * t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -3.2e-8) || ~((z <= 4.2e-48))) tmp = (x / z) / z; else tmp = x / (y * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -3.2e-8], N[Not[LessEqual[z, 4.2e-48]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{-8} \lor \neg \left(z \leq 4.2 \cdot 10^{-48}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -3.2000000000000002e-8 or 4.19999999999999977e-48 < z Initial program 86.6%
Taylor expanded in z around inf 62.2%
unpow262.2%
associate-/r*69.9%
Simplified69.9%
if -3.2000000000000002e-8 < z < 4.19999999999999977e-48Initial program 89.3%
Taylor expanded in z around 0 58.0%
Final simplification64.9%
(FPCore (x y z t) :precision binary64 (if (<= z -1.25e-8) (* (/ x z) (/ 1.0 z)) (if (<= z 2.1e-48) (/ x (* y t)) (/ (/ x z) z))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.25e-8) {
tmp = (x / z) * (1.0 / z);
} else if (z <= 2.1e-48) {
tmp = x / (y * t);
} else {
tmp = (x / z) / 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 (z <= (-1.25d-8)) then
tmp = (x / z) * (1.0d0 / z)
else if (z <= 2.1d-48) then
tmp = x / (y * t)
else
tmp = (x / z) / z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.25e-8) {
tmp = (x / z) * (1.0 / z);
} else if (z <= 2.1e-48) {
tmp = x / (y * t);
} else {
tmp = (x / z) / z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.25e-8: tmp = (x / z) * (1.0 / z) elif z <= 2.1e-48: tmp = x / (y * t) else: tmp = (x / z) / z return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.25e-8) tmp = Float64(Float64(x / z) * Float64(1.0 / z)); elseif (z <= 2.1e-48) tmp = Float64(x / Float64(y * t)); else tmp = Float64(Float64(x / z) / z); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.25e-8) tmp = (x / z) * (1.0 / z); elseif (z <= 2.1e-48) tmp = x / (y * t); else tmp = (x / z) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.25e-8], N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e-48], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{-8}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-48}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\end{array}
\end{array}
if z < -1.2499999999999999e-8Initial program 86.1%
Taylor expanded in z around inf 67.8%
unpow267.8%
Simplified67.8%
associate-/r*72.5%
div-inv72.6%
Applied egg-rr72.6%
if -1.2499999999999999e-8 < z < 2.09999999999999989e-48Initial program 89.3%
Taylor expanded in z around 0 58.0%
if 2.09999999999999989e-48 < z Initial program 87.1%
Taylor expanded in z around inf 56.3%
unpow256.3%
associate-/r*67.0%
Simplified67.0%
Final simplification64.9%
(FPCore (x y z t) :precision binary64 (/ (/ x (- y z)) (- t z)))
double code(double x, double y, double z, double t) {
return (x / (y - z)) / (t - z);
}
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)) / (t - z)
end function
public static double code(double x, double y, double z, double t) {
return (x / (y - z)) / (t - z);
}
def code(x, y, z, t): return (x / (y - z)) / (t - z)
function code(x, y, z, t) return Float64(Float64(x / Float64(y - z)) / Float64(t - z)) end
function tmp = code(x, y, z, t) tmp = (x / (y - z)) / (t - z); end
code[x_, y_, z_, t_] := N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{x}{y - z}}{t - z}
\end{array}
Initial program 87.7%
associate-/r*96.4%
Simplified96.4%
Final simplification96.4%
(FPCore (x y z t) :precision binary64 (/ x (* y t)))
double code(double x, double y, double z, double t) {
return x / (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 * t)
end function
public static double code(double x, double y, double z, double t) {
return x / (y * t);
}
def code(x, y, z, t): return x / (y * t)
function code(x, y, z, t) return Float64(x / Float64(y * t)) end
function tmp = code(x, y, z, t) tmp = x / (y * t); end
code[x_, y_, z_, t_] := N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y \cdot t}
\end{array}
Initial program 87.7%
Taylor expanded in z around 0 36.4%
Final simplification36.4%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* (- y z) (- t z)))) (if (< (/ x t_1) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if ((x / t_1) < 0.0) {
tmp = (x / (y - z)) / (t - z);
} else {
tmp = x * (1.0 / 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 = (y - z) * (t - z)
if ((x / t_1) < 0.0d0) then
tmp = (x / (y - z)) / (t - z)
else
tmp = x * (1.0d0 / t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if ((x / t_1) < 0.0) {
tmp = (x / (y - z)) / (t - z);
} else {
tmp = x * (1.0 / t_1);
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - z) * (t - z) tmp = 0 if (x / t_1) < 0.0: tmp = (x / (y - z)) / (t - z) else: tmp = x * (1.0 / t_1) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - z) * Float64(t - z)) tmp = 0.0 if (Float64(x / t_1) < 0.0) tmp = Float64(Float64(x / Float64(y - z)) / Float64(t - z)); else tmp = Float64(x * Float64(1.0 / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - z) * (t - z); tmp = 0.0; if ((x / t_1) < 0.0) tmp = (x / (y - z)) / (t - z); else tmp = x * (1.0 / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[Less[N[(x / t$95$1), $MachinePrecision], 0.0], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
\mathbf{if}\;\frac{x}{t_1} < 0:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1}{t_1}\\
\end{array}
\end{array}
herbie shell --seed 2023195
(FPCore (x y z t)
:name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
:precision binary64
:herbie-target
(if (< (/ x (* (- y z) (- t z))) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 (* (- y z) (- t z)))))
(/ x (* (- y z) (- t z))))