
(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 9 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 (/ (- 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}
Initial program 80.0%
associate-/l*96.8%
Simplified96.8%
clear-num96.7%
un-div-inv97.1%
Applied egg-rr97.1%
Final simplification97.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y z)))))
(if (<= z -3.8e-60)
t_1
(if (<= z 7.4e-30)
(/ x (/ t y))
(if (<= z 5.8e+91) t_1 (* x (/ z (- z t))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - (y / z));
double tmp;
if (z <= -3.8e-60) {
tmp = t_1;
} else if (z <= 7.4e-30) {
tmp = x / (t / y);
} else if (z <= 5.8e+91) {
tmp = t_1;
} else {
tmp = x * (z / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x * (1.0d0 - (y / z))
if (z <= (-3.8d-60)) then
tmp = t_1
else if (z <= 7.4d-30) then
tmp = x / (t / y)
else if (z <= 5.8d+91) then
tmp = t_1
else
tmp = x * (z / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - (y / z));
double tmp;
if (z <= -3.8e-60) {
tmp = t_1;
} else if (z <= 7.4e-30) {
tmp = x / (t / y);
} else if (z <= 5.8e+91) {
tmp = t_1;
} else {
tmp = x * (z / (z - t));
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (1.0 - (y / z)) tmp = 0 if z <= -3.8e-60: tmp = t_1 elif z <= 7.4e-30: tmp = x / (t / y) elif z <= 5.8e+91: tmp = t_1 else: tmp = x * (z / (z - t)) return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -3.8e-60) tmp = t_1; elseif (z <= 7.4e-30) tmp = Float64(x / Float64(t / y)); elseif (z <= 5.8e+91) tmp = t_1; else tmp = Float64(x * Float64(z / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (1.0 - (y / z)); tmp = 0.0; if (z <= -3.8e-60) tmp = t_1; elseif (z <= 7.4e-30) tmp = x / (t / y); elseif (z <= 5.8e+91) tmp = t_1; else tmp = x * (z / (z - t)); 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, -3.8e-60], t$95$1, If[LessEqual[z, 7.4e-30], N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e+91], t$95$1, N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{-60}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7.4 \cdot 10^{-30}:\\
\;\;\;\;\frac{x}{\frac{t}{y}}\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{z}{z - t}\\
\end{array}
\end{array}
if z < -3.79999999999999994e-60 or 7.4000000000000006e-30 < z < 5.80000000000000028e91Initial program 78.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t around 0 50.9%
mul-1-neg50.9%
associate-/l*65.6%
distribute-rgt-neg-in65.6%
distribute-frac-neg65.6%
neg-sub065.6%
associate--r-65.6%
neg-sub065.6%
+-commutative65.6%
sub-neg65.6%
div-sub65.6%
*-inverses65.6%
Simplified65.6%
if -3.79999999999999994e-60 < z < 7.4000000000000006e-30Initial program 92.2%
associate-/l*92.2%
Simplified92.2%
clear-num92.1%
un-div-inv92.8%
Applied egg-rr92.8%
Taylor expanded in z around 0 75.6%
if 5.80000000000000028e91 < z Initial program 61.1%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around 0 55.7%
mul-1-neg55.7%
distribute-neg-frac255.7%
neg-sub055.7%
associate--r-55.7%
neg-sub055.7%
+-commutative55.7%
sub-neg55.7%
associate-/l*87.8%
Simplified87.8%
Final simplification74.4%
(FPCore (x y z t) :precision binary64 (if (or (<= z -3.2e-60) (not (<= z 2.15e-30))) (* x (- 1.0 (/ y z))) (/ x (/ t y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.2e-60) || !(z <= 2.15e-30)) {
tmp = x * (1.0 - (y / z));
} else {
tmp = x / (t / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-3.2d-60)) .or. (.not. (z <= 2.15d-30))) then
tmp = x * (1.0d0 - (y / z))
else
tmp = x / (t / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.2e-60) || !(z <= 2.15e-30)) {
tmp = x * (1.0 - (y / z));
} else {
tmp = x / (t / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -3.2e-60) or not (z <= 2.15e-30): tmp = x * (1.0 - (y / z)) else: tmp = x / (t / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -3.2e-60) || !(z <= 2.15e-30)) tmp = Float64(x * Float64(1.0 - Float64(y / z))); else tmp = Float64(x / Float64(t / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -3.2e-60) || ~((z <= 2.15e-30))) tmp = x * (1.0 - (y / z)); else tmp = x / (t / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -3.2e-60], N[Not[LessEqual[z, 2.15e-30]], $MachinePrecision]], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{-60} \lor \neg \left(z \leq 2.15 \cdot 10^{-30}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{t}{y}}\\
\end{array}
\end{array}
if z < -3.2000000000000001e-60 or 2.14999999999999983e-30 < z Initial program 72.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t around 0 47.9%
mul-1-neg47.9%
associate-/l*70.7%
distribute-rgt-neg-in70.7%
distribute-frac-neg70.7%
neg-sub070.7%
associate--r-70.7%
neg-sub070.7%
+-commutative70.7%
sub-neg70.7%
div-sub70.7%
*-inverses70.7%
Simplified70.7%
if -3.2000000000000001e-60 < z < 2.14999999999999983e-30Initial program 92.2%
associate-/l*92.2%
Simplified92.2%
clear-num92.1%
un-div-inv92.8%
Applied egg-rr92.8%
Taylor expanded in z around 0 75.6%
Final simplification72.6%
(FPCore (x y z t) :precision binary64 (if (or (<= t -2.35e-58) (not (<= t 6e-105))) (* x (/ (- y z) t)) (* x (- 1.0 (/ y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -2.35e-58) || !(t <= 6e-105)) {
tmp = x * ((y - z) / t);
} else {
tmp = x * (1.0 - (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 <= (-2.35d-58)) .or. (.not. (t <= 6d-105))) then
tmp = x * ((y - z) / t)
else
tmp = x * (1.0d0 - (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -2.35e-58) || !(t <= 6e-105)) {
tmp = x * ((y - z) / t);
} else {
tmp = x * (1.0 - (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -2.35e-58) or not (t <= 6e-105): tmp = x * ((y - z) / t) else: tmp = x * (1.0 - (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -2.35e-58) || !(t <= 6e-105)) tmp = Float64(x * Float64(Float64(y - z) / t)); else tmp = Float64(x * Float64(1.0 - Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -2.35e-58) || ~((t <= 6e-105))) tmp = x * ((y - z) / t); else tmp = x * (1.0 - (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -2.35e-58], N[Not[LessEqual[t, 6e-105]], $MachinePrecision]], N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.35 \cdot 10^{-58} \lor \neg \left(t \leq 6 \cdot 10^{-105}\right):\\
\;\;\;\;x \cdot \frac{y - z}{t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\end{array}
\end{array}
if t < -2.34999999999999997e-58 or 6.0000000000000002e-105 < t Initial program 82.3%
associate-/l*96.4%
Simplified96.4%
Taylor expanded in t around inf 65.9%
associate-/l*69.6%
Simplified69.6%
if -2.34999999999999997e-58 < t < 6.0000000000000002e-105Initial program 75.8%
associate-/l*97.7%
Simplified97.7%
Taylor expanded in t around 0 67.3%
mul-1-neg67.3%
associate-/l*89.6%
distribute-rgt-neg-in89.6%
distribute-frac-neg89.6%
neg-sub089.6%
associate--r-89.6%
neg-sub089.6%
+-commutative89.6%
sub-neg89.6%
div-sub89.6%
*-inverses89.6%
Simplified89.6%
Final simplification76.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.12e+108) (not (<= y 3.1e-8))) (/ x (/ (- t z) y)) (* x (/ z (- z t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.12e+108) || !(y <= 3.1e-8)) {
tmp = x / ((t - z) / y);
} else {
tmp = x * (z / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.12d+108)) .or. (.not. (y <= 3.1d-8))) then
tmp = x / ((t - z) / y)
else
tmp = x * (z / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.12e+108) || !(y <= 3.1e-8)) {
tmp = x / ((t - z) / y);
} else {
tmp = x * (z / (z - t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.12e+108) or not (y <= 3.1e-8): tmp = x / ((t - z) / y) else: tmp = x * (z / (z - t)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.12e+108) || !(y <= 3.1e-8)) tmp = Float64(x / Float64(Float64(t - z) / y)); else tmp = Float64(x * Float64(z / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.12e+108) || ~((y <= 3.1e-8))) tmp = x / ((t - z) / y); else tmp = x * (z / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.12e+108], N[Not[LessEqual[y, 3.1e-8]], $MachinePrecision]], N[(x / N[(N[(t - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.12 \cdot 10^{+108} \lor \neg \left(y \leq 3.1 \cdot 10^{-8}\right):\\
\;\;\;\;\frac{x}{\frac{t - z}{y}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{z}{z - t}\\
\end{array}
\end{array}
if y < -1.11999999999999994e108 or 3.1e-8 < y Initial program 80.5%
associate-/l*96.9%
Simplified96.9%
clear-num96.7%
un-div-inv97.4%
Applied egg-rr97.4%
Taylor expanded in y around inf 79.9%
if -1.11999999999999994e108 < y < 3.1e-8Initial program 79.5%
associate-/l*96.8%
Simplified96.8%
Taylor expanded in y around 0 67.6%
mul-1-neg67.6%
distribute-neg-frac267.6%
neg-sub067.6%
associate--r-67.6%
neg-sub067.6%
+-commutative67.6%
sub-neg67.6%
associate-/l*84.9%
Simplified84.9%
Final simplification82.3%
(FPCore (x y z t) :precision binary64 (if (<= z -5.5e+117) x (if (<= z 4.1e+71) (* x (/ y t)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -5.5e+117) {
tmp = x;
} else if (z <= 4.1e+71) {
tmp = x * (y / 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 <= (-5.5d+117)) then
tmp = x
else if (z <= 4.1d+71) then
tmp = x * (y / 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 <= -5.5e+117) {
tmp = x;
} else if (z <= 4.1e+71) {
tmp = x * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -5.5e+117: tmp = x elif z <= 4.1e+71: tmp = x * (y / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -5.5e+117) tmp = x; elseif (z <= 4.1e+71) tmp = Float64(x * Float64(y / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -5.5e+117) tmp = x; elseif (z <= 4.1e+71) tmp = x * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -5.5e+117], x, If[LessEqual[z, 4.1e+71], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{+117}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{+71}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -5.49999999999999965e117 or 4.1000000000000002e71 < z Initial program 61.4%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 68.6%
if -5.49999999999999965e117 < z < 4.1000000000000002e71Initial program 90.6%
associate-/l*95.1%
Simplified95.1%
Taylor expanded in z around 0 58.4%
associate-/l*60.7%
Simplified60.7%
Final simplification63.6%
(FPCore (x y z t) :precision binary64 (if (<= z -3.2e+120) x (if (<= z 1e+69) (/ x (/ t y)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.2e+120) {
tmp = x;
} else if (z <= 1e+69) {
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 <= (-3.2d+120)) then
tmp = x
else if (z <= 1d+69) 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 <= -3.2e+120) {
tmp = x;
} else if (z <= 1e+69) {
tmp = x / (t / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -3.2e+120: tmp = x elif z <= 1e+69: tmp = x / (t / y) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -3.2e+120) tmp = x; elseif (z <= 1e+69) 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 <= -3.2e+120) tmp = x; elseif (z <= 1e+69) tmp = x / (t / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -3.2e+120], x, If[LessEqual[z, 1e+69], N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+120}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 10^{+69}:\\
\;\;\;\;\frac{x}{\frac{t}{y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.19999999999999982e120 or 1.0000000000000001e69 < z Initial program 61.4%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 68.6%
if -3.19999999999999982e120 < z < 1.0000000000000001e69Initial program 90.6%
associate-/l*95.1%
Simplified95.1%
clear-num95.0%
un-div-inv95.5%
Applied egg-rr95.5%
Taylor expanded in z around 0 61.0%
Final simplification63.8%
(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 80.0%
associate-/l*96.8%
Simplified96.8%
Final simplification96.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 80.0%
associate-/l*96.8%
Simplified96.8%
Taylor expanded in z around inf 33.8%
Final simplification33.8%
(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 2024076
(FPCore (x y z t)
:name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
:precision binary64
:alt
(/ x (/ (- t z) (- y z)))
(/ (* x (- y z)) (- t z)))