
(FPCore (x y z t) :precision binary64 (/ (* x (- y z)) (- t z)))
double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - z);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x * (y - z)) / (t - z)
end function
public static double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - z);
}
def code(x, y, z, t): return (x * (y - z)) / (t - z)
function code(x, y, z, t) return Float64(Float64(x * Float64(y - z)) / Float64(t - z)) end
function tmp = code(x, y, z, t) tmp = (x * (y - z)) / (t - z); end
code[x_, y_, z_, t_] := N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot \left(y - z\right)}{t - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 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(Float64(x * Float64(y - z)) / Float64(t - z)) end
function tmp = code(x, y, z, t) tmp = (x * (y - z)) / (t - z); end
code[x_, y_, z_, t_] := N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot \left(y - z\right)}{t - z}
\end{array}
(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}
\\
x \cdot \frac{y - z}{t - z}
\end{array}
Initial program 82.0%
associate-*r/97.3%
Simplified97.3%
Final simplification97.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (/ x (- t)))))
(if (<= z -6.2e+63)
x
(if (<= z -7500.0)
t_1
(if (<= z -0.00021)
x
(if (<= z 6.2e-63) (/ x (/ t y)) (if (<= z 2.6e+58) t_1 x)))))))
double code(double x, double y, double z, double t) {
double t_1 = z * (x / -t);
double tmp;
if (z <= -6.2e+63) {
tmp = x;
} else if (z <= -7500.0) {
tmp = t_1;
} else if (z <= -0.00021) {
tmp = x;
} else if (z <= 6.2e-63) {
tmp = x / (t / y);
} else if (z <= 2.6e+58) {
tmp = t_1;
} else {
tmp = x;
}
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 = z * (x / -t)
if (z <= (-6.2d+63)) then
tmp = x
else if (z <= (-7500.0d0)) then
tmp = t_1
else if (z <= (-0.00021d0)) then
tmp = x
else if (z <= 6.2d-63) then
tmp = x / (t / y)
else if (z <= 2.6d+58) then
tmp = t_1
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = z * (x / -t);
double tmp;
if (z <= -6.2e+63) {
tmp = x;
} else if (z <= -7500.0) {
tmp = t_1;
} else if (z <= -0.00021) {
tmp = x;
} else if (z <= 6.2e-63) {
tmp = x / (t / y);
} else if (z <= 2.6e+58) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (x / -t) tmp = 0 if z <= -6.2e+63: tmp = x elif z <= -7500.0: tmp = t_1 elif z <= -0.00021: tmp = x elif z <= 6.2e-63: tmp = x / (t / y) elif z <= 2.6e+58: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(x / Float64(-t))) tmp = 0.0 if (z <= -6.2e+63) tmp = x; elseif (z <= -7500.0) tmp = t_1; elseif (z <= -0.00021) tmp = x; elseif (z <= 6.2e-63) tmp = Float64(x / Float64(t / y)); elseif (z <= 2.6e+58) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * (x / -t); tmp = 0.0; if (z <= -6.2e+63) tmp = x; elseif (z <= -7500.0) tmp = t_1; elseif (z <= -0.00021) tmp = x; elseif (z <= 6.2e-63) tmp = x / (t / y); elseif (z <= 2.6e+58) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * N[(x / (-t)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.2e+63], x, If[LessEqual[z, -7500.0], t$95$1, If[LessEqual[z, -0.00021], x, If[LessEqual[z, 6.2e-63], N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e+58], t$95$1, x]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{x}{-t}\\
\mathbf{if}\;z \leq -6.2 \cdot 10^{+63}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -7500:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -0.00021:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-63}:\\
\;\;\;\;\frac{x}{\frac{t}{y}}\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+58}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -6.2000000000000001e63 or -7500 < z < -2.1000000000000001e-4 or 2.59999999999999988e58 < z Initial program 66.2%
associate-*r/99.9%
Simplified99.9%
Taylor expanded in z around inf 62.3%
if -6.2000000000000001e63 < z < -7500 or 6.19999999999999968e-63 < z < 2.59999999999999988e58Initial program 96.9%
associate-/l*97.0%
Simplified97.0%
Taylor expanded in t around inf 70.3%
Taylor expanded in y around 0 60.6%
mul-1-neg60.6%
associate-*r/61.5%
distribute-rgt-neg-in61.5%
mul-1-neg61.5%
metadata-eval61.5%
times-frac61.5%
*-lft-identity61.5%
neg-mul-161.5%
Simplified61.5%
if -2.1000000000000001e-4 < z < 6.19999999999999968e-63Initial program 93.4%
associate-/l*93.8%
Simplified93.8%
Taylor expanded in z around 0 80.0%
Final simplification69.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (/ (- t) z))))
(if (<= z -2.9e+65)
x
(if (<= z -7000.0)
t_1
(if (<= z -0.017)
x
(if (<= z 4.2e-63) (/ x (/ t y)) (if (<= z 4.6e+153) t_1 x)))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (-t / z);
double tmp;
if (z <= -2.9e+65) {
tmp = x;
} else if (z <= -7000.0) {
tmp = t_1;
} else if (z <= -0.017) {
tmp = x;
} else if (z <= 4.2e-63) {
tmp = x / (t / y);
} else if (z <= 4.6e+153) {
tmp = t_1;
} else {
tmp = x;
}
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 / (-t / z)
if (z <= (-2.9d+65)) then
tmp = x
else if (z <= (-7000.0d0)) then
tmp = t_1
else if (z <= (-0.017d0)) then
tmp = x
else if (z <= 4.2d-63) then
tmp = x / (t / y)
else if (z <= 4.6d+153) then
tmp = t_1
else
tmp = x
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 tmp;
if (z <= -2.9e+65) {
tmp = x;
} else if (z <= -7000.0) {
tmp = t_1;
} else if (z <= -0.017) {
tmp = x;
} else if (z <= 4.2e-63) {
tmp = x / (t / y);
} else if (z <= 4.6e+153) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (-t / z) tmp = 0 if z <= -2.9e+65: tmp = x elif z <= -7000.0: tmp = t_1 elif z <= -0.017: tmp = x elif z <= 4.2e-63: tmp = x / (t / y) elif z <= 4.6e+153: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(Float64(-t) / z)) tmp = 0.0 if (z <= -2.9e+65) tmp = x; elseif (z <= -7000.0) tmp = t_1; elseif (z <= -0.017) tmp = x; elseif (z <= 4.2e-63) tmp = Float64(x / Float64(t / y)); elseif (z <= 4.6e+153) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (-t / z); tmp = 0.0; if (z <= -2.9e+65) tmp = x; elseif (z <= -7000.0) tmp = t_1; elseif (z <= -0.017) tmp = x; elseif (z <= 4.2e-63) tmp = x / (t / y); elseif (z <= 4.6e+153) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[((-t) / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.9e+65], x, If[LessEqual[z, -7000.0], t$95$1, If[LessEqual[z, -0.017], x, If[LessEqual[z, 4.2e-63], N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.6e+153], t$95$1, x]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{-t}{z}}\\
\mathbf{if}\;z \leq -2.9 \cdot 10^{+65}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -7000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -0.017:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-63}:\\
\;\;\;\;\frac{x}{\frac{t}{y}}\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{+153}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.9e65 or -7e3 < z < -0.017000000000000001 or 4.6000000000000003e153 < z Initial program 64.6%
associate-*r/99.9%
Simplified99.9%
Taylor expanded in z around inf 67.9%
if -2.9e65 < z < -7e3 or 4.2e-63 < z < 4.6000000000000003e153Initial program 90.2%
associate-/l*97.9%
Simplified97.9%
Taylor expanded in t around inf 64.0%
Taylor expanded in y around 0 53.6%
associate-*r/53.6%
neg-mul-153.6%
Simplified53.6%
if -0.017000000000000001 < z < 4.2e-63Initial program 93.4%
associate-/l*93.8%
Simplified93.8%
Taylor expanded in z around 0 80.0%
Final simplification70.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y z)))))
(if (<= z -5.5e-40)
t_1
(if (<= z 1.2e-71)
(/ (* x y) t)
(if (<= z 19000000000000.0) (/ (* x (- z)) t) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - (y / z));
double tmp;
if (z <= -5.5e-40) {
tmp = t_1;
} else if (z <= 1.2e-71) {
tmp = (x * y) / t;
} else if (z <= 19000000000000.0) {
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 * (1.0d0 - (y / z))
if (z <= (-5.5d-40)) then
tmp = t_1
else if (z <= 1.2d-71) then
tmp = (x * y) / t
else if (z <= 19000000000000.0d0) 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 * (1.0 - (y / z));
double tmp;
if (z <= -5.5e-40) {
tmp = t_1;
} else if (z <= 1.2e-71) {
tmp = (x * y) / t;
} else if (z <= 19000000000000.0) {
tmp = (x * -z) / t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (1.0 - (y / z)) tmp = 0 if z <= -5.5e-40: tmp = t_1 elif z <= 1.2e-71: tmp = (x * y) / t elif z <= 19000000000000.0: tmp = (x * -z) / t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -5.5e-40) tmp = t_1; elseif (z <= 1.2e-71) tmp = Float64(Float64(x * y) / t); elseif (z <= 19000000000000.0) tmp = Float64(Float64(x * Float64(-z)) / t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (1.0 - (y / z)); tmp = 0.0; if (z <= -5.5e-40) tmp = t_1; elseif (z <= 1.2e-71) tmp = (x * y) / t; elseif (z <= 19000000000000.0) 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[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.5e-40], t$95$1, If[LessEqual[z, 1.2e-71], N[(N[(x * y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 19000000000000.0], N[(N[(x * (-z)), $MachinePrecision] / t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -5.5 \cdot 10^{-40}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-71}:\\
\;\;\;\;\frac{x \cdot y}{t}\\
\mathbf{elif}\;z \leq 19000000000000:\\
\;\;\;\;\frac{x \cdot \left(-z\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -5.50000000000000002e-40 or 1.9e13 < z Initial program 69.6%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in t around 0 74.6%
associate-*r/74.6%
neg-mul-174.6%
neg-sub074.6%
associate--r-74.6%
neg-sub074.6%
Simplified74.6%
Taylor expanded in y around 0 74.6%
+-commutative74.6%
mul-1-neg74.6%
unsub-neg74.6%
Simplified74.6%
if -5.50000000000000002e-40 < z < 1.2e-71Initial program 95.7%
associate-*r/94.1%
Simplified94.1%
Taylor expanded in z around 0 82.1%
if 1.2e-71 < z < 1.9e13Initial program 94.2%
associate-/l*94.3%
Simplified94.3%
Taylor expanded in t around inf 83.0%
Taylor expanded in y around 0 68.2%
mul-1-neg68.2%
associate-*r/66.3%
distribute-rgt-neg-in66.3%
mul-1-neg66.3%
metadata-eval66.3%
times-frac66.3%
*-lft-identity66.3%
neg-mul-166.3%
Simplified66.3%
*-commutative66.3%
frac-2neg66.3%
remove-double-neg66.3%
associate-*l/68.2%
Applied egg-rr68.2%
Final simplification77.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y z)))))
(if (<= z -2.8e-8)
t_1
(if (<= z 2.75e-86)
(* x (/ y (- t z)))
(if (<= z 15000000000000.0) (* (- y z) (/ x t)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - (y / z));
double tmp;
if (z <= -2.8e-8) {
tmp = t_1;
} else if (z <= 2.75e-86) {
tmp = x * (y / (t - z));
} else if (z <= 15000000000000.0) {
tmp = (y - z) * (x / 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 * (1.0d0 - (y / z))
if (z <= (-2.8d-8)) then
tmp = t_1
else if (z <= 2.75d-86) then
tmp = x * (y / (t - z))
else if (z <= 15000000000000.0d0) then
tmp = (y - z) * (x / 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 * (1.0 - (y / z));
double tmp;
if (z <= -2.8e-8) {
tmp = t_1;
} else if (z <= 2.75e-86) {
tmp = x * (y / (t - z));
} else if (z <= 15000000000000.0) {
tmp = (y - z) * (x / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (1.0 - (y / z)) tmp = 0 if z <= -2.8e-8: tmp = t_1 elif z <= 2.75e-86: tmp = x * (y / (t - z)) elif z <= 15000000000000.0: tmp = (y - z) * (x / t) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -2.8e-8) tmp = t_1; elseif (z <= 2.75e-86) tmp = Float64(x * Float64(y / Float64(t - z))); elseif (z <= 15000000000000.0) tmp = Float64(Float64(y - z) * Float64(x / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (1.0 - (y / z)); tmp = 0.0; if (z <= -2.8e-8) tmp = t_1; elseif (z <= 2.75e-86) tmp = x * (y / (t - z)); elseif (z <= 15000000000000.0) tmp = (y - z) * (x / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.8e-8], t$95$1, If[LessEqual[z, 2.75e-86], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 15000000000000.0], N[(N[(y - z), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -2.8 \cdot 10^{-8}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.75 \cdot 10^{-86}:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\mathbf{elif}\;z \leq 15000000000000:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -2.7999999999999999e-8 or 1.5e13 < z Initial program 70.2%
associate-*r/99.9%
Simplified99.9%
Taylor expanded in t around 0 75.3%
associate-*r/75.3%
neg-mul-175.3%
neg-sub075.3%
associate--r-75.3%
neg-sub075.3%
Simplified75.3%
Taylor expanded in y around 0 75.3%
+-commutative75.3%
mul-1-neg75.3%
unsub-neg75.3%
Simplified75.3%
if -2.7999999999999999e-8 < z < 2.75e-86Initial program 94.0%
associate-*r/94.1%
Simplified94.1%
Taylor expanded in y around inf 86.6%
if 2.75e-86 < z < 1.5e13Initial program 95.1%
associate-*l/98.3%
Simplified98.3%
Taylor expanded in t around inf 88.6%
Final simplification81.0%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.15e-5) (not (<= z 1.4e+54))) (* x (- 1.0 (/ y z))) (* x (/ y (- t z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.15e-5) || !(z <= 1.4e+54)) {
tmp = x * (1.0 - (y / z));
} else {
tmp = x * (y / (t - z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-1.15d-5)) .or. (.not. (z <= 1.4d+54))) then
tmp = x * (1.0d0 - (y / z))
else
tmp = x * (y / (t - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.15e-5) || !(z <= 1.4e+54)) {
tmp = x * (1.0 - (y / z));
} else {
tmp = x * (y / (t - z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.15e-5) or not (z <= 1.4e+54): tmp = x * (1.0 - (y / z)) else: tmp = x * (y / (t - z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.15e-5) || !(z <= 1.4e+54)) tmp = Float64(x * Float64(1.0 - Float64(y / z))); else tmp = Float64(x * Float64(y / Float64(t - z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.15e-5) || ~((z <= 1.4e+54))) tmp = x * (1.0 - (y / z)); else tmp = x * (y / (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.15e-5], N[Not[LessEqual[z, 1.4e+54]], $MachinePrecision]], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{-5} \lor \neg \left(z \leq 1.4 \cdot 10^{+54}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\end{array}
\end{array}
if z < -1.15e-5 or 1.40000000000000008e54 < z Initial program 68.5%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in t around 0 77.0%
associate-*r/77.0%
neg-mul-177.0%
neg-sub077.0%
associate--r-77.0%
neg-sub077.0%
Simplified77.0%
Taylor expanded in y around 0 77.0%
+-commutative77.0%
mul-1-neg77.0%
unsub-neg77.0%
Simplified77.0%
if -1.15e-5 < z < 1.40000000000000008e54Initial program 94.4%
associate-*r/95.0%
Simplified95.0%
Taylor expanded in y around inf 80.9%
Final simplification79.0%
(FPCore (x y z t) :precision binary64 (if (or (<= z -3.1e-6) (not (<= z 3.7e+32))) (* x (- 1.0 (/ y z))) (/ x (/ t (- y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.1e-6) || !(z <= 3.7e+32)) {
tmp = x * (1.0 - (y / z));
} else {
tmp = x / (t / (y - z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-3.1d-6)) .or. (.not. (z <= 3.7d+32))) then
tmp = x * (1.0d0 - (y / z))
else
tmp = x / (t / (y - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.1e-6) || !(z <= 3.7e+32)) {
tmp = x * (1.0 - (y / z));
} else {
tmp = x / (t / (y - z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -3.1e-6) or not (z <= 3.7e+32): tmp = x * (1.0 - (y / z)) else: tmp = x / (t / (y - z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -3.1e-6) || !(z <= 3.7e+32)) tmp = Float64(x * Float64(1.0 - Float64(y / z))); else tmp = Float64(x / Float64(t / Float64(y - z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -3.1e-6) || ~((z <= 3.7e+32))) tmp = x * (1.0 - (y / z)); else tmp = x / (t / (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -3.1e-6], N[Not[LessEqual[z, 3.7e+32]], $MachinePrecision]], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{-6} \lor \neg \left(z \leq 3.7 \cdot 10^{+32}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{t}{y - z}}\\
\end{array}
\end{array}
if z < -3.1e-6 or 3.7e32 < z Initial program 69.5%
associate-*r/99.9%
Simplified99.9%
Taylor expanded in t around 0 76.2%
associate-*r/76.2%
neg-mul-176.2%
neg-sub076.2%
associate--r-76.2%
neg-sub076.2%
Simplified76.2%
Taylor expanded in y around 0 76.3%
+-commutative76.3%
mul-1-neg76.3%
unsub-neg76.3%
Simplified76.3%
if -3.1e-6 < z < 3.7e32Initial program 94.3%
associate-/l*93.9%
Simplified93.9%
Taylor expanded in t around inf 84.0%
Final simplification80.2%
(FPCore (x y z t) :precision binary64 (if (or (<= z -9e-40) (not (<= z 6.8e+32))) (* x (- 1.0 (/ y z))) (/ (* x (- y z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -9e-40) || !(z <= 6.8e+32)) {
tmp = x * (1.0 - (y / 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 <= (-9d-40)) .or. (.not. (z <= 6.8d+32))) then
tmp = x * (1.0d0 - (y / 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 <= -9e-40) || !(z <= 6.8e+32)) {
tmp = x * (1.0 - (y / z));
} else {
tmp = (x * (y - z)) / t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -9e-40) or not (z <= 6.8e+32): tmp = x * (1.0 - (y / z)) else: tmp = (x * (y - z)) / t return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -9e-40) || !(z <= 6.8e+32)) tmp = Float64(x * Float64(1.0 - Float64(y / z))); else tmp = Float64(Float64(x * Float64(y - z)) / t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -9e-40) || ~((z <= 6.8e+32))) tmp = x * (1.0 - (y / z)); else tmp = (x * (y - z)) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -9e-40], N[Not[LessEqual[z, 6.8e+32]], $MachinePrecision]], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{-40} \lor \neg \left(z \leq 6.8 \cdot 10^{+32}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left(y - z\right)}{t}\\
\end{array}
\end{array}
if z < -9.0000000000000002e-40 or 6.79999999999999957e32 < z Initial program 68.9%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in t around 0 75.5%
associate-*r/75.5%
neg-mul-175.5%
neg-sub075.5%
associate--r-75.5%
neg-sub075.5%
Simplified75.5%
Taylor expanded in y around 0 75.5%
+-commutative75.5%
mul-1-neg75.5%
unsub-neg75.5%
Simplified75.5%
if -9.0000000000000002e-40 < z < 6.79999999999999957e32Initial program 95.6%
associate-*r/94.6%
Simplified94.6%
Taylor expanded in t around inf 86.3%
Final simplification80.8%
(FPCore (x y z t) :precision binary64 (if (<= z -2.1e-36) (* x (- 1.0 (/ y z))) (if (<= z 28.0) (/ (* x (- y z)) t) (/ x (/ (- z t) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.1e-36) {
tmp = x * (1.0 - (y / z));
} else if (z <= 28.0) {
tmp = (x * (y - z)) / t;
} else {
tmp = x / ((z - t) / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-2.1d-36)) then
tmp = x * (1.0d0 - (y / z))
else if (z <= 28.0d0) then
tmp = (x * (y - z)) / t
else
tmp = x / ((z - t) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.1e-36) {
tmp = x * (1.0 - (y / z));
} else if (z <= 28.0) {
tmp = (x * (y - z)) / t;
} else {
tmp = x / ((z - t) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -2.1e-36: tmp = x * (1.0 - (y / z)) elif z <= 28.0: tmp = (x * (y - z)) / t else: tmp = x / ((z - t) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -2.1e-36) tmp = Float64(x * Float64(1.0 - Float64(y / z))); elseif (z <= 28.0) tmp = Float64(Float64(x * Float64(y - z)) / t); else tmp = Float64(x / Float64(Float64(z - t) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -2.1e-36) tmp = x * (1.0 - (y / z)); elseif (z <= 28.0) tmp = (x * (y - z)) / t; else tmp = x / ((z - t) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.1e-36], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 28.0], N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], N[(x / N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{-36}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{elif}\;z \leq 28:\\
\;\;\;\;\frac{x \cdot \left(y - z\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z - t}{z}}\\
\end{array}
\end{array}
if z < -2.09999999999999991e-36Initial program 69.0%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in t around 0 75.7%
associate-*r/75.7%
neg-mul-175.7%
neg-sub075.7%
associate--r-75.7%
neg-sub075.7%
Simplified75.7%
Taylor expanded in y around 0 75.8%
+-commutative75.8%
mul-1-neg75.8%
unsub-neg75.8%
Simplified75.8%
if -2.09999999999999991e-36 < z < 28Initial program 95.3%
associate-*r/94.3%
Simplified94.3%
Taylor expanded in t around inf 87.1%
if 28 < z Initial program 72.6%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in y around 0 77.0%
associate-*r/77.0%
neg-mul-177.0%
neg-sub077.0%
associate--r-77.0%
neg-sub077.0%
Simplified77.0%
Final simplification81.2%
(FPCore (x y z t) :precision binary64 (if (<= z -3.9e-63) x (if (<= z 7.5e-24) (* x (/ z t)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.9e-63) {
tmp = x;
} else if (z <= 7.5e-24) {
tmp = x * (z / t);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-3.9d-63)) then
tmp = x
else if (z <= 7.5d-24) then
tmp = x * (z / t)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.9e-63) {
tmp = x;
} else if (z <= 7.5e-24) {
tmp = x * (z / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -3.9e-63: tmp = x elif z <= 7.5e-24: tmp = x * (z / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -3.9e-63) tmp = x; elseif (z <= 7.5e-24) tmp = Float64(x * Float64(z / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -3.9e-63) tmp = x; elseif (z <= 7.5e-24) tmp = x * (z / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -3.9e-63], x, If[LessEqual[z, 7.5e-24], N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.9 \cdot 10^{-63}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{-24}:\\
\;\;\;\;x \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.90000000000000022e-63 or 7.50000000000000007e-24 < z Initial program 71.5%
associate-*r/99.9%
Simplified99.9%
Taylor expanded in z around inf 52.4%
if -3.90000000000000022e-63 < z < 7.50000000000000007e-24Initial program 95.2%
associate-/l*93.1%
Simplified93.1%
Taylor expanded in t around inf 85.1%
Taylor expanded in y around 0 25.5%
mul-1-neg25.5%
associate-*r/25.6%
distribute-rgt-neg-in25.6%
mul-1-neg25.6%
metadata-eval25.6%
times-frac25.6%
*-lft-identity25.6%
neg-mul-125.6%
Simplified25.6%
expm1-log1p-u23.6%
expm1-udef16.7%
add-sqr-sqrt7.6%
sqrt-unprod17.9%
sqr-neg17.9%
sqrt-unprod10.5%
add-sqr-sqrt19.7%
Applied egg-rr19.7%
expm1-def19.9%
expm1-log1p21.1%
associate-*r/17.0%
associate-*l/16.9%
*-commutative16.9%
Simplified16.9%
Final simplification36.7%
(FPCore (x y z t) :precision binary64 (if (<= z -4e-63) x (if (<= z 8e-24) (* z (/ x t)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4e-63) {
tmp = x;
} else if (z <= 8e-24) {
tmp = z * (x / t);
} else {
tmp = x;
}
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 <= (-4d-63)) then
tmp = x
else if (z <= 8d-24) then
tmp = z * (x / t)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4e-63) {
tmp = x;
} else if (z <= 8e-24) {
tmp = z * (x / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -4e-63: tmp = x elif z <= 8e-24: tmp = z * (x / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -4e-63) tmp = x; elseif (z <= 8e-24) tmp = Float64(z * Float64(x / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -4e-63) tmp = x; elseif (z <= 8e-24) tmp = z * (x / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -4e-63], x, If[LessEqual[z, 8e-24], N[(z * N[(x / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{-63}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 8 \cdot 10^{-24}:\\
\;\;\;\;z \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -4.00000000000000027e-63 or 7.99999999999999939e-24 < z Initial program 71.5%
associate-*r/99.9%
Simplified99.9%
Taylor expanded in z around inf 52.4%
if -4.00000000000000027e-63 < z < 7.99999999999999939e-24Initial program 95.2%
associate-/l*93.1%
Simplified93.1%
Taylor expanded in t around inf 85.1%
Taylor expanded in y around 0 25.5%
mul-1-neg25.5%
associate-*r/25.6%
distribute-rgt-neg-in25.6%
mul-1-neg25.6%
metadata-eval25.6%
times-frac25.6%
*-lft-identity25.6%
neg-mul-125.6%
Simplified25.6%
expm1-log1p-u23.6%
expm1-udef16.7%
add-sqr-sqrt7.6%
sqrt-unprod17.9%
sqr-neg17.9%
sqrt-unprod10.5%
add-sqr-sqrt19.7%
Applied egg-rr19.7%
expm1-def19.9%
expm1-log1p21.1%
Simplified21.1%
Final simplification38.6%
(FPCore (x y z t) :precision binary64 (if (<= z -0.0008) x (if (<= z 35000000000000.0) (* y (/ x t)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -0.0008) {
tmp = x;
} else if (z <= 35000000000000.0) {
tmp = y * (x / t);
} else {
tmp = x;
}
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 <= (-0.0008d0)) then
tmp = x
else if (z <= 35000000000000.0d0) then
tmp = y * (x / t)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -0.0008) {
tmp = x;
} else if (z <= 35000000000000.0) {
tmp = y * (x / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -0.0008: tmp = x elif z <= 35000000000000.0: tmp = y * (x / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -0.0008) tmp = x; elseif (z <= 35000000000000.0) tmp = Float64(y * Float64(x / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -0.0008) tmp = x; elseif (z <= 35000000000000.0) tmp = y * (x / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -0.0008], x, If[LessEqual[z, 35000000000000.0], N[(y * N[(x / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.0008:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 35000000000000:\\
\;\;\;\;y \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -8.00000000000000038e-4 or 3.5e13 < z Initial program 70.2%
associate-*r/99.9%
Simplified99.9%
Taylor expanded in z around inf 56.4%
if -8.00000000000000038e-4 < z < 3.5e13Initial program 94.1%
associate-/l*93.8%
Simplified93.8%
Taylor expanded in z around 0 74.9%
associate-/r/69.5%
Applied egg-rr69.5%
Final simplification62.9%
(FPCore (x y z t) :precision binary64 (if (<= z -1.2e-5) x (if (<= z 4.9e+54) (/ x (/ t y)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.2e-5) {
tmp = x;
} else if (z <= 4.9e+54) {
tmp = x / (t / y);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-1.2d-5)) then
tmp = x
else if (z <= 4.9d+54) then
tmp = x / (t / y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.2e-5) {
tmp = x;
} else if (z <= 4.9e+54) {
tmp = x / (t / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.2e-5: tmp = x elif z <= 4.9e+54: tmp = x / (t / y) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.2e-5) tmp = x; elseif (z <= 4.9e+54) tmp = Float64(x / Float64(t / y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.2e-5) tmp = x; elseif (z <= 4.9e+54) tmp = x / (t / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.2e-5], x, If[LessEqual[z, 4.9e+54], N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{-5}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 4.9 \cdot 10^{+54}:\\
\;\;\;\;\frac{x}{\frac{t}{y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.2e-5 or 4.90000000000000001e54 < z Initial program 68.5%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in z around inf 57.7%
if -1.2e-5 < z < 4.90000000000000001e54Initial program 94.4%
associate-/l*94.1%
Simplified94.1%
Taylor expanded in z around 0 73.3%
Final simplification65.8%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
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
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 82.0%
associate-*r/97.3%
Simplified97.3%
Taylor expanded in z around inf 31.9%
Final simplification31.9%
(FPCore (x y z t) :precision binary64 (/ x (/ (- t z) (- y z))))
double code(double x, double y, double z, double t) {
return x / ((t - z) / (y - z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x / ((t - z) / (y - z))
end function
public static double code(double x, double y, double z, double t) {
return x / ((t - z) / (y - z));
}
def code(x, y, z, t): return x / ((t - z) / (y - z))
function code(x, y, z, t) return Float64(x / Float64(Float64(t - z) / Float64(y - z))) end
function tmp = code(x, y, z, t) tmp = x / ((t - z) / (y - z)); end
code[x_, y_, z_, t_] := N[(x / N[(N[(t - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{\frac{t - z}{y - z}}
\end{array}
herbie shell --seed 2023200
(FPCore (x y z t)
:name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
:precision binary64
:herbie-target
(/ x (/ (- t z) (- y z)))
(/ (* x (- y z)) (- t z)))