
(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 15 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 (/ (/ x (- t z)) (- y z)))
double code(double x, double y, double z, double t) {
return (x / (t - z)) / (y - 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 / (t - z)) / (y - z)
end function
public static double code(double x, double y, double z, double t) {
return (x / (t - z)) / (y - z);
}
def code(x, y, z, t): return (x / (t - z)) / (y - z)
function code(x, y, z, t) return Float64(Float64(x / Float64(t - z)) / Float64(y - z)) end
function tmp = code(x, y, z, t) tmp = (x / (t - z)) / (y - z); end
code[x_, y_, z_, t_] := N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{x}{t - z}}{y - z}
\end{array}
Initial program 87.2%
associate-/l/98.7%
Simplified98.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- t z) (- y z))))
(if (<= t_1 (- INFINITY))
(/ (/ x (- y z)) t)
(if (<= t_1 2e+279) (/ x t_1) (/ (/ x (- z t)) z)))))
double code(double x, double y, double z, double t) {
double t_1 = (t - z) * (y - z);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (x / (y - z)) / t;
} else if (t_1 <= 2e+279) {
tmp = x / t_1;
} else {
tmp = (x / (z - t)) / z;
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double t_1 = (t - z) * (y - z);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = (x / (y - z)) / t;
} else if (t_1 <= 2e+279) {
tmp = x / t_1;
} else {
tmp = (x / (z - t)) / z;
}
return tmp;
}
def code(x, y, z, t): t_1 = (t - z) * (y - z) tmp = 0 if t_1 <= -math.inf: tmp = (x / (y - z)) / t elif t_1 <= 2e+279: tmp = x / t_1 else: tmp = (x / (z - t)) / z return tmp
function code(x, y, z, t) t_1 = Float64(Float64(t - z) * Float64(y - z)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(x / Float64(y - z)) / t); elseif (t_1 <= 2e+279) tmp = Float64(x / t_1); else tmp = Float64(Float64(x / Float64(z - t)) / z); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (t - z) * (y - z); tmp = 0.0; if (t_1 <= -Inf) tmp = (x / (y - z)) / t; elseif (t_1 <= 2e+279) tmp = x / t_1; else tmp = (x / (z - t)) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t - z), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t$95$1, 2e+279], N[(x / t$95$1), $MachinePrecision], N[(N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t - z\right) \cdot \left(y - z\right)\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+279}:\\
\;\;\;\;\frac{x}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{z - t}}{z}\\
\end{array}
\end{array}
if (*.f64 (-.f64 y z) (-.f64 t z)) < -inf.0Initial program 66.9%
Taylor expanded in x around 0 66.9%
associate-/l/100.0%
Simplified100.0%
Taylor expanded in t around inf 86.9%
if -inf.0 < (*.f64 (-.f64 y z) (-.f64 t z)) < 2.00000000000000012e279Initial program 99.1%
if 2.00000000000000012e279 < (*.f64 (-.f64 y z) (-.f64 t z)) Initial program 72.7%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in y around 0 88.0%
neg-mul-188.0%
Simplified88.0%
Final simplification94.2%
(FPCore (x y z t)
:precision binary64
(if (<= z -7.8e+164)
(/ (/ x z) z)
(if (<= z -1.6e-32)
(/ x (* z (- z y)))
(if (<= z 8.2e+26)
(/ (/ x t) (- y z))
(if (<= z 9.4e+157) (/ x (* z (- z t))) (/ (* x (/ 1.0 z)) z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -7.8e+164) {
tmp = (x / z) / z;
} else if (z <= -1.6e-32) {
tmp = x / (z * (z - y));
} else if (z <= 8.2e+26) {
tmp = (x / t) / (y - z);
} else if (z <= 9.4e+157) {
tmp = x / (z * (z - t));
} else {
tmp = (x * (1.0 / 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 <= (-7.8d+164)) then
tmp = (x / z) / z
else if (z <= (-1.6d-32)) then
tmp = x / (z * (z - y))
else if (z <= 8.2d+26) then
tmp = (x / t) / (y - z)
else if (z <= 9.4d+157) then
tmp = x / (z * (z - t))
else
tmp = (x * (1.0d0 / z)) / z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -7.8e+164) {
tmp = (x / z) / z;
} else if (z <= -1.6e-32) {
tmp = x / (z * (z - y));
} else if (z <= 8.2e+26) {
tmp = (x / t) / (y - z);
} else if (z <= 9.4e+157) {
tmp = x / (z * (z - t));
} else {
tmp = (x * (1.0 / z)) / z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -7.8e+164: tmp = (x / z) / z elif z <= -1.6e-32: tmp = x / (z * (z - y)) elif z <= 8.2e+26: tmp = (x / t) / (y - z) elif z <= 9.4e+157: tmp = x / (z * (z - t)) else: tmp = (x * (1.0 / z)) / z return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -7.8e+164) tmp = Float64(Float64(x / z) / z); elseif (z <= -1.6e-32) tmp = Float64(x / Float64(z * Float64(z - y))); elseif (z <= 8.2e+26) tmp = Float64(Float64(x / t) / Float64(y - z)); elseif (z <= 9.4e+157) tmp = Float64(x / Float64(z * Float64(z - t))); else tmp = Float64(Float64(x * Float64(1.0 / z)) / z); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -7.8e+164) tmp = (x / z) / z; elseif (z <= -1.6e-32) tmp = x / (z * (z - y)); elseif (z <= 8.2e+26) tmp = (x / t) / (y - z); elseif (z <= 9.4e+157) tmp = x / (z * (z - t)); else tmp = (x * (1.0 / z)) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -7.8e+164], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -1.6e-32], N[(x / N[(z * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.2e+26], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.4e+157], N[(x / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(1.0 / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.8 \cdot 10^{+164}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{-32}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{+26}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\mathbf{elif}\;z \leq 9.4 \cdot 10^{+157}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \frac{1}{z}}{z}\\
\end{array}
\end{array}
if z < -7.79999999999999971e164Initial program 71.4%
Taylor expanded in t around 0 71.4%
mul-1-neg71.4%
associate-/r*98.1%
distribute-neg-frac298.1%
neg-sub098.1%
sub-neg98.1%
+-commutative98.1%
associate--r+98.1%
neg-sub098.1%
remove-double-neg98.1%
Simplified98.1%
Taylor expanded in z around inf 95.4%
if -7.79999999999999971e164 < z < -1.6000000000000001e-32Initial program 94.8%
Taylor expanded in t around 0 70.5%
mul-1-neg70.5%
distribute-rgt-neg-in70.5%
neg-sub070.5%
sub-neg70.5%
+-commutative70.5%
associate--r+70.5%
neg-sub070.5%
remove-double-neg70.5%
Simplified70.5%
if -1.6000000000000001e-32 < z < 8.19999999999999967e26Initial program 90.7%
associate-/l/97.5%
Simplified97.5%
Taylor expanded in t around inf 76.0%
if 8.19999999999999967e26 < z < 9.40000000000000061e157Initial program 96.0%
Taylor expanded in y around 0 76.6%
mul-1-neg76.6%
distribute-rgt-neg-in76.6%
sub-neg76.6%
+-commutative76.6%
distribute-neg-in76.6%
remove-double-neg76.6%
unsub-neg76.6%
Simplified76.6%
if 9.40000000000000061e157 < z Initial program 77.1%
Taylor expanded in t around 0 77.1%
mul-1-neg77.1%
associate-/r*99.8%
distribute-neg-frac299.8%
neg-sub099.8%
sub-neg99.8%
+-commutative99.8%
associate--r+99.8%
neg-sub099.8%
remove-double-neg99.8%
Simplified99.8%
Taylor expanded in z around inf 97.7%
div-inv97.8%
Applied egg-rr97.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (* z (- z t)))))
(if (<= z -8e+164)
(/ (/ x z) z)
(if (<= z -4.8e-58)
t_1
(if (<= z 1.2e-20)
(/ (/ x t) y)
(if (<= z 3.2e+157) t_1 (/ (* x (/ 1.0 z)) z)))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (z * (z - t));
double tmp;
if (z <= -8e+164) {
tmp = (x / z) / z;
} else if (z <= -4.8e-58) {
tmp = t_1;
} else if (z <= 1.2e-20) {
tmp = (x / t) / y;
} else if (z <= 3.2e+157) {
tmp = t_1;
} else {
tmp = (x * (1.0 / 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 / (z * (z - t))
if (z <= (-8d+164)) then
tmp = (x / z) / z
else if (z <= (-4.8d-58)) then
tmp = t_1
else if (z <= 1.2d-20) then
tmp = (x / t) / y
else if (z <= 3.2d+157) then
tmp = t_1
else
tmp = (x * (1.0d0 / z)) / z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x / (z * (z - t));
double tmp;
if (z <= -8e+164) {
tmp = (x / z) / z;
} else if (z <= -4.8e-58) {
tmp = t_1;
} else if (z <= 1.2e-20) {
tmp = (x / t) / y;
} else if (z <= 3.2e+157) {
tmp = t_1;
} else {
tmp = (x * (1.0 / z)) / z;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (z * (z - t)) tmp = 0 if z <= -8e+164: tmp = (x / z) / z elif z <= -4.8e-58: tmp = t_1 elif z <= 1.2e-20: tmp = (x / t) / y elif z <= 3.2e+157: tmp = t_1 else: tmp = (x * (1.0 / z)) / z return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(z * Float64(z - t))) tmp = 0.0 if (z <= -8e+164) tmp = Float64(Float64(x / z) / z); elseif (z <= -4.8e-58) tmp = t_1; elseif (z <= 1.2e-20) tmp = Float64(Float64(x / t) / y); elseif (z <= 3.2e+157) tmp = t_1; else tmp = Float64(Float64(x * Float64(1.0 / z)) / z); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (z * (z - t)); tmp = 0.0; if (z <= -8e+164) tmp = (x / z) / z; elseif (z <= -4.8e-58) tmp = t_1; elseif (z <= 1.2e-20) tmp = (x / t) / y; elseif (z <= 3.2e+157) tmp = t_1; else tmp = (x * (1.0 / z)) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8e+164], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -4.8e-58], t$95$1, If[LessEqual[z, 1.2e-20], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 3.2e+157], t$95$1, N[(N[(x * N[(1.0 / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{z \cdot \left(z - t\right)}\\
\mathbf{if}\;z \leq -8 \cdot 10^{+164}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{elif}\;z \leq -4.8 \cdot 10^{-58}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-20}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+157}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \frac{1}{z}}{z}\\
\end{array}
\end{array}
if z < -8e164Initial program 71.4%
Taylor expanded in t around 0 71.4%
mul-1-neg71.4%
associate-/r*98.1%
distribute-neg-frac298.1%
neg-sub098.1%
sub-neg98.1%
+-commutative98.1%
associate--r+98.1%
neg-sub098.1%
remove-double-neg98.1%
Simplified98.1%
Taylor expanded in z around inf 95.4%
if -8e164 < z < -4.8000000000000001e-58 or 1.19999999999999996e-20 < z < 3.1999999999999999e157Initial program 95.2%
Taylor expanded in y around 0 73.8%
mul-1-neg73.8%
distribute-rgt-neg-in73.8%
sub-neg73.8%
+-commutative73.8%
distribute-neg-in73.8%
remove-double-neg73.8%
unsub-neg73.8%
Simplified73.8%
if -4.8000000000000001e-58 < z < 1.19999999999999996e-20Initial program 90.0%
associate-/l/97.2%
Simplified97.2%
Taylor expanded in y around inf 81.0%
Taylor expanded in t around inf 67.6%
if 3.1999999999999999e157 < z Initial program 77.1%
Taylor expanded in t around 0 77.1%
mul-1-neg77.1%
associate-/r*99.8%
distribute-neg-frac299.8%
neg-sub099.8%
sub-neg99.8%
+-commutative99.8%
associate--r+99.8%
neg-sub099.8%
remove-double-neg99.8%
Simplified99.8%
Taylor expanded in z around inf 97.7%
div-inv97.8%
Applied egg-rr97.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x z) z)) (t_2 (/ x (* z (- z t)))))
(if (<= z -1.15e+165)
t_1
(if (<= z -5e-58)
t_2
(if (<= z 1.55e-24) (/ (/ x t) y) (if (<= z 3.2e+157) t_2 t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = (x / z) / z;
double t_2 = x / (z * (z - t));
double tmp;
if (z <= -1.15e+165) {
tmp = t_1;
} else if (z <= -5e-58) {
tmp = t_2;
} else if (z <= 1.55e-24) {
tmp = (x / t) / y;
} else if (z <= 3.2e+157) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = (x / z) / z
t_2 = x / (z * (z - t))
if (z <= (-1.15d+165)) then
tmp = t_1
else if (z <= (-5d-58)) then
tmp = t_2
else if (z <= 1.55d-24) then
tmp = (x / t) / y
else if (z <= 3.2d+157) then
tmp = t_2
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 / z) / z;
double t_2 = x / (z * (z - t));
double tmp;
if (z <= -1.15e+165) {
tmp = t_1;
} else if (z <= -5e-58) {
tmp = t_2;
} else if (z <= 1.55e-24) {
tmp = (x / t) / y;
} else if (z <= 3.2e+157) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / z) / z t_2 = x / (z * (z - t)) tmp = 0 if z <= -1.15e+165: tmp = t_1 elif z <= -5e-58: tmp = t_2 elif z <= 1.55e-24: tmp = (x / t) / y elif z <= 3.2e+157: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / z) / z) t_2 = Float64(x / Float64(z * Float64(z - t))) tmp = 0.0 if (z <= -1.15e+165) tmp = t_1; elseif (z <= -5e-58) tmp = t_2; elseif (z <= 1.55e-24) tmp = Float64(Float64(x / t) / y); elseif (z <= 3.2e+157) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / z) / z; t_2 = x / (z * (z - t)); tmp = 0.0; if (z <= -1.15e+165) tmp = t_1; elseif (z <= -5e-58) tmp = t_2; elseif (z <= 1.55e-24) tmp = (x / t) / y; elseif (z <= 3.2e+157) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.15e+165], t$95$1, If[LessEqual[z, -5e-58], t$95$2, If[LessEqual[z, 1.55e-24], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 3.2e+157], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z}\\
t_2 := \frac{x}{z \cdot \left(z - t\right)}\\
\mathbf{if}\;z \leq -1.15 \cdot 10^{+165}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -5 \cdot 10^{-58}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-24}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+157}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.15000000000000008e165 or 3.1999999999999999e157 < z Initial program 74.2%
Taylor expanded in t around 0 74.2%
mul-1-neg74.2%
associate-/r*98.9%
distribute-neg-frac298.9%
neg-sub098.9%
sub-neg98.9%
+-commutative98.9%
associate--r+98.9%
neg-sub098.9%
remove-double-neg98.9%
Simplified98.9%
Taylor expanded in z around inf 96.6%
if -1.15000000000000008e165 < z < -4.99999999999999977e-58 or 1.55e-24 < z < 3.1999999999999999e157Initial program 95.2%
Taylor expanded in y around 0 73.8%
mul-1-neg73.8%
distribute-rgt-neg-in73.8%
sub-neg73.8%
+-commutative73.8%
distribute-neg-in73.8%
remove-double-neg73.8%
unsub-neg73.8%
Simplified73.8%
if -4.99999999999999977e-58 < z < 1.55e-24Initial program 90.0%
associate-/l/97.2%
Simplified97.2%
Taylor expanded in y around inf 81.0%
Taylor expanded in t around inf 67.6%
(FPCore (x y z t) :precision binary64 (if (or (<= z -3.8e-32) (not (<= z 6.5e+26))) (/ (/ x z) (- z t)) (/ (/ x t) (- y z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.8e-32) || !(z <= 6.5e+26)) {
tmp = (x / z) / (z - t);
} 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 ((z <= (-3.8d-32)) .or. (.not. (z <= 6.5d+26))) then
tmp = (x / z) / (z - t)
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 ((z <= -3.8e-32) || !(z <= 6.5e+26)) {
tmp = (x / z) / (z - t);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -3.8e-32) or not (z <= 6.5e+26): tmp = (x / z) / (z - t) else: tmp = (x / t) / (y - z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -3.8e-32) || !(z <= 6.5e+26)) tmp = Float64(Float64(x / z) / Float64(z - t)); 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 ((z <= -3.8e-32) || ~((z <= 6.5e+26))) tmp = (x / z) / (z - t); else tmp = (x / t) / (y - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -3.8e-32], N[Not[LessEqual[z, 6.5e+26]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{-32} \lor \neg \left(z \leq 6.5 \cdot 10^{+26}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if z < -3.80000000000000008e-32 or 6.50000000000000022e26 < z Initial program 84.0%
Taylor expanded in y around 0 76.6%
mul-1-neg76.6%
associate-/r*89.7%
distribute-neg-frac289.7%
sub-neg89.7%
+-commutative89.7%
distribute-neg-in89.7%
remove-double-neg89.7%
unsub-neg89.7%
Simplified89.7%
if -3.80000000000000008e-32 < z < 6.50000000000000022e26Initial program 90.7%
associate-/l/97.5%
Simplified97.5%
Taylor expanded in t around inf 76.0%
Final simplification83.1%
(FPCore (x y z t) :precision binary64 (if (<= z -2.7e-32) (/ (/ x z) (- z y)) (if (<= z 1.35e+31) (/ (/ x (- t z)) y) (/ (/ x (- z t)) z))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.7e-32) {
tmp = (x / z) / (z - y);
} else if (z <= 1.35e+31) {
tmp = (x / (t - z)) / y;
} else {
tmp = (x / (z - 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 (z <= (-2.7d-32)) then
tmp = (x / z) / (z - y)
else if (z <= 1.35d+31) then
tmp = (x / (t - z)) / y
else
tmp = (x / (z - t)) / z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.7e-32) {
tmp = (x / z) / (z - y);
} else if (z <= 1.35e+31) {
tmp = (x / (t - z)) / y;
} else {
tmp = (x / (z - t)) / z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -2.7e-32: tmp = (x / z) / (z - y) elif z <= 1.35e+31: tmp = (x / (t - z)) / y else: tmp = (x / (z - t)) / z return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -2.7e-32) tmp = Float64(Float64(x / z) / Float64(z - y)); elseif (z <= 1.35e+31) tmp = Float64(Float64(x / Float64(t - z)) / y); else tmp = Float64(Float64(x / Float64(z - t)) / z); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -2.7e-32) tmp = (x / z) / (z - y); elseif (z <= 1.35e+31) tmp = (x / (t - z)) / y; else tmp = (x / (z - t)) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.7e-32], N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e+31], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{-32}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - y}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+31}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{z - t}}{z}\\
\end{array}
\end{array}
if z < -2.69999999999999981e-32Initial program 83.2%
Taylor expanded in t around 0 70.9%
mul-1-neg70.9%
associate-/r*84.1%
distribute-neg-frac284.1%
neg-sub084.1%
sub-neg84.1%
+-commutative84.1%
associate--r+84.1%
neg-sub084.1%
remove-double-neg84.1%
Simplified84.1%
if -2.69999999999999981e-32 < z < 1.34999999999999993e31Initial program 90.7%
associate-/l/97.5%
Simplified97.5%
Taylor expanded in y around inf 79.9%
if 1.34999999999999993e31 < z Initial program 85.0%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in y around 0 89.0%
neg-mul-189.0%
Simplified89.0%
Final simplification83.2%
(FPCore (x y z t) :precision binary64 (if (<= z -3.8e-32) (/ (/ x z) (- z y)) (if (<= z 7.4e+26) (/ (/ x (- t z)) y) (/ (/ x z) (- z t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.8e-32) {
tmp = (x / z) / (z - y);
} else if (z <= 7.4e+26) {
tmp = (x / (t - z)) / y;
} else {
tmp = (x / z) / (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 (z <= (-3.8d-32)) then
tmp = (x / z) / (z - y)
else if (z <= 7.4d+26) then
tmp = (x / (t - z)) / y
else
tmp = (x / z) / (z - t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.8e-32) {
tmp = (x / z) / (z - y);
} else if (z <= 7.4e+26) {
tmp = (x / (t - z)) / y;
} else {
tmp = (x / z) / (z - t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -3.8e-32: tmp = (x / z) / (z - y) elif z <= 7.4e+26: tmp = (x / (t - z)) / y else: tmp = (x / z) / (z - t) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -3.8e-32) tmp = Float64(Float64(x / z) / Float64(z - y)); elseif (z <= 7.4e+26) tmp = Float64(Float64(x / Float64(t - z)) / y); else tmp = Float64(Float64(x / z) / Float64(z - t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -3.8e-32) tmp = (x / z) / (z - y); elseif (z <= 7.4e+26) tmp = (x / (t - z)) / y; else tmp = (x / z) / (z - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -3.8e-32], N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.4e+26], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{-32}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - y}\\
\mathbf{elif}\;z \leq 7.4 \cdot 10^{+26}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\
\end{array}
\end{array}
if z < -3.80000000000000008e-32Initial program 83.2%
Taylor expanded in t around 0 70.9%
mul-1-neg70.9%
associate-/r*84.1%
distribute-neg-frac284.1%
neg-sub084.1%
sub-neg84.1%
+-commutative84.1%
associate--r+84.1%
neg-sub084.1%
remove-double-neg84.1%
Simplified84.1%
if -3.80000000000000008e-32 < z < 7.39999999999999977e26Initial program 90.7%
associate-/l/97.5%
Simplified97.5%
Taylor expanded in y around inf 79.9%
if 7.39999999999999977e26 < z Initial program 85.0%
Taylor expanded in y around 0 76.9%
mul-1-neg76.9%
associate-/r*89.0%
distribute-neg-frac289.0%
sub-neg89.0%
+-commutative89.0%
distribute-neg-in89.0%
remove-double-neg89.0%
unsub-neg89.0%
Simplified89.0%
(FPCore (x y z t) :precision binary64 (if (<= z -8.8e-33) (/ (/ x z) (- z y)) (if (<= z 2.4e+27) (/ (/ x t) (- y z)) (/ (/ x z) (- z t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -8.8e-33) {
tmp = (x / z) / (z - y);
} else if (z <= 2.4e+27) {
tmp = (x / t) / (y - z);
} else {
tmp = (x / z) / (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 (z <= (-8.8d-33)) then
tmp = (x / z) / (z - y)
else if (z <= 2.4d+27) then
tmp = (x / t) / (y - z)
else
tmp = (x / z) / (z - t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -8.8e-33) {
tmp = (x / z) / (z - y);
} else if (z <= 2.4e+27) {
tmp = (x / t) / (y - z);
} else {
tmp = (x / z) / (z - t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -8.8e-33: tmp = (x / z) / (z - y) elif z <= 2.4e+27: tmp = (x / t) / (y - z) else: tmp = (x / z) / (z - t) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -8.8e-33) tmp = Float64(Float64(x / z) / Float64(z - y)); elseif (z <= 2.4e+27) tmp = Float64(Float64(x / t) / Float64(y - z)); else tmp = Float64(Float64(x / z) / Float64(z - t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -8.8e-33) tmp = (x / z) / (z - y); elseif (z <= 2.4e+27) tmp = (x / t) / (y - z); else tmp = (x / z) / (z - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -8.8e-33], N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.4e+27], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.8 \cdot 10^{-33}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - y}\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{+27}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\
\end{array}
\end{array}
if z < -8.80000000000000022e-33Initial program 83.2%
Taylor expanded in t around 0 70.9%
mul-1-neg70.9%
associate-/r*84.1%
distribute-neg-frac284.1%
neg-sub084.1%
sub-neg84.1%
+-commutative84.1%
associate--r+84.1%
neg-sub084.1%
remove-double-neg84.1%
Simplified84.1%
if -8.80000000000000022e-33 < z < 2.39999999999999998e27Initial program 90.7%
associate-/l/97.5%
Simplified97.5%
Taylor expanded in t around inf 76.0%
if 2.39999999999999998e27 < z Initial program 85.0%
Taylor expanded in y around 0 76.9%
mul-1-neg76.9%
associate-/r*89.0%
distribute-neg-frac289.0%
sub-neg89.0%
+-commutative89.0%
distribute-neg-in89.0%
remove-double-neg89.0%
unsub-neg89.0%
Simplified89.0%
(FPCore (x y z t) :precision binary64 (if (<= t -7.5e-66) (/ (/ x y) (- t z)) (if (<= t 160.0) (/ x (* z (- z y))) (/ (/ x t) (- y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -7.5e-66) {
tmp = (x / y) / (t - z);
} else if (t <= 160.0) {
tmp = x / (z * (z - y));
} 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 <= (-7.5d-66)) then
tmp = (x / y) / (t - z)
else if (t <= 160.0d0) then
tmp = x / (z * (z - y))
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 <= -7.5e-66) {
tmp = (x / y) / (t - z);
} else if (t <= 160.0) {
tmp = x / (z * (z - y));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -7.5e-66: tmp = (x / y) / (t - z) elif t <= 160.0: tmp = x / (z * (z - y)) else: tmp = (x / t) / (y - z) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -7.5e-66) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (t <= 160.0) tmp = Float64(x / Float64(z * Float64(z - y))); 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 <= -7.5e-66) tmp = (x / y) / (t - z); elseif (t <= 160.0) tmp = x / (z * (z - y)); else tmp = (x / t) / (y - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -7.5e-66], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 160.0], N[(x / N[(z * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.5 \cdot 10^{-66}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;t \leq 160:\\
\;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -7.49999999999999995e-66Initial program 82.9%
Taylor expanded in y around inf 48.7%
associate-/r*57.2%
Simplified57.2%
if -7.49999999999999995e-66 < t < 160Initial program 91.8%
Taylor expanded in t around 0 78.4%
mul-1-neg78.4%
distribute-rgt-neg-in78.4%
neg-sub078.4%
sub-neg78.4%
+-commutative78.4%
associate--r+78.4%
neg-sub078.4%
remove-double-neg78.4%
Simplified78.4%
if 160 < t Initial program 84.0%
associate-/l/99.7%
Simplified99.7%
Taylor expanded in t around inf 83.9%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.2e+73) (not (<= z 6.6e+28))) (/ (/ x z) z) (/ (/ x t) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.2e+73) || !(z <= 6.6e+28)) {
tmp = (x / z) / z;
} else {
tmp = (x / t) / 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 ((z <= (-1.2d+73)) .or. (.not. (z <= 6.6d+28))) then
tmp = (x / z) / z
else
tmp = (x / t) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.2e+73) || !(z <= 6.6e+28)) {
tmp = (x / z) / z;
} else {
tmp = (x / t) / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.2e+73) or not (z <= 6.6e+28): tmp = (x / z) / z else: tmp = (x / t) / y return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.2e+73) || !(z <= 6.6e+28)) tmp = Float64(Float64(x / z) / z); else tmp = Float64(Float64(x / t) / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.2e+73) || ~((z <= 6.6e+28))) tmp = (x / z) / z; else tmp = (x / t) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.2e+73], N[Not[LessEqual[z, 6.6e+28]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{+73} \lor \neg \left(z \leq 6.6 \cdot 10^{+28}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -1.20000000000000001e73 or 6.6e28 < z Initial program 81.6%
Taylor expanded in t around 0 79.9%
mul-1-neg79.9%
associate-/r*94.3%
distribute-neg-frac294.3%
neg-sub094.3%
sub-neg94.3%
+-commutative94.3%
associate--r+94.3%
neg-sub094.3%
remove-double-neg94.3%
Simplified94.3%
Taylor expanded in z around inf 87.0%
if -1.20000000000000001e73 < z < 6.6e28Initial program 91.9%
associate-/l/97.8%
Simplified97.8%
Taylor expanded in y around inf 74.9%
Taylor expanded in t around inf 60.0%
Final simplification72.1%
(FPCore (x y z t) :precision binary64 (if (or (<= z -6.5e+86) (not (<= z 9.5e+122))) (/ (/ x z) y) (/ (/ x t) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -6.5e+86) || !(z <= 9.5e+122)) {
tmp = (x / z) / y;
} else {
tmp = (x / t) / 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 ((z <= (-6.5d+86)) .or. (.not. (z <= 9.5d+122))) then
tmp = (x / z) / y
else
tmp = (x / t) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -6.5e+86) || !(z <= 9.5e+122)) {
tmp = (x / z) / y;
} else {
tmp = (x / t) / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -6.5e+86) or not (z <= 9.5e+122): tmp = (x / z) / y else: tmp = (x / t) / y return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -6.5e+86) || !(z <= 9.5e+122)) tmp = Float64(Float64(x / z) / y); else tmp = Float64(Float64(x / t) / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -6.5e+86) || ~((z <= 9.5e+122))) tmp = (x / z) / y; else tmp = (x / t) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -6.5e+86], N[Not[LessEqual[z, 9.5e+122]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+86} \lor \neg \left(z \leq 9.5 \cdot 10^{+122}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -6.49999999999999996e86 or 9.49999999999999986e122 < z Initial program 79.4%
Taylor expanded in t around 0 77.3%
mul-1-neg77.3%
associate-/r*96.0%
distribute-neg-frac296.0%
neg-sub096.0%
sub-neg96.0%
+-commutative96.0%
associate--r+96.0%
neg-sub096.0%
remove-double-neg96.0%
Simplified96.0%
Taylor expanded in z around 0 47.3%
neg-mul-147.3%
Simplified47.3%
div-inv47.3%
add-sqr-sqrt21.7%
sqrt-unprod40.4%
sqr-neg40.4%
sqrt-unprod25.7%
add-sqr-sqrt46.1%
Applied egg-rr46.1%
associate-*r/46.1%
*-rgt-identity46.1%
Simplified46.1%
if -6.49999999999999996e86 < z < 9.49999999999999986e122Initial program 91.4%
associate-/l/98.1%
Simplified98.1%
Taylor expanded in y around inf 69.6%
Taylor expanded in t around inf 53.4%
Final simplification50.9%
(FPCore (x y z t) :precision binary64 (if (or (<= z -7e+171) (not (<= z 9e+122))) (/ x (* z y)) (/ (/ x t) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -7e+171) || !(z <= 9e+122)) {
tmp = x / (z * y);
} else {
tmp = (x / t) / 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 ((z <= (-7d+171)) .or. (.not. (z <= 9d+122))) then
tmp = x / (z * y)
else
tmp = (x / t) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -7e+171) || !(z <= 9e+122)) {
tmp = x / (z * y);
} else {
tmp = (x / t) / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -7e+171) or not (z <= 9e+122): tmp = x / (z * y) else: tmp = (x / t) / y return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -7e+171) || !(z <= 9e+122)) tmp = Float64(x / Float64(z * y)); else tmp = Float64(Float64(x / t) / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -7e+171) || ~((z <= 9e+122))) tmp = x / (z * y); else tmp = (x / t) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -7e+171], N[Not[LessEqual[z, 9e+122]], $MachinePrecision]], N[(x / N[(z * y), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{+171} \lor \neg \left(z \leq 9 \cdot 10^{+122}\right):\\
\;\;\;\;\frac{x}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -6.9999999999999999e171 or 8.99999999999999995e122 < z Initial program 76.2%
Taylor expanded in t around 0 76.2%
mul-1-neg76.2%
associate-/r*97.7%
distribute-neg-frac297.7%
neg-sub097.7%
sub-neg97.7%
+-commutative97.7%
associate--r+97.7%
neg-sub097.7%
remove-double-neg97.7%
Simplified97.7%
Taylor expanded in z around 0 48.8%
neg-mul-148.8%
Simplified48.8%
*-un-lft-identity48.8%
associate-/l/42.5%
add-sqr-sqrt19.3%
sqrt-unprod40.9%
sqr-neg40.9%
sqrt-unprod23.3%
add-sqr-sqrt42.6%
Applied egg-rr42.6%
*-lft-identity42.6%
*-commutative42.6%
Simplified42.6%
if -6.9999999999999999e171 < z < 8.99999999999999995e122Initial program 91.6%
associate-/l/98.2%
Simplified98.2%
Taylor expanded in y around inf 67.6%
Taylor expanded in t around inf 50.8%
Final simplification48.4%
(FPCore (x y z t) :precision binary64 (if (or (<= z -4000000000000.0) (not (<= z 1.12e-12))) (/ x (* z y)) (/ x (* t y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4000000000000.0) || !(z <= 1.12e-12)) {
tmp = x / (z * y);
} else {
tmp = x / (t * 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 ((z <= (-4000000000000.0d0)) .or. (.not. (z <= 1.12d-12))) then
tmp = x / (z * y)
else
tmp = x / (t * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4000000000000.0) || !(z <= 1.12e-12)) {
tmp = x / (z * y);
} else {
tmp = x / (t * y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -4000000000000.0) or not (z <= 1.12e-12): tmp = x / (z * y) else: tmp = x / (t * y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -4000000000000.0) || !(z <= 1.12e-12)) tmp = Float64(x / Float64(z * y)); else tmp = Float64(x / Float64(t * y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -4000000000000.0) || ~((z <= 1.12e-12))) tmp = x / (z * y); else tmp = x / (t * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -4000000000000.0], N[Not[LessEqual[z, 1.12e-12]], $MachinePrecision]], N[(x / N[(z * y), $MachinePrecision]), $MachinePrecision], N[(x / N[(t * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4000000000000 \lor \neg \left(z \leq 1.12 \cdot 10^{-12}\right):\\
\;\;\;\;\frac{x}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t \cdot y}\\
\end{array}
\end{array}
if z < -4e12 or 1.1200000000000001e-12 < z Initial program 83.8%
Taylor expanded in t around 0 76.1%
mul-1-neg76.1%
associate-/r*88.3%
distribute-neg-frac288.3%
neg-sub088.3%
sub-neg88.3%
+-commutative88.3%
associate--r+88.3%
neg-sub088.3%
remove-double-neg88.3%
Simplified88.3%
Taylor expanded in z around 0 43.8%
neg-mul-143.8%
Simplified43.8%
*-un-lft-identity43.8%
associate-/l/37.7%
add-sqr-sqrt15.5%
sqrt-unprod32.3%
sqr-neg32.3%
sqrt-unprod19.1%
add-sqr-sqrt32.4%
Applied egg-rr32.4%
*-lft-identity32.4%
*-commutative32.4%
Simplified32.4%
if -4e12 < z < 1.1200000000000001e-12Initial program 91.1%
Taylor expanded in z around 0 55.2%
Final simplification43.1%
(FPCore (x y z t) :precision binary64 (/ x (* t y)))
double code(double x, double y, double z, double t) {
return x / (t * 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 = x / (t * y)
end function
public static double code(double x, double y, double z, double t) {
return x / (t * y);
}
def code(x, y, z, t): return x / (t * y)
function code(x, y, z, t) return Float64(x / Float64(t * y)) end
function tmp = code(x, y, z, t) tmp = x / (t * y); end
code[x_, y_, z_, t_] := N[(x / N[(t * y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{t \cdot y}
\end{array}
Initial program 87.2%
Taylor expanded in z around 0 33.9%
(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 2024170
(FPCore (x y z t)
:name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
:precision binary64
:alt
(! :herbie-platform default (if (< (/ x (* (- y z) (- t z))) 0) (/ (/ x (- y z)) (- t z)) (* x (/ 1 (* (- y z) (- t z))))))
(/ x (* (- y z) (- t z))))