
(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 19 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}
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (let* ((t_1 (/ x (* (- y z) (- t z))))) (if (<= t_1 0.0) (/ (/ x (- y z)) (- t z)) t_1)))
assert(y < t);
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 / (y - z)) / (t - z);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
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 / (y - z)) / (t - z)
else
tmp = t_1
end if
code = tmp
end function
assert y < t;
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 / (y - z)) / (t - z);
} else {
tmp = t_1;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = x / ((y - z) * (t - z)) tmp = 0 if t_1 <= 0.0: tmp = (x / (y - z)) / (t - z) else: tmp = t_1 return tmp
y, t = sort([y, t]) 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(y - z)) / Float64(t - z)); else tmp = t_1; end return tmp end
y, t = num2cell(sort([y, t])){:}
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 / (y - z)) / (t - z);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
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[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], t$95$1]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\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}{y - z}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z))) < -0.0Initial program 85.4%
associate-/r*99.3%
Simplified99.3%
if -0.0 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z))) Initial program 97.2%
Final simplification98.7%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= t -2.5e-280)
(/ (/ x y) (- t z))
(if (<= t 4.3e-94)
(/ (/ x z) z)
(if (<= t 1.55e-20)
(/ (/ x (- t z)) y)
(if (<= t 0.21) (/ (- x) (* z (- t z))) (/ (/ x t) (- y z)))))))assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2.5e-280) {
tmp = (x / y) / (t - z);
} else if (t <= 4.3e-94) {
tmp = (x / z) / z;
} else if (t <= 1.55e-20) {
tmp = (x / (t - z)) / y;
} else if (t <= 0.21) {
tmp = -x / (z * (t - z));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
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 <= (-2.5d-280)) then
tmp = (x / y) / (t - z)
else if (t <= 4.3d-94) then
tmp = (x / z) / z
else if (t <= 1.55d-20) then
tmp = (x / (t - z)) / y
else if (t <= 0.21d0) then
tmp = -x / (z * (t - z))
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2.5e-280) {
tmp = (x / y) / (t - z);
} else if (t <= 4.3e-94) {
tmp = (x / z) / z;
} else if (t <= 1.55e-20) {
tmp = (x / (t - z)) / y;
} else if (t <= 0.21) {
tmp = -x / (z * (t - z));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if t <= -2.5e-280: tmp = (x / y) / (t - z) elif t <= 4.3e-94: tmp = (x / z) / z elif t <= 1.55e-20: tmp = (x / (t - z)) / y elif t <= 0.21: tmp = -x / (z * (t - z)) else: tmp = (x / t) / (y - z) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -2.5e-280) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (t <= 4.3e-94) tmp = Float64(Float64(x / z) / z); elseif (t <= 1.55e-20) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (t <= 0.21) tmp = Float64(Float64(-x) / Float64(z * Float64(t - z))); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -2.5e-280)
tmp = (x / y) / (t - z);
elseif (t <= 4.3e-94)
tmp = (x / z) / z;
elseif (t <= 1.55e-20)
tmp = (x / (t - z)) / y;
elseif (t <= 0.21)
tmp = -x / (z * (t - z));
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -2.5e-280], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.3e-94], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t, 1.55e-20], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 0.21], N[((-x) / N[(z * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.5 \cdot 10^{-280}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;t \leq 4.3 \cdot 10^{-94}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{-20}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;t \leq 0.21:\\
\;\;\;\;\frac{-x}{z \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -2.50000000000000014e-280Initial program 90.6%
Taylor expanded in y around inf 60.1%
associate-/r*60.5%
Simplified60.5%
if -2.50000000000000014e-280 < t < 4.2999999999999998e-94Initial program 87.4%
Taylor expanded in z around inf 56.1%
unpow256.1%
Simplified56.1%
associate-/r*60.9%
div-inv60.9%
Applied egg-rr60.9%
associate-*r/60.9%
*-rgt-identity60.9%
Simplified60.9%
if 4.2999999999999998e-94 < t < 1.55e-20Initial program 99.9%
Taylor expanded in y around inf 83.5%
*-commutative83.5%
Simplified83.5%
*-un-lft-identity83.5%
*-commutative83.5%
times-frac88.4%
Applied egg-rr88.4%
associate-*l/88.3%
*-lft-identity88.3%
Simplified88.3%
if 1.55e-20 < t < 0.209999999999999992Initial program 100.0%
Taylor expanded in y around 0 100.0%
associate-*r/100.0%
neg-mul-1100.0%
Simplified100.0%
if 0.209999999999999992 < t Initial program 82.0%
Taylor expanded in t around inf 77.8%
associate-/r*87.0%
Simplified87.0%
Final simplification68.8%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= t -2.75e-154)
(/ (/ x y) (- t z))
(if (<= t 7.2e-63)
(/ (/ (- x) z) (- y z))
(if (<= t 1.22e-20)
(/ x (* y (- t z)))
(if (<= t 0.27) (/ (- x) (* z (- t z))) (/ (/ x t) (- y z)))))))assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2.75e-154) {
tmp = (x / y) / (t - z);
} else if (t <= 7.2e-63) {
tmp = (-x / z) / (y - z);
} else if (t <= 1.22e-20) {
tmp = x / (y * (t - z));
} else if (t <= 0.27) {
tmp = -x / (z * (t - z));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
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 <= (-2.75d-154)) then
tmp = (x / y) / (t - z)
else if (t <= 7.2d-63) then
tmp = (-x / z) / (y - z)
else if (t <= 1.22d-20) then
tmp = x / (y * (t - z))
else if (t <= 0.27d0) then
tmp = -x / (z * (t - z))
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2.75e-154) {
tmp = (x / y) / (t - z);
} else if (t <= 7.2e-63) {
tmp = (-x / z) / (y - z);
} else if (t <= 1.22e-20) {
tmp = x / (y * (t - z));
} else if (t <= 0.27) {
tmp = -x / (z * (t - z));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if t <= -2.75e-154: tmp = (x / y) / (t - z) elif t <= 7.2e-63: tmp = (-x / z) / (y - z) elif t <= 1.22e-20: tmp = x / (y * (t - z)) elif t <= 0.27: tmp = -x / (z * (t - z)) else: tmp = (x / t) / (y - z) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -2.75e-154) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (t <= 7.2e-63) tmp = Float64(Float64(Float64(-x) / z) / Float64(y - z)); elseif (t <= 1.22e-20) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (t <= 0.27) tmp = Float64(Float64(-x) / Float64(z * Float64(t - z))); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -2.75e-154)
tmp = (x / y) / (t - z);
elseif (t <= 7.2e-63)
tmp = (-x / z) / (y - z);
elseif (t <= 1.22e-20)
tmp = x / (y * (t - z));
elseif (t <= 0.27)
tmp = -x / (z * (t - z));
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -2.75e-154], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.2e-63], N[(N[((-x) / z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.22e-20], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.27], N[((-x) / N[(z * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.75 \cdot 10^{-154}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{-63}:\\
\;\;\;\;\frac{\frac{-x}{z}}{y - z}\\
\mathbf{elif}\;t \leq 1.22 \cdot 10^{-20}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;t \leq 0.27:\\
\;\;\;\;\frac{-x}{z \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -2.75000000000000001e-154Initial program 91.5%
Taylor expanded in y around inf 63.1%
associate-/r*65.0%
Simplified65.0%
if -2.75000000000000001e-154 < t < 7.20000000000000016e-63Initial program 88.0%
Taylor expanded in t around 0 72.4%
mul-1-neg72.4%
distribute-frac-neg72.4%
associate-/r*81.7%
Simplified81.7%
if 7.20000000000000016e-63 < t < 1.22000000000000003e-20Initial program 99.9%
Taylor expanded in y around inf 84.4%
*-commutative84.4%
Simplified84.4%
if 1.22000000000000003e-20 < t < 0.27000000000000002Initial program 100.0%
Taylor expanded in y around 0 100.0%
associate-*r/100.0%
neg-mul-1100.0%
Simplified100.0%
if 0.27000000000000002 < t Initial program 82.0%
Taylor expanded in t around inf 77.8%
associate-/r*87.0%
Simplified87.0%
Final simplification76.7%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (* (- y z) t))))
(if (<= z -5.0)
(* (/ x z) (/ 1.0 z))
(if (<= z 0.092)
t_1
(if (<= z 3.8e+28)
(/ (/ x z) z)
(if (<= z 1.55e+87) t_1 (/ 1.0 (* z (/ z x)))))))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = x / ((y - z) * t);
double tmp;
if (z <= -5.0) {
tmp = (x / z) * (1.0 / z);
} else if (z <= 0.092) {
tmp = t_1;
} else if (z <= 3.8e+28) {
tmp = (x / z) / z;
} else if (z <= 1.55e+87) {
tmp = t_1;
} else {
tmp = 1.0 / (z * (z / x));
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
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 <= (-5.0d0)) then
tmp = (x / z) * (1.0d0 / z)
else if (z <= 0.092d0) then
tmp = t_1
else if (z <= 3.8d+28) then
tmp = (x / z) / z
else if (z <= 1.55d+87) then
tmp = t_1
else
tmp = 1.0d0 / (z * (z / x))
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double t_1 = x / ((y - z) * t);
double tmp;
if (z <= -5.0) {
tmp = (x / z) * (1.0 / z);
} else if (z <= 0.092) {
tmp = t_1;
} else if (z <= 3.8e+28) {
tmp = (x / z) / z;
} else if (z <= 1.55e+87) {
tmp = t_1;
} else {
tmp = 1.0 / (z * (z / x));
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = x / ((y - z) * t) tmp = 0 if z <= -5.0: tmp = (x / z) * (1.0 / z) elif z <= 0.092: tmp = t_1 elif z <= 3.8e+28: tmp = (x / z) / z elif z <= 1.55e+87: tmp = t_1 else: tmp = 1.0 / (z * (z / x)) return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(x / Float64(Float64(y - z) * t)) tmp = 0.0 if (z <= -5.0) tmp = Float64(Float64(x / z) * Float64(1.0 / z)); elseif (z <= 0.092) tmp = t_1; elseif (z <= 3.8e+28) tmp = Float64(Float64(x / z) / z); elseif (z <= 1.55e+87) tmp = t_1; else tmp = Float64(1.0 / Float64(z * Float64(z / x))); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = x / ((y - z) * t);
tmp = 0.0;
if (z <= -5.0)
tmp = (x / z) * (1.0 / z);
elseif (z <= 0.092)
tmp = t_1;
elseif (z <= 3.8e+28)
tmp = (x / z) / z;
elseif (z <= 1.55e+87)
tmp = t_1;
else
tmp = 1.0 / (z * (z / x));
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.0], N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.092], t$95$1, If[LessEqual[z, 3.8e+28], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 1.55e+87], t$95$1, N[(1.0 / N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{if}\;z \leq -5:\\
\;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\
\mathbf{elif}\;z \leq 0.092:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{+28}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{+87}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{z \cdot \frac{z}{x}}\\
\end{array}
\end{array}
if z < -5Initial program 84.9%
Taylor expanded in z around inf 67.6%
unpow267.6%
Simplified67.6%
associate-/r*71.5%
div-inv71.5%
Applied egg-rr71.5%
if -5 < z < 0.091999999999999998 or 3.7999999999999999e28 < z < 1.55e87Initial program 94.1%
Taylor expanded in t around inf 74.5%
if 0.091999999999999998 < z < 3.7999999999999999e28Initial program 99.5%
Taylor expanded in z around inf 78.3%
unpow278.3%
Simplified78.3%
associate-/r*78.7%
div-inv78.3%
Applied egg-rr78.3%
associate-*r/78.7%
*-rgt-identity78.7%
Simplified78.7%
if 1.55e87 < z Initial program 77.3%
Taylor expanded in z around inf 77.1%
unpow277.1%
Simplified77.1%
clear-num77.1%
inv-pow77.1%
associate-/l*93.0%
Applied egg-rr93.0%
unpow-193.0%
associate-/r/92.9%
Simplified92.9%
Final simplification76.7%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (* y (- t z)))))
(if (<= t -7.5e-277)
t_1
(if (<= t 2.8e-93)
(/ (/ x z) z)
(if (<= t 5.1e-20)
t_1
(if (<= t 0.21) (/ x (* z z)) (/ x (* (- y z) t))))))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = x / (y * (t - z));
double tmp;
if (t <= -7.5e-277) {
tmp = t_1;
} else if (t <= 2.8e-93) {
tmp = (x / z) / z;
} else if (t <= 5.1e-20) {
tmp = t_1;
} else if (t <= 0.21) {
tmp = x / (z * z);
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
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 * (t - z))
if (t <= (-7.5d-277)) then
tmp = t_1
else if (t <= 2.8d-93) then
tmp = (x / z) / z
else if (t <= 5.1d-20) then
tmp = t_1
else if (t <= 0.21d0) then
tmp = x / (z * z)
else
tmp = x / ((y - z) * t)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double t_1 = x / (y * (t - z));
double tmp;
if (t <= -7.5e-277) {
tmp = t_1;
} else if (t <= 2.8e-93) {
tmp = (x / z) / z;
} else if (t <= 5.1e-20) {
tmp = t_1;
} else if (t <= 0.21) {
tmp = x / (z * z);
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = x / (y * (t - z)) tmp = 0 if t <= -7.5e-277: tmp = t_1 elif t <= 2.8e-93: tmp = (x / z) / z elif t <= 5.1e-20: tmp = t_1 elif t <= 0.21: tmp = x / (z * z) else: tmp = x / ((y - z) * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(x / Float64(y * Float64(t - z))) tmp = 0.0 if (t <= -7.5e-277) tmp = t_1; elseif (t <= 2.8e-93) tmp = Float64(Float64(x / z) / z); elseif (t <= 5.1e-20) tmp = t_1; elseif (t <= 0.21) tmp = Float64(x / Float64(z * z)); else tmp = Float64(x / Float64(Float64(y - z) * t)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = x / (y * (t - z));
tmp = 0.0;
if (t <= -7.5e-277)
tmp = t_1;
elseif (t <= 2.8e-93)
tmp = (x / z) / z;
elseif (t <= 5.1e-20)
tmp = t_1;
elseif (t <= 0.21)
tmp = x / (z * z);
else
tmp = x / ((y - z) * t);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.5e-277], t$95$1, If[LessEqual[t, 2.8e-93], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t, 5.1e-20], t$95$1, If[LessEqual[t, 0.21], N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{if}\;t \leq -7.5 \cdot 10^{-277}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-93}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{elif}\;t \leq 5.1 \cdot 10^{-20}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 0.21:\\
\;\;\;\;\frac{x}{z \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < -7.49999999999999971e-277 or 2.79999999999999998e-93 < t < 5.10000000000000019e-20Initial program 91.7%
Taylor expanded in y around inf 63.1%
*-commutative63.1%
Simplified63.1%
if -7.49999999999999971e-277 < t < 2.79999999999999998e-93Initial program 87.4%
Taylor expanded in z around inf 56.1%
unpow256.1%
Simplified56.1%
associate-/r*60.9%
div-inv60.9%
Applied egg-rr60.9%
associate-*r/60.9%
*-rgt-identity60.9%
Simplified60.9%
if 5.10000000000000019e-20 < t < 0.209999999999999992Initial program 100.0%
Taylor expanded in z around inf 100.0%
unpow2100.0%
Simplified100.0%
if 0.209999999999999992 < t Initial program 82.0%
Taylor expanded in t around inf 77.8%
Final simplification66.3%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (* y (- t z)))))
(if (<= t -2.15e-278)
t_1
(if (<= t 2e-94)
(/ (/ x z) z)
(if (<= t 6.2e-20)
t_1
(if (<= t 0.21) (/ x (* z z)) (/ (/ x t) (- y z))))))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = x / (y * (t - z));
double tmp;
if (t <= -2.15e-278) {
tmp = t_1;
} else if (t <= 2e-94) {
tmp = (x / z) / z;
} else if (t <= 6.2e-20) {
tmp = t_1;
} else if (t <= 0.21) {
tmp = x / (z * z);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
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 * (t - z))
if (t <= (-2.15d-278)) then
tmp = t_1
else if (t <= 2d-94) then
tmp = (x / z) / z
else if (t <= 6.2d-20) then
tmp = t_1
else if (t <= 0.21d0) then
tmp = x / (z * z)
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double t_1 = x / (y * (t - z));
double tmp;
if (t <= -2.15e-278) {
tmp = t_1;
} else if (t <= 2e-94) {
tmp = (x / z) / z;
} else if (t <= 6.2e-20) {
tmp = t_1;
} else if (t <= 0.21) {
tmp = x / (z * z);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = x / (y * (t - z)) tmp = 0 if t <= -2.15e-278: tmp = t_1 elif t <= 2e-94: tmp = (x / z) / z elif t <= 6.2e-20: tmp = t_1 elif t <= 0.21: tmp = x / (z * z) else: tmp = (x / t) / (y - z) return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(x / Float64(y * Float64(t - z))) tmp = 0.0 if (t <= -2.15e-278) tmp = t_1; elseif (t <= 2e-94) tmp = Float64(Float64(x / z) / z); elseif (t <= 6.2e-20) tmp = t_1; elseif (t <= 0.21) tmp = Float64(x / Float64(z * z)); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = x / (y * (t - z));
tmp = 0.0;
if (t <= -2.15e-278)
tmp = t_1;
elseif (t <= 2e-94)
tmp = (x / z) / z;
elseif (t <= 6.2e-20)
tmp = t_1;
elseif (t <= 0.21)
tmp = x / (z * z);
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.15e-278], t$95$1, If[LessEqual[t, 2e-94], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t, 6.2e-20], t$95$1, If[LessEqual[t, 0.21], N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{if}\;t \leq -2.15 \cdot 10^{-278}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-94}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{-20}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 0.21:\\
\;\;\;\;\frac{x}{z \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -2.15e-278 or 1.9999999999999999e-94 < t < 6.19999999999999999e-20Initial program 91.7%
Taylor expanded in y around inf 63.1%
*-commutative63.1%
Simplified63.1%
if -2.15e-278 < t < 1.9999999999999999e-94Initial program 87.4%
Taylor expanded in z around inf 56.1%
unpow256.1%
Simplified56.1%
associate-/r*60.9%
div-inv60.9%
Applied egg-rr60.9%
associate-*r/60.9%
*-rgt-identity60.9%
Simplified60.9%
if 6.19999999999999999e-20 < t < 0.209999999999999992Initial program 100.0%
Taylor expanded in z around inf 100.0%
unpow2100.0%
Simplified100.0%
if 0.209999999999999992 < t Initial program 82.0%
Taylor expanded in t around inf 77.8%
associate-/r*87.0%
Simplified87.0%
Final simplification68.2%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -5.7e+116) (not (<= z 1.5e+114))) (* (/ -1.0 z) (/ x (- t z))) (/ x (* (- y z) (- t z)))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -5.7e+116) || !(z <= 1.5e+114)) {
tmp = (-1.0 / z) * (x / (t - z));
} else {
tmp = x / ((y - z) * (t - z));
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
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 <= (-5.7d+116)) .or. (.not. (z <= 1.5d+114))) then
tmp = ((-1.0d0) / z) * (x / (t - z))
else
tmp = x / ((y - z) * (t - z))
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -5.7e+116) || !(z <= 1.5e+114)) {
tmp = (-1.0 / z) * (x / (t - z));
} else {
tmp = x / ((y - z) * (t - z));
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (z <= -5.7e+116) or not (z <= 1.5e+114): tmp = (-1.0 / z) * (x / (t - z)) else: tmp = x / ((y - z) * (t - z)) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -5.7e+116) || !(z <= 1.5e+114)) tmp = Float64(Float64(-1.0 / z) * Float64(x / Float64(t - z))); else tmp = Float64(x / Float64(Float64(y - z) * Float64(t - z))); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((z <= -5.7e+116) || ~((z <= 1.5e+114)))
tmp = (-1.0 / z) * (x / (t - z));
else
tmp = x / ((y - z) * (t - z));
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -5.7e+116], N[Not[LessEqual[z, 1.5e+114]], $MachinePrecision]], N[(N[(-1.0 / z), $MachinePrecision] * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.7 \cdot 10^{+116} \lor \neg \left(z \leq 1.5 \cdot 10^{+114}\right):\\
\;\;\;\;\frac{-1}{z} \cdot \frac{x}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\
\end{array}
\end{array}
if z < -5.69999999999999983e116 or 1.5e114 < z Initial program 77.5%
Taylor expanded in y around 0 77.4%
associate-*r/77.4%
neg-mul-177.4%
Simplified77.4%
neg-mul-177.4%
times-frac92.9%
Applied egg-rr92.9%
if -5.69999999999999983e116 < z < 1.5e114Initial program 94.3%
Final simplification93.9%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y -2.5e-27) (/ (/ x y) (- t z)) (if (<= y 2.15e-74) (* (/ -1.0 z) (/ x (- t z))) (/ (/ x (- y z)) t))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.5e-27) {
tmp = (x / y) / (t - z);
} else if (y <= 2.15e-74) {
tmp = (-1.0 / z) * (x / (t - z));
} else {
tmp = (x / (y - z)) / t;
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
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.5d-27)) then
tmp = (x / y) / (t - z)
else if (y <= 2.15d-74) then
tmp = ((-1.0d0) / z) * (x / (t - z))
else
tmp = (x / (y - z)) / t
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.5e-27) {
tmp = (x / y) / (t - z);
} else if (y <= 2.15e-74) {
tmp = (-1.0 / z) * (x / (t - z));
} else {
tmp = (x / (y - z)) / t;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if y <= -2.5e-27: tmp = (x / y) / (t - z) elif y <= 2.15e-74: tmp = (-1.0 / z) * (x / (t - z)) else: tmp = (x / (y - z)) / t return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -2.5e-27) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (y <= 2.15e-74) tmp = Float64(Float64(-1.0 / z) * Float64(x / Float64(t - z))); else tmp = Float64(Float64(x / Float64(y - z)) / t); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -2.5e-27)
tmp = (x / y) / (t - z);
elseif (y <= 2.15e-74)
tmp = (-1.0 / z) * (x / (t - z));
else
tmp = (x / (y - z)) / t;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -2.5e-27], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.15e-74], N[(N[(-1.0 / z), $MachinePrecision] * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{-27}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;y \leq 2.15 \cdot 10^{-74}:\\
\;\;\;\;\frac{-1}{z} \cdot \frac{x}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t}\\
\end{array}
\end{array}
if y < -2.5000000000000001e-27Initial program 85.7%
Taylor expanded in y around inf 76.0%
associate-/r*80.1%
Simplified80.1%
if -2.5000000000000001e-27 < y < 2.14999999999999986e-74Initial program 88.6%
Taylor expanded in y around 0 75.1%
associate-*r/75.1%
neg-mul-175.1%
Simplified75.1%
neg-mul-175.1%
times-frac83.1%
Applied egg-rr83.1%
if 2.14999999999999986e-74 < y Initial program 91.7%
Taylor expanded in t around inf 73.3%
*-commutative73.3%
associate-/r*79.4%
Simplified79.4%
Final simplification81.1%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -4.5e-26) (not (<= z 0.000225))) (/ (/ x z) z) (* (/ x y) (/ 1.0 t))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4.5e-26) || !(z <= 0.000225)) {
tmp = (x / z) / z;
} else {
tmp = (x / y) * (1.0 / t);
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
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 <= (-4.5d-26)) .or. (.not. (z <= 0.000225d0))) then
tmp = (x / z) / z
else
tmp = (x / y) * (1.0d0 / t)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4.5e-26) || !(z <= 0.000225)) {
tmp = (x / z) / z;
} else {
tmp = (x / y) * (1.0 / t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (z <= -4.5e-26) or not (z <= 0.000225): tmp = (x / z) / z else: tmp = (x / y) * (1.0 / t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -4.5e-26) || !(z <= 0.000225)) tmp = Float64(Float64(x / z) / z); else tmp = Float64(Float64(x / y) * Float64(1.0 / t)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((z <= -4.5e-26) || ~((z <= 0.000225)))
tmp = (x / z) / z;
else
tmp = (x / y) * (1.0 / t);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -4.5e-26], N[Not[LessEqual[z, 0.000225]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], N[(N[(x / y), $MachinePrecision] * N[(1.0 / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{-26} \lor \neg \left(z \leq 0.000225\right):\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{1}{t}\\
\end{array}
\end{array}
if z < -4.4999999999999999e-26 or 2.2499999999999999e-4 < z Initial program 85.7%
Taylor expanded in z around inf 65.6%
unpow265.6%
Simplified65.6%
associate-/r*71.7%
div-inv71.7%
Applied egg-rr71.7%
associate-*r/71.7%
*-rgt-identity71.7%
Simplified71.7%
if -4.4999999999999999e-26 < z < 2.2499999999999999e-4Initial program 93.1%
Taylor expanded in z around 0 66.1%
*-un-lft-identity66.1%
times-frac68.0%
Applied egg-rr68.0%
Final simplification70.1%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= z -2.4e-25) (* (/ x z) (/ 1.0 z)) (if (<= z 5.4e-12) (* (/ x y) (/ 1.0 t)) (/ (/ x z) z))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.4e-25) {
tmp = (x / z) * (1.0 / z);
} else if (z <= 5.4e-12) {
tmp = (x / y) * (1.0 / t);
} else {
tmp = (x / z) / z;
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
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.4d-25)) then
tmp = (x / z) * (1.0d0 / z)
else if (z <= 5.4d-12) then
tmp = (x / y) * (1.0d0 / t)
else
tmp = (x / z) / z
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.4e-25) {
tmp = (x / z) * (1.0 / z);
} else if (z <= 5.4e-12) {
tmp = (x / y) * (1.0 / t);
} else {
tmp = (x / z) / z;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if z <= -2.4e-25: tmp = (x / z) * (1.0 / z) elif z <= 5.4e-12: tmp = (x / y) * (1.0 / t) else: tmp = (x / z) / z return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -2.4e-25) tmp = Float64(Float64(x / z) * Float64(1.0 / z)); elseif (z <= 5.4e-12) tmp = Float64(Float64(x / y) * Float64(1.0 / t)); else tmp = Float64(Float64(x / z) / z); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (z <= -2.4e-25)
tmp = (x / z) * (1.0 / z);
elseif (z <= 5.4e-12)
tmp = (x / y) * (1.0 / t);
else
tmp = (x / z) / z;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[z, -2.4e-25], N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.4e-12], N[(N[(x / y), $MachinePrecision] * N[(1.0 / t), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{-25}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{-12}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{1}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\end{array}
\end{array}
if z < -2.40000000000000009e-25Initial program 86.5%
Taylor expanded in z around inf 63.1%
unpow263.1%
Simplified63.1%
associate-/r*66.5%
div-inv66.6%
Applied egg-rr66.6%
if -2.40000000000000009e-25 < z < 5.39999999999999961e-12Initial program 93.1%
Taylor expanded in z around 0 66.1%
*-un-lft-identity66.1%
times-frac68.0%
Applied egg-rr68.0%
if 5.39999999999999961e-12 < z Initial program 84.7%
Taylor expanded in z around inf 68.8%
unpow268.8%
Simplified68.8%
associate-/r*78.6%
div-inv78.5%
Applied egg-rr78.5%
associate-*r/78.6%
*-rgt-identity78.6%
Simplified78.6%
Final simplification70.1%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= z -2.1e-25) (* (/ x z) (/ 1.0 z)) (if (<= z 6e-8) (* (/ x y) (/ 1.0 t)) (/ 1.0 (* z (/ z x))))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.1e-25) {
tmp = (x / z) * (1.0 / z);
} else if (z <= 6e-8) {
tmp = (x / y) * (1.0 / t);
} else {
tmp = 1.0 / (z * (z / x));
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
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.1d-25)) then
tmp = (x / z) * (1.0d0 / z)
else if (z <= 6d-8) then
tmp = (x / y) * (1.0d0 / t)
else
tmp = 1.0d0 / (z * (z / x))
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.1e-25) {
tmp = (x / z) * (1.0 / z);
} else if (z <= 6e-8) {
tmp = (x / y) * (1.0 / t);
} else {
tmp = 1.0 / (z * (z / x));
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if z <= -2.1e-25: tmp = (x / z) * (1.0 / z) elif z <= 6e-8: tmp = (x / y) * (1.0 / t) else: tmp = 1.0 / (z * (z / x)) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -2.1e-25) tmp = Float64(Float64(x / z) * Float64(1.0 / z)); elseif (z <= 6e-8) tmp = Float64(Float64(x / y) * Float64(1.0 / t)); else tmp = Float64(1.0 / Float64(z * Float64(z / x))); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (z <= -2.1e-25)
tmp = (x / z) * (1.0 / z);
elseif (z <= 6e-8)
tmp = (x / y) * (1.0 / t);
else
tmp = 1.0 / (z * (z / x));
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[z, -2.1e-25], N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e-8], N[(N[(x / y), $MachinePrecision] * N[(1.0 / t), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{-25}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-8}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{1}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{z \cdot \frac{z}{x}}\\
\end{array}
\end{array}
if z < -2.10000000000000002e-25Initial program 86.5%
Taylor expanded in z around inf 63.1%
unpow263.1%
Simplified63.1%
associate-/r*66.5%
div-inv66.6%
Applied egg-rr66.6%
if -2.10000000000000002e-25 < z < 5.99999999999999946e-8Initial program 93.1%
Taylor expanded in z around 0 66.1%
*-un-lft-identity66.1%
times-frac68.0%
Applied egg-rr68.0%
if 5.99999999999999946e-8 < z Initial program 84.7%
Taylor expanded in z around inf 68.8%
unpow268.8%
Simplified68.8%
clear-num68.8%
inv-pow68.8%
associate-/l*79.5%
Applied egg-rr79.5%
unpow-179.5%
associate-/r/79.4%
Simplified79.4%
Final simplification70.3%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t -4.2e-281) (/ (/ x y) (- t z)) (if (<= t 1.35e-61) (/ (/ x z) z) (/ (/ x t) (- y z)))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -4.2e-281) {
tmp = (x / y) / (t - z);
} else if (t <= 1.35e-61) {
tmp = (x / z) / z;
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
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 <= (-4.2d-281)) then
tmp = (x / y) / (t - z)
else if (t <= 1.35d-61) then
tmp = (x / z) / z
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -4.2e-281) {
tmp = (x / y) / (t - z);
} else if (t <= 1.35e-61) {
tmp = (x / z) / z;
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if t <= -4.2e-281: tmp = (x / y) / (t - z) elif t <= 1.35e-61: tmp = (x / z) / z else: tmp = (x / t) / (y - z) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -4.2e-281) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (t <= 1.35e-61) tmp = Float64(Float64(x / z) / z); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -4.2e-281)
tmp = (x / y) / (t - z);
elseif (t <= 1.35e-61)
tmp = (x / z) / z;
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -4.2e-281], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e-61], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.2 \cdot 10^{-281}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-61}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -4.1999999999999998e-281Initial program 90.6%
Taylor expanded in y around inf 60.1%
associate-/r*60.5%
Simplified60.5%
if -4.1999999999999998e-281 < t < 1.34999999999999997e-61Initial program 88.9%
Taylor expanded in z around inf 53.0%
unpow253.0%
Simplified53.0%
associate-/r*57.3%
div-inv57.3%
Applied egg-rr57.3%
associate-*r/57.3%
*-rgt-identity57.3%
Simplified57.3%
if 1.34999999999999997e-61 < t Initial program 86.1%
Taylor expanded in t around inf 75.9%
associate-/r*82.9%
Simplified82.9%
Final simplification65.8%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -380000.0) (not (<= z 3.5e+56))) (/ x (* z t)) (/ x (* y t))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -380000.0) || !(z <= 3.5e+56)) {
tmp = x / (z * t);
} else {
tmp = x / (y * t);
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
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 <= (-380000.0d0)) .or. (.not. (z <= 3.5d+56))) then
tmp = x / (z * t)
else
tmp = x / (y * t)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -380000.0) || !(z <= 3.5e+56)) {
tmp = x / (z * t);
} else {
tmp = x / (y * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (z <= -380000.0) or not (z <= 3.5e+56): tmp = x / (z * t) else: tmp = x / (y * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -380000.0) || !(z <= 3.5e+56)) tmp = Float64(x / Float64(z * t)); else tmp = Float64(x / Float64(y * t)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((z <= -380000.0) || ~((z <= 3.5e+56)))
tmp = x / (z * t);
else
tmp = x / (y * t);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -380000.0], N[Not[LessEqual[z, 3.5e+56]], $MachinePrecision]], N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -380000 \lor \neg \left(z \leq 3.5 \cdot 10^{+56}\right):\\
\;\;\;\;\frac{x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -3.8e5 or 3.49999999999999999e56 < z Initial program 81.8%
Taylor expanded in y around 0 75.8%
associate-*r/75.8%
neg-mul-175.8%
Simplified75.8%
Taylor expanded in z around 0 42.4%
associate-*r/42.4%
neg-mul-142.4%
*-commutative42.4%
Simplified42.4%
expm1-log1p-u42.1%
expm1-udef56.0%
add-sqr-sqrt31.5%
sqrt-unprod53.7%
sqr-neg53.7%
sqrt-unprod24.4%
add-sqr-sqrt55.3%
Applied egg-rr55.3%
expm1-def38.9%
expm1-log1p39.2%
Simplified39.2%
if -3.8e5 < z < 3.49999999999999999e56Initial program 94.5%
Taylor expanded in z around 0 56.2%
Final simplification48.8%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -4.1e+118) (not (<= z 1.3e+89))) (/ x (* y z)) (/ x (* y t))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4.1e+118) || !(z <= 1.3e+89)) {
tmp = x / (y * z);
} else {
tmp = x / (y * t);
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
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 <= (-4.1d+118)) .or. (.not. (z <= 1.3d+89))) then
tmp = x / (y * z)
else
tmp = x / (y * t)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4.1e+118) || !(z <= 1.3e+89)) {
tmp = x / (y * z);
} else {
tmp = x / (y * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (z <= -4.1e+118) or not (z <= 1.3e+89): tmp = x / (y * z) else: tmp = x / (y * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -4.1e+118) || !(z <= 1.3e+89)) tmp = Float64(x / Float64(y * z)); else tmp = Float64(x / Float64(y * t)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((z <= -4.1e+118) || ~((z <= 1.3e+89)))
tmp = x / (y * z);
else
tmp = x / (y * t);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -4.1e+118], N[Not[LessEqual[z, 1.3e+89]], $MachinePrecision]], N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.1 \cdot 10^{+118} \lor \neg \left(z \leq 1.3 \cdot 10^{+89}\right):\\
\;\;\;\;\frac{x}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -4.0999999999999997e118 or 1.3e89 < z Initial program 78.7%
Taylor expanded in y around inf 42.5%
*-commutative42.5%
Simplified42.5%
Taylor expanded in t around 0 42.4%
associate-*r/42.4%
neg-mul-142.4%
*-commutative42.4%
Simplified42.4%
expm1-log1p-u42.2%
expm1-udef63.8%
add-sqr-sqrt30.7%
sqrt-unprod62.1%
sqr-neg62.1%
sqrt-unprod33.0%
add-sqr-sqrt63.7%
*-commutative63.7%
associate-/r*63.7%
Applied egg-rr63.7%
expm1-def39.8%
expm1-log1p40.0%
associate-/l/42.4%
Simplified42.4%
if -4.0999999999999997e118 < z < 1.3e89Initial program 93.8%
Taylor expanded in z around 0 50.9%
Final simplification48.2%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -4e-26) (not (<= z 1.75e-9))) (/ x (* z z)) (/ x (* y t))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4e-26) || !(z <= 1.75e-9)) {
tmp = x / (z * z);
} else {
tmp = x / (y * t);
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
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 <= (-4d-26)) .or. (.not. (z <= 1.75d-9))) then
tmp = x / (z * z)
else
tmp = x / (y * t)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4e-26) || !(z <= 1.75e-9)) {
tmp = x / (z * z);
} else {
tmp = x / (y * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (z <= -4e-26) or not (z <= 1.75e-9): tmp = x / (z * z) else: tmp = x / (y * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -4e-26) || !(z <= 1.75e-9)) tmp = Float64(x / Float64(z * z)); else tmp = Float64(x / Float64(y * t)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((z <= -4e-26) || ~((z <= 1.75e-9)))
tmp = x / (z * z);
else
tmp = x / (y * t);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -4e-26], N[Not[LessEqual[z, 1.75e-9]], $MachinePrecision]], N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{-26} \lor \neg \left(z \leq 1.75 \cdot 10^{-9}\right):\\
\;\;\;\;\frac{x}{z \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -4.0000000000000002e-26 or 1.75e-9 < z Initial program 85.7%
Taylor expanded in z around inf 65.6%
unpow265.6%
Simplified65.6%
if -4.0000000000000002e-26 < z < 1.75e-9Initial program 93.1%
Taylor expanded in z around 0 66.1%
Final simplification65.8%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -2.6e-25) (not (<= z 3.9e-8))) (/ x (* z z)) (/ (/ x t) y)))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.6e-25) || !(z <= 3.9e-8)) {
tmp = x / (z * z);
} else {
tmp = (x / t) / y;
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
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.6d-25)) .or. (.not. (z <= 3.9d-8))) then
tmp = x / (z * z)
else
tmp = (x / t) / y
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.6e-25) || !(z <= 3.9e-8)) {
tmp = x / (z * z);
} else {
tmp = (x / t) / y;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (z <= -2.6e-25) or not (z <= 3.9e-8): tmp = x / (z * z) else: tmp = (x / t) / y return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -2.6e-25) || !(z <= 3.9e-8)) tmp = Float64(x / Float64(z * z)); else tmp = Float64(Float64(x / t) / y); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((z <= -2.6e-25) || ~((z <= 3.9e-8)))
tmp = x / (z * z);
else
tmp = (x / t) / y;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -2.6e-25], N[Not[LessEqual[z, 3.9e-8]], $MachinePrecision]], N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{-25} \lor \neg \left(z \leq 3.9 \cdot 10^{-8}\right):\\
\;\;\;\;\frac{x}{z \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -2.6e-25 or 3.89999999999999985e-8 < z Initial program 85.7%
Taylor expanded in z around inf 65.6%
unpow265.6%
Simplified65.6%
if -2.6e-25 < z < 3.89999999999999985e-8Initial program 93.1%
Taylor expanded in z around 0 66.1%
associate-/r*68.7%
Simplified68.7%
Final simplification66.9%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -1.95e-25) (not (<= z 1.85e-6))) (/ x (* z z)) (/ (/ x y) t)))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.95e-25) || !(z <= 1.85e-6)) {
tmp = x / (z * z);
} else {
tmp = (x / y) / t;
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
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.95d-25)) .or. (.not. (z <= 1.85d-6))) then
tmp = x / (z * z)
else
tmp = (x / y) / t
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.95e-25) || !(z <= 1.85e-6)) {
tmp = x / (z * z);
} else {
tmp = (x / y) / t;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (z <= -1.95e-25) or not (z <= 1.85e-6): tmp = x / (z * z) else: tmp = (x / y) / t return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -1.95e-25) || !(z <= 1.85e-6)) tmp = Float64(x / Float64(z * z)); else tmp = Float64(Float64(x / y) / t); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((z <= -1.95e-25) || ~((z <= 1.85e-6)))
tmp = x / (z * z);
else
tmp = (x / y) / t;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.95e-25], N[Not[LessEqual[z, 1.85e-6]], $MachinePrecision]], N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.95 \cdot 10^{-25} \lor \neg \left(z \leq 1.85 \cdot 10^{-6}\right):\\
\;\;\;\;\frac{x}{z \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\end{array}
\end{array}
if z < -1.95e-25 or 1.8500000000000001e-6 < z Initial program 85.7%
Taylor expanded in z around inf 65.6%
unpow265.6%
Simplified65.6%
if -1.95e-25 < z < 1.8500000000000001e-6Initial program 93.1%
associate-/r*93.0%
Simplified93.0%
add-cube-cbrt91.8%
pow391.8%
Applied egg-rr91.8%
Taylor expanded in z around 0 66.1%
associate-/l/68.0%
Simplified68.0%
Final simplification66.6%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -3.4e-26) (not (<= z 0.0064))) (/ (/ x z) z) (/ (/ x y) t)))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.4e-26) || !(z <= 0.0064)) {
tmp = (x / z) / z;
} else {
tmp = (x / y) / t;
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
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.4d-26)) .or. (.not. (z <= 0.0064d0))) then
tmp = (x / z) / z
else
tmp = (x / y) / t
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.4e-26) || !(z <= 0.0064)) {
tmp = (x / z) / z;
} else {
tmp = (x / y) / t;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (z <= -3.4e-26) or not (z <= 0.0064): tmp = (x / z) / z else: tmp = (x / y) / t return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -3.4e-26) || !(z <= 0.0064)) tmp = Float64(Float64(x / z) / z); else tmp = Float64(Float64(x / y) / t); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((z <= -3.4e-26) || ~((z <= 0.0064)))
tmp = (x / z) / z;
else
tmp = (x / y) / t;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -3.4e-26], N[Not[LessEqual[z, 0.0064]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{-26} \lor \neg \left(z \leq 0.0064\right):\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\end{array}
\end{array}
if z < -3.40000000000000013e-26 or 0.00640000000000000031 < z Initial program 85.7%
Taylor expanded in z around inf 65.6%
unpow265.6%
Simplified65.6%
associate-/r*71.7%
div-inv71.7%
Applied egg-rr71.7%
associate-*r/71.7%
*-rgt-identity71.7%
Simplified71.7%
if -3.40000000000000013e-26 < z < 0.00640000000000000031Initial program 93.1%
associate-/r*93.0%
Simplified93.0%
add-cube-cbrt91.8%
pow391.8%
Applied egg-rr91.8%
Taylor expanded in z around 0 66.1%
associate-/l/68.0%
Simplified68.0%
Final simplification70.1%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (/ x (* y t)))
assert(y < t);
double code(double x, double y, double z, double t) {
return x / (y * t);
}
NOTE: y and t should be sorted in increasing order before calling this function.
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
assert y < t;
public static double code(double x, double y, double z, double t) {
return x / (y * t);
}
[y, t] = sort([y, t]) def code(x, y, z, t): return x / (y * t)
y, t = sort([y, t]) function code(x, y, z, t) return Float64(x / Float64(y * t)) end
y, t = num2cell(sort([y, t])){:}
function tmp = code(x, y, z, t)
tmp = x / (y * t);
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\frac{x}{y \cdot t}
\end{array}
Initial program 89.0%
Taylor expanded in z around 0 41.9%
Final simplification41.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 2023290
(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))))