
(FPCore (x y z t) :precision binary64 (* x (- (/ y z) (/ t (- 1.0 z)))))
double code(double x, double y, double z, double t) {
return x * ((y / z) - (t / (1.0 - 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 / (1.0d0 - z)))
end function
public static double code(double x, double y, double z, double t) {
return x * ((y / z) - (t / (1.0 - z)));
}
def code(x, y, z, t): return x * ((y / z) - (t / (1.0 - z)))
function code(x, y, z, t) return Float64(x * Float64(Float64(y / z) - Float64(t / Float64(1.0 - z)))) end
function tmp = code(x, y, z, t) tmp = x * ((y / z) - (t / (1.0 - z))); end
code[x_, y_, z_, t_] := N[(x * N[(N[(y / z), $MachinePrecision] - N[(t / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (* x (- (/ y z) (/ t (- 1.0 z)))))
double code(double x, double y, double z, double t) {
return x * ((y / z) - (t / (1.0 - 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 / (1.0d0 - z)))
end function
public static double code(double x, double y, double z, double t) {
return x * ((y / z) - (t / (1.0 - z)));
}
def code(x, y, z, t): return x * ((y / z) - (t / (1.0 - z)))
function code(x, y, z, t) return Float64(x * Float64(Float64(y / z) - Float64(t / Float64(1.0 - z)))) end
function tmp = code(x, y, z, t) tmp = x * ((y / z) - (t / (1.0 - z))); end
code[x_, y_, z_, t_] := N[(x * N[(N[(y / z), $MachinePrecision] - N[(t / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)
\end{array}
(FPCore (x y z t) :precision binary64 (* x (+ (/ y z) (/ t (+ z -1.0)))))
double code(double x, double y, double z, double t) {
return x * ((y / z) + (t / (z + -1.0)));
}
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 + (-1.0d0))))
end function
public static double code(double x, double y, double z, double t) {
return x * ((y / z) + (t / (z + -1.0)));
}
def code(x, y, z, t): return x * ((y / z) + (t / (z + -1.0)))
function code(x, y, z, t) return Float64(x * Float64(Float64(y / z) + Float64(t / Float64(z + -1.0)))) end
function tmp = code(x, y, z, t) tmp = x * ((y / z) + (t / (z + -1.0))); end
code[x_, y_, z_, t_] := N[(x * N[(N[(y / z), $MachinePrecision] + N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\frac{y}{z} + \frac{t}{z + -1}\right)
\end{array}
Initial program 95.8%
Final simplification95.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ t z))) (t_2 (* x (/ y z))))
(if (<= t -1.1e+152)
t_1
(if (<= t -8.6e+107)
t_2
(if (<= t -1e+69)
t_1
(if (<= t 6.5e-154)
t_2
(if (<= t 1.5e+143)
(* y (/ x z))
(if (<= t 1.7e+175) t_2 t_1))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t / z);
double t_2 = x * (y / z);
double tmp;
if (t <= -1.1e+152) {
tmp = t_1;
} else if (t <= -8.6e+107) {
tmp = t_2;
} else if (t <= -1e+69) {
tmp = t_1;
} else if (t <= 6.5e-154) {
tmp = t_2;
} else if (t <= 1.5e+143) {
tmp = y * (x / z);
} else if (t <= 1.7e+175) {
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 * (t / z)
t_2 = x * (y / z)
if (t <= (-1.1d+152)) then
tmp = t_1
else if (t <= (-8.6d+107)) then
tmp = t_2
else if (t <= (-1d+69)) then
tmp = t_1
else if (t <= 6.5d-154) then
tmp = t_2
else if (t <= 1.5d+143) then
tmp = y * (x / z)
else if (t <= 1.7d+175) 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 * (t / z);
double t_2 = x * (y / z);
double tmp;
if (t <= -1.1e+152) {
tmp = t_1;
} else if (t <= -8.6e+107) {
tmp = t_2;
} else if (t <= -1e+69) {
tmp = t_1;
} else if (t <= 6.5e-154) {
tmp = t_2;
} else if (t <= 1.5e+143) {
tmp = y * (x / z);
} else if (t <= 1.7e+175) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t / z) t_2 = x * (y / z) tmp = 0 if t <= -1.1e+152: tmp = t_1 elif t <= -8.6e+107: tmp = t_2 elif t <= -1e+69: tmp = t_1 elif t <= 6.5e-154: tmp = t_2 elif t <= 1.5e+143: tmp = y * (x / z) elif t <= 1.7e+175: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t / z)) t_2 = Float64(x * Float64(y / z)) tmp = 0.0 if (t <= -1.1e+152) tmp = t_1; elseif (t <= -8.6e+107) tmp = t_2; elseif (t <= -1e+69) tmp = t_1; elseif (t <= 6.5e-154) tmp = t_2; elseif (t <= 1.5e+143) tmp = Float64(y * Float64(x / z)); elseif (t <= 1.7e+175) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (t / z); t_2 = x * (y / z); tmp = 0.0; if (t <= -1.1e+152) tmp = t_1; elseif (t <= -8.6e+107) tmp = t_2; elseif (t <= -1e+69) tmp = t_1; elseif (t <= 6.5e-154) tmp = t_2; elseif (t <= 1.5e+143) tmp = y * (x / z); elseif (t <= 1.7e+175) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.1e+152], t$95$1, If[LessEqual[t, -8.6e+107], t$95$2, If[LessEqual[t, -1e+69], t$95$1, If[LessEqual[t, 6.5e-154], t$95$2, If[LessEqual[t, 1.5e+143], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.7e+175], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z}\\
t_2 := x \cdot \frac{y}{z}\\
\mathbf{if}\;t \leq -1.1 \cdot 10^{+152}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -8.6 \cdot 10^{+107}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{-154}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{+143}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{+175}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.0999999999999999e152 or -8.5999999999999999e107 < t < -1.0000000000000001e69 or 1.70000000000000014e175 < t Initial program 98.4%
Taylor expanded in y around 0 70.4%
mul-1-neg70.4%
*-commutative70.4%
associate-/l*80.5%
distribute-rgt-neg-out80.5%
distribute-neg-frac280.5%
neg-sub080.5%
associate--r-80.5%
metadata-eval80.5%
Simplified80.5%
Taylor expanded in z around inf 65.1%
if -1.0999999999999999e152 < t < -8.5999999999999999e107 or -1.0000000000000001e69 < t < 6.5000000000000003e-154 or 1.5e143 < t < 1.70000000000000014e175Initial program 97.4%
Taylor expanded in y around inf 81.3%
associate-*r/86.7%
Simplified86.7%
if 6.5000000000000003e-154 < t < 1.5e143Initial program 89.7%
Taylor expanded in y around inf 88.1%
Taylor expanded in y around inf 71.7%
*-commutative71.7%
associate-/l*79.0%
Simplified79.0%
Final simplification78.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (/ z t))) (t_2 (* x (/ y z))))
(if (<= t -1.1e+150)
t_1
(if (<= t -9.5e+107)
t_2
(if (<= t -3.5e+68)
t_1
(if (<= t 8.8e-153)
t_2
(if (<= t 1.45e+144)
(* y (/ x z))
(if (<= t 5.5e+172) t_2 t_1))))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (z / t);
double t_2 = x * (y / z);
double tmp;
if (t <= -1.1e+150) {
tmp = t_1;
} else if (t <= -9.5e+107) {
tmp = t_2;
} else if (t <= -3.5e+68) {
tmp = t_1;
} else if (t <= 8.8e-153) {
tmp = t_2;
} else if (t <= 1.45e+144) {
tmp = y * (x / z);
} else if (t <= 5.5e+172) {
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 / t)
t_2 = x * (y / z)
if (t <= (-1.1d+150)) then
tmp = t_1
else if (t <= (-9.5d+107)) then
tmp = t_2
else if (t <= (-3.5d+68)) then
tmp = t_1
else if (t <= 8.8d-153) then
tmp = t_2
else if (t <= 1.45d+144) then
tmp = y * (x / z)
else if (t <= 5.5d+172) 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 / t);
double t_2 = x * (y / z);
double tmp;
if (t <= -1.1e+150) {
tmp = t_1;
} else if (t <= -9.5e+107) {
tmp = t_2;
} else if (t <= -3.5e+68) {
tmp = t_1;
} else if (t <= 8.8e-153) {
tmp = t_2;
} else if (t <= 1.45e+144) {
tmp = y * (x / z);
} else if (t <= 5.5e+172) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (z / t) t_2 = x * (y / z) tmp = 0 if t <= -1.1e+150: tmp = t_1 elif t <= -9.5e+107: tmp = t_2 elif t <= -3.5e+68: tmp = t_1 elif t <= 8.8e-153: tmp = t_2 elif t <= 1.45e+144: tmp = y * (x / z) elif t <= 5.5e+172: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(z / t)) t_2 = Float64(x * Float64(y / z)) tmp = 0.0 if (t <= -1.1e+150) tmp = t_1; elseif (t <= -9.5e+107) tmp = t_2; elseif (t <= -3.5e+68) tmp = t_1; elseif (t <= 8.8e-153) tmp = t_2; elseif (t <= 1.45e+144) tmp = Float64(y * Float64(x / z)); elseif (t <= 5.5e+172) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (z / t); t_2 = x * (y / z); tmp = 0.0; if (t <= -1.1e+150) tmp = t_1; elseif (t <= -9.5e+107) tmp = t_2; elseif (t <= -3.5e+68) tmp = t_1; elseif (t <= 8.8e-153) tmp = t_2; elseif (t <= 1.45e+144) tmp = y * (x / z); elseif (t <= 5.5e+172) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.1e+150], t$95$1, If[LessEqual[t, -9.5e+107], t$95$2, If[LessEqual[t, -3.5e+68], t$95$1, If[LessEqual[t, 8.8e-153], t$95$2, If[LessEqual[t, 1.45e+144], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.5e+172], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{z}{t}}\\
t_2 := x \cdot \frac{y}{z}\\
\mathbf{if}\;t \leq -1.1 \cdot 10^{+150}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -9.5 \cdot 10^{+107}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -3.5 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 8.8 \cdot 10^{-153}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{+144}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{+172}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.1e150 or -9.50000000000000019e107 < t < -3.49999999999999977e68 or 5.4999999999999999e172 < t Initial program 98.4%
Taylor expanded in z around inf 64.2%
*-commutative64.2%
associate-/l*64.0%
cancel-sign-sub-inv64.0%
metadata-eval64.0%
*-lft-identity64.0%
+-commutative64.0%
Simplified64.0%
Taylor expanded in t around inf 55.0%
associate-/l*54.8%
*-commutative54.8%
associate-/r/65.2%
Simplified65.2%
if -1.1e150 < t < -9.50000000000000019e107 or -3.49999999999999977e68 < t < 8.80000000000000003e-153 or 1.44999999999999999e144 < t < 5.4999999999999999e172Initial program 97.4%
Taylor expanded in y around inf 81.3%
associate-*r/86.7%
Simplified86.7%
if 8.80000000000000003e-153 < t < 1.44999999999999999e144Initial program 89.7%
Taylor expanded in y around inf 88.1%
Taylor expanded in y around inf 71.7%
*-commutative71.7%
associate-/l*79.0%
Simplified79.0%
Final simplification78.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (/ z t))) (t_2 (/ x (/ z y))))
(if (<= t -4.3e+152)
t_1
(if (<= t -7.8e+97)
t_2
(if (<= t -6.5e+68)
t_1
(if (<= t 5e-154)
t_2
(if (<= t 3.6e+140)
(* y (/ x z))
(if (<= t 4.5e+172) t_2 t_1))))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (z / t);
double t_2 = x / (z / y);
double tmp;
if (t <= -4.3e+152) {
tmp = t_1;
} else if (t <= -7.8e+97) {
tmp = t_2;
} else if (t <= -6.5e+68) {
tmp = t_1;
} else if (t <= 5e-154) {
tmp = t_2;
} else if (t <= 3.6e+140) {
tmp = y * (x / z);
} else if (t <= 4.5e+172) {
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 / t)
t_2 = x / (z / y)
if (t <= (-4.3d+152)) then
tmp = t_1
else if (t <= (-7.8d+97)) then
tmp = t_2
else if (t <= (-6.5d+68)) then
tmp = t_1
else if (t <= 5d-154) then
tmp = t_2
else if (t <= 3.6d+140) then
tmp = y * (x / z)
else if (t <= 4.5d+172) 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 / t);
double t_2 = x / (z / y);
double tmp;
if (t <= -4.3e+152) {
tmp = t_1;
} else if (t <= -7.8e+97) {
tmp = t_2;
} else if (t <= -6.5e+68) {
tmp = t_1;
} else if (t <= 5e-154) {
tmp = t_2;
} else if (t <= 3.6e+140) {
tmp = y * (x / z);
} else if (t <= 4.5e+172) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (z / t) t_2 = x / (z / y) tmp = 0 if t <= -4.3e+152: tmp = t_1 elif t <= -7.8e+97: tmp = t_2 elif t <= -6.5e+68: tmp = t_1 elif t <= 5e-154: tmp = t_2 elif t <= 3.6e+140: tmp = y * (x / z) elif t <= 4.5e+172: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(z / t)) t_2 = Float64(x / Float64(z / y)) tmp = 0.0 if (t <= -4.3e+152) tmp = t_1; elseif (t <= -7.8e+97) tmp = t_2; elseif (t <= -6.5e+68) tmp = t_1; elseif (t <= 5e-154) tmp = t_2; elseif (t <= 3.6e+140) tmp = Float64(y * Float64(x / z)); elseif (t <= 4.5e+172) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (z / t); t_2 = x / (z / y); tmp = 0.0; if (t <= -4.3e+152) tmp = t_1; elseif (t <= -7.8e+97) tmp = t_2; elseif (t <= -6.5e+68) tmp = t_1; elseif (t <= 5e-154) tmp = t_2; elseif (t <= 3.6e+140) tmp = y * (x / z); elseif (t <= 4.5e+172) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.3e+152], t$95$1, If[LessEqual[t, -7.8e+97], t$95$2, If[LessEqual[t, -6.5e+68], t$95$1, If[LessEqual[t, 5e-154], t$95$2, If[LessEqual[t, 3.6e+140], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.5e+172], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{z}{t}}\\
t_2 := \frac{x}{\frac{z}{y}}\\
\mathbf{if}\;t \leq -4.3 \cdot 10^{+152}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -7.8 \cdot 10^{+97}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -6.5 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-154}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+140}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{+172}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.29999999999999994e152 or -7.7999999999999999e97 < t < -6.5000000000000005e68 or 4.5000000000000002e172 < t Initial program 98.4%
Taylor expanded in z around inf 63.2%
*-commutative63.2%
associate-/l*63.0%
cancel-sign-sub-inv63.0%
metadata-eval63.0%
*-lft-identity63.0%
+-commutative63.0%
Simplified63.0%
Taylor expanded in t around inf 55.1%
associate-/l*54.9%
*-commutative54.9%
associate-/r/65.6%
Simplified65.6%
if -4.29999999999999994e152 < t < -7.7999999999999999e97 or -6.5000000000000005e68 < t < 5.0000000000000002e-154 or 3.6e140 < t < 4.5000000000000002e172Initial program 97.4%
Taylor expanded in y around inf 95.8%
Taylor expanded in y around inf 80.8%
associate-*l/78.5%
associate-/r/86.3%
Simplified86.3%
if 5.0000000000000002e-154 < t < 3.6e140Initial program 89.7%
Taylor expanded in y around inf 88.1%
Taylor expanded in y around inf 71.7%
*-commutative71.7%
associate-/l*79.0%
Simplified79.0%
Final simplification78.8%
(FPCore (x y z t)
:precision binary64
(if (or (<= z -11000000.0)
(not (or (<= z -5.3e-131) (and (not (<= z 4.5e-278)) (<= z 1.0)))))
(* t (/ x z))
(* x (- t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -11000000.0) || !((z <= -5.3e-131) || (!(z <= 4.5e-278) && (z <= 1.0)))) {
tmp = t * (x / z);
} else {
tmp = x * -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 <= (-11000000.0d0)) .or. (.not. (z <= (-5.3d-131)) .or. (.not. (z <= 4.5d-278)) .and. (z <= 1.0d0))) then
tmp = t * (x / z)
else
tmp = x * -t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -11000000.0) || !((z <= -5.3e-131) || (!(z <= 4.5e-278) && (z <= 1.0)))) {
tmp = t * (x / z);
} else {
tmp = x * -t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -11000000.0) or not ((z <= -5.3e-131) or (not (z <= 4.5e-278) and (z <= 1.0))): tmp = t * (x / z) else: tmp = x * -t return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -11000000.0) || !((z <= -5.3e-131) || (!(z <= 4.5e-278) && (z <= 1.0)))) tmp = Float64(t * Float64(x / z)); else tmp = Float64(x * Float64(-t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -11000000.0) || ~(((z <= -5.3e-131) || (~((z <= 4.5e-278)) && (z <= 1.0))))) tmp = t * (x / z); else tmp = x * -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -11000000.0], N[Not[Or[LessEqual[z, -5.3e-131], And[N[Not[LessEqual[z, 4.5e-278]], $MachinePrecision], LessEqual[z, 1.0]]]], $MachinePrecision]], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x * (-t)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -11000000 \lor \neg \left(z \leq -5.3 \cdot 10^{-131} \lor \neg \left(z \leq 4.5 \cdot 10^{-278}\right) \land z \leq 1\right):\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-t\right)\\
\end{array}
\end{array}
if z < -1.1e7 or -5.30000000000000018e-131 < z < 4.4999999999999998e-278 or 1 < z Initial program 95.7%
Taylor expanded in y around 0 38.8%
mul-1-neg38.8%
associate-/l*39.8%
distribute-rgt-neg-in39.8%
distribute-neg-frac239.8%
neg-sub039.8%
associate--r-39.8%
metadata-eval39.8%
Simplified39.8%
Taylor expanded in z around inf 39.7%
associate-/l*42.1%
Simplified42.1%
if -1.1e7 < z < -5.30000000000000018e-131 or 4.4999999999999998e-278 < z < 1Initial program 95.9%
Taylor expanded in y around 0 45.2%
mul-1-neg45.2%
*-commutative45.2%
associate-/l*45.2%
distribute-rgt-neg-out45.2%
distribute-neg-frac245.2%
neg-sub045.2%
associate--r-45.2%
metadata-eval45.2%
Simplified45.2%
Taylor expanded in z around 0 44.0%
neg-mul-144.0%
Simplified44.0%
Final simplification42.6%
(FPCore (x y z t)
:precision binary64
(if (or (<= t -1.14e+151)
(not
(or (<= t -6.8e+107) (and (not (<= t -1.1e+69)) (<= t 4.5e+173)))))
(* x (/ t z))
(* x (/ y z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.14e+151) || !((t <= -6.8e+107) || (!(t <= -1.1e+69) && (t <= 4.5e+173)))) {
tmp = x * (t / z);
} else {
tmp = x * (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 <= (-1.14d+151)) .or. (.not. (t <= (-6.8d+107)) .or. (.not. (t <= (-1.1d+69))) .and. (t <= 4.5d+173))) then
tmp = x * (t / z)
else
tmp = x * (y / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.14e+151) || !((t <= -6.8e+107) || (!(t <= -1.1e+69) && (t <= 4.5e+173)))) {
tmp = x * (t / z);
} else {
tmp = x * (y / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -1.14e+151) or not ((t <= -6.8e+107) or (not (t <= -1.1e+69) and (t <= 4.5e+173))): tmp = x * (t / z) else: tmp = x * (y / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -1.14e+151) || !((t <= -6.8e+107) || (!(t <= -1.1e+69) && (t <= 4.5e+173)))) tmp = Float64(x * Float64(t / z)); else tmp = Float64(x * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -1.14e+151) || ~(((t <= -6.8e+107) || (~((t <= -1.1e+69)) && (t <= 4.5e+173))))) tmp = x * (t / z); else tmp = x * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -1.14e+151], N[Not[Or[LessEqual[t, -6.8e+107], And[N[Not[LessEqual[t, -1.1e+69]], $MachinePrecision], LessEqual[t, 4.5e+173]]]], $MachinePrecision]], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.14 \cdot 10^{+151} \lor \neg \left(t \leq -6.8 \cdot 10^{+107} \lor \neg \left(t \leq -1.1 \cdot 10^{+69}\right) \land t \leq 4.5 \cdot 10^{+173}\right):\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\end{array}
\end{array}
if t < -1.14000000000000004e151 or -6.7999999999999994e107 < t < -1.1000000000000001e69 or 4.5000000000000002e173 < t Initial program 98.4%
Taylor expanded in y around 0 70.4%
mul-1-neg70.4%
*-commutative70.4%
associate-/l*80.5%
distribute-rgt-neg-out80.5%
distribute-neg-frac280.5%
neg-sub080.5%
associate--r-80.5%
metadata-eval80.5%
Simplified80.5%
Taylor expanded in z around inf 65.1%
if -1.14000000000000004e151 < t < -6.7999999999999994e107 or -1.1000000000000001e69 < t < 4.5000000000000002e173Initial program 94.7%
Taylor expanded in y around inf 78.0%
associate-*r/81.6%
Simplified81.6%
Final simplification76.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (/ z t))))
(if (<= t -3.2e+151)
t_1
(if (<= t -5.2e+78)
(/ (* x y) z)
(if (or (<= t -1.15e+69) (not (<= t 5e+172))) t_1 (/ x (/ z y)))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (z / t);
double tmp;
if (t <= -3.2e+151) {
tmp = t_1;
} else if (t <= -5.2e+78) {
tmp = (x * y) / z;
} else if ((t <= -1.15e+69) || !(t <= 5e+172)) {
tmp = t_1;
} else {
tmp = x / (z / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x / (z / t)
if (t <= (-3.2d+151)) then
tmp = t_1
else if (t <= (-5.2d+78)) then
tmp = (x * y) / z
else if ((t <= (-1.15d+69)) .or. (.not. (t <= 5d+172))) then
tmp = t_1
else
tmp = x / (z / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x / (z / t);
double tmp;
if (t <= -3.2e+151) {
tmp = t_1;
} else if (t <= -5.2e+78) {
tmp = (x * y) / z;
} else if ((t <= -1.15e+69) || !(t <= 5e+172)) {
tmp = t_1;
} else {
tmp = x / (z / y);
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (z / t) tmp = 0 if t <= -3.2e+151: tmp = t_1 elif t <= -5.2e+78: tmp = (x * y) / z elif (t <= -1.15e+69) or not (t <= 5e+172): tmp = t_1 else: tmp = x / (z / y) return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(z / t)) tmp = 0.0 if (t <= -3.2e+151) tmp = t_1; elseif (t <= -5.2e+78) tmp = Float64(Float64(x * y) / z); elseif ((t <= -1.15e+69) || !(t <= 5e+172)) tmp = t_1; else tmp = Float64(x / Float64(z / y)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (z / t); tmp = 0.0; if (t <= -3.2e+151) tmp = t_1; elseif (t <= -5.2e+78) tmp = (x * y) / z; elseif ((t <= -1.15e+69) || ~((t <= 5e+172))) tmp = t_1; else tmp = x / (z / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.2e+151], t$95$1, If[LessEqual[t, -5.2e+78], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], If[Or[LessEqual[t, -1.15e+69], N[Not[LessEqual[t, 5e+172]], $MachinePrecision]], t$95$1, N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{z}{t}}\\
\mathbf{if}\;t \leq -3.2 \cdot 10^{+151}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -5.2 \cdot 10^{+78}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;t \leq -1.15 \cdot 10^{+69} \lor \neg \left(t \leq 5 \cdot 10^{+172}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\end{array}
\end{array}
if t < -3.19999999999999994e151 or -5.2e78 < t < -1.15000000000000008e69 or 5.0000000000000001e172 < t Initial program 99.7%
Taylor expanded in z around inf 63.5%
*-commutative63.5%
associate-/l*63.3%
cancel-sign-sub-inv63.3%
metadata-eval63.3%
*-lft-identity63.3%
+-commutative63.3%
Simplified63.3%
Taylor expanded in t around inf 56.5%
associate-/l*56.4%
*-commutative56.4%
associate-/r/67.3%
Simplified67.3%
if -3.19999999999999994e151 < t < -5.2e78Initial program 92.7%
Taylor expanded in y around inf 70.2%
if -1.15000000000000008e69 < t < 5.0000000000000001e172Initial program 94.4%
Taylor expanded in y around inf 92.8%
Taylor expanded in y around inf 77.9%
associate-*l/79.5%
associate-/r/81.8%
Simplified81.8%
Final simplification77.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ t z))) (t_2 (* x (- t))))
(if (<= z -11000000.0)
t_1
(if (<= z -1.1e-130)
t_2
(if (<= z 2.55e-282) (* t (/ x z)) (if (<= z 1.0) t_2 t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t / z);
double t_2 = x * -t;
double tmp;
if (z <= -11000000.0) {
tmp = t_1;
} else if (z <= -1.1e-130) {
tmp = t_2;
} else if (z <= 2.55e-282) {
tmp = t * (x / z);
} else if (z <= 1.0) {
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 * (t / z)
t_2 = x * -t
if (z <= (-11000000.0d0)) then
tmp = t_1
else if (z <= (-1.1d-130)) then
tmp = t_2
else if (z <= 2.55d-282) then
tmp = t * (x / z)
else if (z <= 1.0d0) 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 * (t / z);
double t_2 = x * -t;
double tmp;
if (z <= -11000000.0) {
tmp = t_1;
} else if (z <= -1.1e-130) {
tmp = t_2;
} else if (z <= 2.55e-282) {
tmp = t * (x / z);
} else if (z <= 1.0) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t / z) t_2 = x * -t tmp = 0 if z <= -11000000.0: tmp = t_1 elif z <= -1.1e-130: tmp = t_2 elif z <= 2.55e-282: tmp = t * (x / z) elif z <= 1.0: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t / z)) t_2 = Float64(x * Float64(-t)) tmp = 0.0 if (z <= -11000000.0) tmp = t_1; elseif (z <= -1.1e-130) tmp = t_2; elseif (z <= 2.55e-282) tmp = Float64(t * Float64(x / z)); elseif (z <= 1.0) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (t / z); t_2 = x * -t; tmp = 0.0; if (z <= -11000000.0) tmp = t_1; elseif (z <= -1.1e-130) tmp = t_2; elseif (z <= 2.55e-282) tmp = t * (x / z); elseif (z <= 1.0) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * (-t)), $MachinePrecision]}, If[LessEqual[z, -11000000.0], t$95$1, If[LessEqual[z, -1.1e-130], t$95$2, If[LessEqual[z, 2.55e-282], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.0], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z}\\
t_2 := x \cdot \left(-t\right)\\
\mathbf{if}\;z \leq -11000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{-130}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 2.55 \cdot 10^{-282}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.1e7 or 1 < z Initial program 97.0%
Taylor expanded in y around 0 48.2%
mul-1-neg48.2%
*-commutative48.2%
associate-/l*53.5%
distribute-rgt-neg-out53.5%
distribute-neg-frac253.5%
neg-sub053.5%
associate--r-53.5%
metadata-eval53.5%
Simplified53.5%
Taylor expanded in z around inf 52.7%
if -1.1e7 < z < -1.0999999999999999e-130 or 2.54999999999999989e-282 < z < 1Initial program 95.9%
Taylor expanded in y around 0 45.2%
mul-1-neg45.2%
*-commutative45.2%
associate-/l*45.2%
distribute-rgt-neg-out45.2%
distribute-neg-frac245.2%
neg-sub045.2%
associate--r-45.2%
metadata-eval45.2%
Simplified45.2%
Taylor expanded in z around 0 44.0%
neg-mul-144.0%
Simplified44.0%
if -1.0999999999999999e-130 < z < 2.54999999999999989e-282Initial program 91.7%
Taylor expanded in y around 0 10.6%
mul-1-neg10.6%
associate-/l*10.6%
distribute-rgt-neg-in10.6%
distribute-neg-frac210.6%
neg-sub010.6%
associate--r-10.6%
metadata-eval10.6%
Simplified10.6%
Taylor expanded in z around inf 16.7%
associate-/l*22.5%
Simplified22.5%
Final simplification44.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (/ z y))))
(if (<= z -7.8e+61)
t_1
(if (<= z 6200.0)
(* x (- (/ y z) t))
(if (<= z 1.75e+70) (/ x (/ z t)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = x / (z / y);
double tmp;
if (z <= -7.8e+61) {
tmp = t_1;
} else if (z <= 6200.0) {
tmp = x * ((y / z) - t);
} else if (z <= 1.75e+70) {
tmp = x / (z / t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x / (z / y)
if (z <= (-7.8d+61)) then
tmp = t_1
else if (z <= 6200.0d0) then
tmp = x * ((y / z) - t)
else if (z <= 1.75d+70) then
tmp = x / (z / t)
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 / y);
double tmp;
if (z <= -7.8e+61) {
tmp = t_1;
} else if (z <= 6200.0) {
tmp = x * ((y / z) - t);
} else if (z <= 1.75e+70) {
tmp = x / (z / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (z / y) tmp = 0 if z <= -7.8e+61: tmp = t_1 elif z <= 6200.0: tmp = x * ((y / z) - t) elif z <= 1.75e+70: tmp = x / (z / t) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(z / y)) tmp = 0.0 if (z <= -7.8e+61) tmp = t_1; elseif (z <= 6200.0) tmp = Float64(x * Float64(Float64(y / z) - t)); elseif (z <= 1.75e+70) tmp = Float64(x / Float64(z / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (z / y); tmp = 0.0; if (z <= -7.8e+61) tmp = t_1; elseif (z <= 6200.0) tmp = x * ((y / z) - t); elseif (z <= 1.75e+70) tmp = x / (z / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.8e+61], t$95$1, If[LessEqual[z, 6200.0], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.75e+70], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{z}{y}}\\
\mathbf{if}\;z \leq -7.8 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6200:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{+70}:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.79999999999999975e61 or 1.75000000000000001e70 < z Initial program 96.1%
Taylor expanded in y around inf 89.6%
Taylor expanded in y around inf 58.8%
associate-*l/58.7%
associate-/r/68.1%
Simplified68.1%
if -7.79999999999999975e61 < z < 6200Initial program 95.0%
Taylor expanded in z around 0 90.4%
if 6200 < z < 1.75000000000000001e70Initial program 99.4%
Taylor expanded in z around inf 90.0%
*-commutative90.0%
associate-/l*89.8%
cancel-sign-sub-inv89.8%
metadata-eval89.8%
*-lft-identity89.8%
+-commutative89.8%
Simplified89.8%
Taylor expanded in t around inf 76.5%
associate-/l*76.0%
*-commutative76.0%
associate-/r/81.6%
Simplified81.6%
Final simplification80.8%
(FPCore (x y z t) :precision binary64 (if (or (<= t -8.2e+68) (not (<= t 1.6e+46))) (* t (/ x (+ z -1.0))) (/ x (/ z y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -8.2e+68) || !(t <= 1.6e+46)) {
tmp = t * (x / (z + -1.0));
} else {
tmp = x / (z / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((t <= (-8.2d+68)) .or. (.not. (t <= 1.6d+46))) then
tmp = t * (x / (z + (-1.0d0)))
else
tmp = x / (z / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -8.2e+68) || !(t <= 1.6e+46)) {
tmp = t * (x / (z + -1.0));
} else {
tmp = x / (z / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -8.2e+68) or not (t <= 1.6e+46): tmp = t * (x / (z + -1.0)) else: tmp = x / (z / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -8.2e+68) || !(t <= 1.6e+46)) tmp = Float64(t * Float64(x / Float64(z + -1.0))); else tmp = Float64(x / Float64(z / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -8.2e+68) || ~((t <= 1.6e+46))) tmp = t * (x / (z + -1.0)); else tmp = x / (z / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -8.2e+68], N[Not[LessEqual[t, 1.6e+46]], $MachinePrecision]], N[(t * N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.2 \cdot 10^{+68} \lor \neg \left(t \leq 1.6 \cdot 10^{+46}\right):\\
\;\;\;\;t \cdot \frac{x}{z + -1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\end{array}
\end{array}
if t < -8.1999999999999998e68 or 1.5999999999999999e46 < t Initial program 96.9%
Taylor expanded in y around 0 63.9%
mul-1-neg63.9%
associate-/l*64.6%
distribute-rgt-neg-in64.6%
distribute-neg-frac264.6%
neg-sub064.6%
associate--r-64.6%
metadata-eval64.6%
Simplified64.6%
if -8.1999999999999998e68 < t < 1.5999999999999999e46Initial program 95.0%
Taylor expanded in y around inf 94.9%
Taylor expanded in y around inf 83.1%
associate-*l/84.9%
associate-/r/88.1%
Simplified88.1%
Final simplification78.8%
(FPCore (x y z t) :precision binary64 (if (or (<= t -2.6e+68) (not (<= t 1.9e+46))) (* x (/ t (+ z -1.0))) (/ x (/ z y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -2.6e+68) || !(t <= 1.9e+46)) {
tmp = x * (t / (z + -1.0));
} else {
tmp = x / (z / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((t <= (-2.6d+68)) .or. (.not. (t <= 1.9d+46))) then
tmp = x * (t / (z + (-1.0d0)))
else
tmp = x / (z / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -2.6e+68) || !(t <= 1.9e+46)) {
tmp = x * (t / (z + -1.0));
} else {
tmp = x / (z / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -2.6e+68) or not (t <= 1.9e+46): tmp = x * (t / (z + -1.0)) else: tmp = x / (z / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -2.6e+68) || !(t <= 1.9e+46)) tmp = Float64(x * Float64(t / Float64(z + -1.0))); else tmp = Float64(x / Float64(z / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -2.6e+68) || ~((t <= 1.9e+46))) tmp = x * (t / (z + -1.0)); else tmp = x / (z / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -2.6e+68], N[Not[LessEqual[t, 1.9e+46]], $MachinePrecision]], N[(x * N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.6 \cdot 10^{+68} \lor \neg \left(t \leq 1.9 \cdot 10^{+46}\right):\\
\;\;\;\;x \cdot \frac{t}{z + -1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\end{array}
\end{array}
if t < -2.5999999999999998e68 or 1.9e46 < t Initial program 96.9%
Taylor expanded in y around 0 63.9%
mul-1-neg63.9%
*-commutative63.9%
associate-/l*71.9%
distribute-rgt-neg-out71.9%
distribute-neg-frac271.9%
neg-sub071.9%
associate--r-71.9%
metadata-eval71.9%
Simplified71.9%
if -2.5999999999999998e68 < t < 1.9e46Initial program 95.0%
Taylor expanded in y around inf 94.9%
Taylor expanded in y around inf 83.1%
associate-*l/84.9%
associate-/r/88.1%
Simplified88.1%
Final simplification81.7%
(FPCore (x y z t) :precision binary64 (if (or (<= z -11000000.0) (not (<= z 0.018))) (* (+ y t) (/ x z)) (* x (- (/ y z) t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -11000000.0) || !(z <= 0.018)) {
tmp = (y + t) * (x / z);
} else {
tmp = x * ((y / z) - t);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-11000000.0d0)) .or. (.not. (z <= 0.018d0))) then
tmp = (y + t) * (x / z)
else
tmp = x * ((y / z) - t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -11000000.0) || !(z <= 0.018)) {
tmp = (y + t) * (x / z);
} else {
tmp = x * ((y / z) - t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -11000000.0) or not (z <= 0.018): tmp = (y + t) * (x / z) else: tmp = x * ((y / z) - t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -11000000.0) || !(z <= 0.018)) tmp = Float64(Float64(y + t) * Float64(x / z)); else tmp = Float64(x * Float64(Float64(y / z) - t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -11000000.0) || ~((z <= 0.018))) tmp = (y + t) * (x / z); else tmp = x * ((y / z) - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -11000000.0], N[Not[LessEqual[z, 0.018]], $MachinePrecision]], N[(N[(y + t), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -11000000 \lor \neg \left(z \leq 0.018\right):\\
\;\;\;\;\left(y + t\right) \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\end{array}
\end{array}
if z < -1.1e7 or 0.0179999999999999986 < z Initial program 97.0%
Taylor expanded in z around inf 84.1%
*-commutative84.1%
associate-/l*85.3%
cancel-sign-sub-inv85.3%
metadata-eval85.3%
*-lft-identity85.3%
+-commutative85.3%
Simplified85.3%
if -1.1e7 < z < 0.0179999999999999986Initial program 94.2%
Taylor expanded in z around 0 93.5%
Final simplification89.0%
(FPCore (x y z t) :precision binary64 (* x (- t)))
double code(double x, double y, double z, double t) {
return x * -t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x * -t
end function
public static double code(double x, double y, double z, double t) {
return x * -t;
}
def code(x, y, z, t): return x * -t
function code(x, y, z, t) return Float64(x * Float64(-t)) end
function tmp = code(x, y, z, t) tmp = x * -t; end
code[x_, y_, z_, t_] := N[(x * (-t)), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(-t\right)
\end{array}
Initial program 95.8%
Taylor expanded in y around 0 40.6%
mul-1-neg40.6%
*-commutative40.6%
associate-/l*43.5%
distribute-rgt-neg-out43.5%
distribute-neg-frac243.5%
neg-sub043.5%
associate--r-43.5%
metadata-eval43.5%
Simplified43.5%
Taylor expanded in z around 0 20.0%
neg-mul-120.0%
Simplified20.0%
Final simplification20.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (- (/ y z) (* t (/ 1.0 (- 1.0 z))))))
(t_2 (* x (- (/ y z) (/ t (- 1.0 z))))))
(if (< t_2 -7.623226303312042e-196)
t_1
(if (< t_2 1.4133944927702302e-211)
(+ (/ (* y x) z) (- (/ (* t x) (- 1.0 z))))
t_1))))
double code(double x, double y, double z, double t) {
double t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z))));
double t_2 = x * ((y / z) - (t / (1.0 - z)));
double tmp;
if (t_2 < -7.623226303312042e-196) {
tmp = t_1;
} else if (t_2 < 1.4133944927702302e-211) {
tmp = ((y * x) / z) + -((t * x) / (1.0 - z));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * ((y / z) - (t * (1.0d0 / (1.0d0 - z))))
t_2 = x * ((y / z) - (t / (1.0d0 - z)))
if (t_2 < (-7.623226303312042d-196)) then
tmp = t_1
else if (t_2 < 1.4133944927702302d-211) then
tmp = ((y * x) / z) + -((t * x) / (1.0d0 - z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z))));
double t_2 = x * ((y / z) - (t / (1.0 - z)));
double tmp;
if (t_2 < -7.623226303312042e-196) {
tmp = t_1;
} else if (t_2 < 1.4133944927702302e-211) {
tmp = ((y * x) / z) + -((t * x) / (1.0 - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z)))) t_2 = x * ((y / z) - (t / (1.0 - z))) tmp = 0 if t_2 < -7.623226303312042e-196: tmp = t_1 elif t_2 < 1.4133944927702302e-211: tmp = ((y * x) / z) + -((t * x) / (1.0 - z)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(Float64(y / z) - Float64(t * Float64(1.0 / Float64(1.0 - z))))) t_2 = Float64(x * Float64(Float64(y / z) - Float64(t / Float64(1.0 - z)))) tmp = 0.0 if (t_2 < -7.623226303312042e-196) tmp = t_1; elseif (t_2 < 1.4133944927702302e-211) tmp = Float64(Float64(Float64(y * x) / z) + Float64(-Float64(Float64(t * x) / Float64(1.0 - z)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z)))); t_2 = x * ((y / z) - (t / (1.0 - z))); tmp = 0.0; if (t_2 < -7.623226303312042e-196) tmp = t_1; elseif (t_2 < 1.4133944927702302e-211) tmp = ((y * x) / z) + -((t * x) / (1.0 - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(y / z), $MachinePrecision] - N[(t * N[(1.0 / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(y / z), $MachinePrecision] - N[(t / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$2, -7.623226303312042e-196], t$95$1, If[Less[t$95$2, 1.4133944927702302e-211], N[(N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision] + (-N[(N[(t * x), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision])), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(\frac{y}{z} - t \cdot \frac{1}{1 - z}\right)\\
t_2 := x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)\\
\mathbf{if}\;t\_2 < -7.623226303312042 \cdot 10^{-196}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 < 1.4133944927702302 \cdot 10^{-211}:\\
\;\;\;\;\frac{y \cdot x}{z} + \left(-\frac{t \cdot x}{1 - z}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024066
(FPCore (x y z t)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, C"
:precision binary64
:alt
(if (< (* x (- (/ y z) (/ t (- 1.0 z)))) -7.623226303312042e-196) (* x (- (/ y z) (* t (/ 1.0 (- 1.0 z))))) (if (< (* x (- (/ y z) (/ t (- 1.0 z)))) 1.4133944927702302e-211) (+ (/ (* y x) z) (- (/ (* t x) (- 1.0 z)))) (* x (- (/ y z) (* t (/ 1.0 (- 1.0 z)))))))
(* x (- (/ y z) (/ t (- 1.0 z)))))