
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * 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 - y) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t): return ((x - y) / (z - y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x - y) / Float64(z - y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x - y) / (z - y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y} \cdot t
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 8 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * 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 - y) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t): return ((x - y) / (z - y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x - y) / Float64(z - y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x - y) / (z - y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y} \cdot t
\end{array}
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * 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 - y) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t): return ((x - y) / (z - y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x - y) / Float64(z - y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x - y) / (z - y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y} \cdot t
\end{array}
Initial program 97.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- y x) (/ t y))))
(if (<= y -2.3e+169)
t
(if (<= y -1e-204)
t_1
(if (<= y 9.8e-54) (* t (/ x z)) (if (<= y 8e+209) t_1 t))))))
double code(double x, double y, double z, double t) {
double t_1 = (y - x) * (t / y);
double tmp;
if (y <= -2.3e+169) {
tmp = t;
} else if (y <= -1e-204) {
tmp = t_1;
} else if (y <= 9.8e-54) {
tmp = t * (x / z);
} else if (y <= 8e+209) {
tmp = t_1;
} else {
tmp = 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 = (y - x) * (t / y)
if (y <= (-2.3d+169)) then
tmp = t
else if (y <= (-1d-204)) then
tmp = t_1
else if (y <= 9.8d-54) then
tmp = t * (x / z)
else if (y <= 8d+209) then
tmp = t_1
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y - x) * (t / y);
double tmp;
if (y <= -2.3e+169) {
tmp = t;
} else if (y <= -1e-204) {
tmp = t_1;
} else if (y <= 9.8e-54) {
tmp = t * (x / z);
} else if (y <= 8e+209) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - x) * (t / y) tmp = 0 if y <= -2.3e+169: tmp = t elif y <= -1e-204: tmp = t_1 elif y <= 9.8e-54: tmp = t * (x / z) elif y <= 8e+209: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - x) * Float64(t / y)) tmp = 0.0 if (y <= -2.3e+169) tmp = t; elseif (y <= -1e-204) tmp = t_1; elseif (y <= 9.8e-54) tmp = Float64(t * Float64(x / z)); elseif (y <= 8e+209) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - x) * (t / y); tmp = 0.0; if (y <= -2.3e+169) tmp = t; elseif (y <= -1e-204) tmp = t_1; elseif (y <= 9.8e-54) tmp = t * (x / z); elseif (y <= 8e+209) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - x), $MachinePrecision] * N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.3e+169], t, If[LessEqual[y, -1e-204], t$95$1, If[LessEqual[y, 9.8e-54], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8e+209], t$95$1, t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - x\right) \cdot \frac{t}{y}\\
\mathbf{if}\;y \leq -2.3 \cdot 10^{+169}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -1 \cdot 10^{-204}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 9.8 \cdot 10^{-54}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{elif}\;y \leq 8 \cdot 10^{+209}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -2.2999999999999999e169 or 8.0000000000000006e209 < y Initial program 100.0%
Taylor expanded in y around inf
Simplified84.4%
if -2.2999999999999999e169 < y < -1e-204 or 9.80000000000000042e-54 < y < 8.0000000000000006e209Initial program 98.8%
Taylor expanded in z around 0
associate-*r/N/A
/-lowering-/.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f6451.1%
Simplified51.1%
*-commutativeN/A
associate-/l*N/A
sub-negN/A
remove-double-negN/A
distribute-neg-inN/A
+-commutativeN/A
sub-negN/A
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
remove-double-negN/A
sub-negN/A
--lowering--.f64N/A
/-lowering-/.f6455.6%
Applied egg-rr55.6%
if -1e-204 < y < 9.80000000000000042e-54Initial program 94.9%
Taylor expanded in y around 0
/-lowering-/.f6478.4%
Simplified78.4%
Final simplification67.8%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.5e+133)
t
(if (<= y 2.2e-51)
(* t (/ x (- z y)))
(if (<= y 5.8e+209) (* (- y x) (/ t y)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.5e+133) {
tmp = t;
} else if (y <= 2.2e-51) {
tmp = t * (x / (z - y));
} else if (y <= 5.8e+209) {
tmp = (y - x) * (t / y);
} else {
tmp = 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.5d+133)) then
tmp = t
else if (y <= 2.2d-51) then
tmp = t * (x / (z - y))
else if (y <= 5.8d+209) then
tmp = (y - x) * (t / y)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.5e+133) {
tmp = t;
} else if (y <= 2.2e-51) {
tmp = t * (x / (z - y));
} else if (y <= 5.8e+209) {
tmp = (y - x) * (t / y);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.5e+133: tmp = t elif y <= 2.2e-51: tmp = t * (x / (z - y)) elif y <= 5.8e+209: tmp = (y - x) * (t / y) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.5e+133) tmp = t; elseif (y <= 2.2e-51) tmp = Float64(t * Float64(x / Float64(z - y))); elseif (y <= 5.8e+209) tmp = Float64(Float64(y - x) * Float64(t / y)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.5e+133) tmp = t; elseif (y <= 2.2e-51) tmp = t * (x / (z - y)); elseif (y <= 5.8e+209) tmp = (y - x) * (t / y); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.5e+133], t, If[LessEqual[y, 2.2e-51], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.8e+209], N[(N[(y - x), $MachinePrecision] * N[(t / y), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{+133}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{-51}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{+209}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{t}{y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.50000000000000003e133 or 5.79999999999999999e209 < y Initial program 99.9%
Taylor expanded in y around inf
Simplified79.4%
if -1.50000000000000003e133 < y < 2.2e-51Initial program 96.2%
Taylor expanded in x around inf
/-lowering-/.f64N/A
--lowering--.f6476.8%
Simplified76.8%
if 2.2e-51 < y < 5.79999999999999999e209Initial program 99.7%
Taylor expanded in z around 0
associate-*r/N/A
/-lowering-/.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f6443.5%
Simplified43.5%
*-commutativeN/A
associate-/l*N/A
sub-negN/A
remove-double-negN/A
distribute-neg-inN/A
+-commutativeN/A
sub-negN/A
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
remove-double-negN/A
sub-negN/A
--lowering--.f64N/A
/-lowering-/.f6456.0%
Applied egg-rr56.0%
Final simplification72.6%
(FPCore (x y z t) :precision binary64 (if (<= y -1.3e+175) (* t (/ (- y x) y)) (if (<= y 1.2e+223) (* (- x y) (/ t (- z y))) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.3e+175) {
tmp = t * ((y - x) / y);
} else if (y <= 1.2e+223) {
tmp = (x - y) * (t / (z - y));
} else {
tmp = 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.3d+175)) then
tmp = t * ((y - x) / y)
else if (y <= 1.2d+223) then
tmp = (x - y) * (t / (z - y))
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.3e+175) {
tmp = t * ((y - x) / y);
} else if (y <= 1.2e+223) {
tmp = (x - y) * (t / (z - y));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.3e+175: tmp = t * ((y - x) / y) elif y <= 1.2e+223: tmp = (x - y) * (t / (z - y)) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.3e+175) tmp = Float64(t * Float64(Float64(y - x) / y)); elseif (y <= 1.2e+223) tmp = Float64(Float64(x - y) * Float64(t / Float64(z - y))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.3e+175) tmp = t * ((y - x) / y); elseif (y <= 1.2e+223) tmp = (x - y) * (t / (z - y)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.3e+175], N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.2e+223], N[(N[(x - y), $MachinePrecision] * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{+175}:\\
\;\;\;\;t \cdot \frac{y - x}{y}\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{+223}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.3e175Initial program 99.9%
Taylor expanded in z around 0
associate-*r/N/A
/-lowering-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f6493.1%
Simplified93.1%
if -1.3e175 < y < 1.20000000000000006e223Initial program 97.4%
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6489.6%
Applied egg-rr89.6%
if 1.20000000000000006e223 < y Initial program 100.0%
Taylor expanded in y around inf
Simplified100.0%
Final simplification90.7%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* t (/ (- x y) z)))) (if (<= z -2.2e-52) t_1 (if (<= z 1.15e-24) (* t (/ (- y x) y)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = t * ((x - y) / z);
double tmp;
if (z <= -2.2e-52) {
tmp = t_1;
} else if (z <= 1.15e-24) {
tmp = t * ((y - x) / y);
} 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 = t * ((x - y) / z)
if (z <= (-2.2d-52)) then
tmp = t_1
else if (z <= 1.15d-24) then
tmp = t * ((y - x) / y)
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 = t * ((x - y) / z);
double tmp;
if (z <= -2.2e-52) {
tmp = t_1;
} else if (z <= 1.15e-24) {
tmp = t * ((y - x) / y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * ((x - y) / z) tmp = 0 if z <= -2.2e-52: tmp = t_1 elif z <= 1.15e-24: tmp = t * ((y - x) / y) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(Float64(x - y) / z)) tmp = 0.0 if (z <= -2.2e-52) tmp = t_1; elseif (z <= 1.15e-24) tmp = Float64(t * Float64(Float64(y - x) / y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * ((x - y) / z); tmp = 0.0; if (z <= -2.2e-52) tmp = t_1; elseif (z <= 1.15e-24) tmp = t * ((y - x) / y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.2e-52], t$95$1, If[LessEqual[z, 1.15e-24], N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{x - y}{z}\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{-52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-24}:\\
\;\;\;\;t \cdot \frac{y - x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.20000000000000009e-52 or 1.1500000000000001e-24 < z Initial program 97.7%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f6471.8%
Simplified71.8%
if -2.20000000000000009e-52 < z < 1.1500000000000001e-24Initial program 97.9%
Taylor expanded in z around 0
associate-*r/N/A
/-lowering-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f6481.7%
Simplified81.7%
Final simplification75.7%
(FPCore (x y z t) :precision binary64 (if (<= y -2.8e+34) t (if (<= y 4100.0) (* t (/ x z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.8e+34) {
tmp = t;
} else if (y <= 4100.0) {
tmp = t * (x / z);
} else {
tmp = 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 <= (-2.8d+34)) then
tmp = t
else if (y <= 4100.0d0) then
tmp = t * (x / z)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.8e+34) {
tmp = t;
} else if (y <= 4100.0) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.8e+34: tmp = t elif y <= 4100.0: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.8e+34) tmp = t; elseif (y <= 4100.0) tmp = Float64(t * Float64(x / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.8e+34) tmp = t; elseif (y <= 4100.0) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.8e+34], t, If[LessEqual[y, 4100.0], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{+34}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 4100:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -2.80000000000000008e34 or 4100 < y Initial program 99.8%
Taylor expanded in y around inf
Simplified55.6%
if -2.80000000000000008e34 < y < 4100Initial program 96.0%
Taylor expanded in y around 0
/-lowering-/.f6463.6%
Simplified63.6%
Final simplification59.8%
(FPCore (x y z t) :precision binary64 (if (<= y -2.4e+21) t (if (<= y 4000.0) (* x (/ t z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.4e+21) {
tmp = t;
} else if (y <= 4000.0) {
tmp = x * (t / z);
} else {
tmp = 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 <= (-2.4d+21)) then
tmp = t
else if (y <= 4000.0d0) then
tmp = x * (t / z)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.4e+21) {
tmp = t;
} else if (y <= 4000.0) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.4e+21: tmp = t elif y <= 4000.0: tmp = x * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.4e+21) tmp = t; elseif (y <= 4000.0) tmp = Float64(x * Float64(t / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.4e+21) tmp = t; elseif (y <= 4000.0) tmp = x * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.4e+21], t, If[LessEqual[y, 4000.0], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{+21}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 4000:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -2.4e21 or 4e3 < y Initial program 99.8%
Taylor expanded in y around inf
Simplified55.6%
if -2.4e21 < y < 4e3Initial program 96.0%
Taylor expanded in y around 0
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6460.9%
Simplified60.9%
(FPCore (x y z t) :precision binary64 t)
double code(double x, double y, double z, double t) {
return 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 = t
end function
public static double code(double x, double y, double z, double t) {
return t;
}
def code(x, y, z, t): return t
function code(x, y, z, t) return t end
function tmp = code(x, y, z, t) tmp = t; end
code[x_, y_, z_, t_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 97.8%
Taylor expanded in y around inf
Simplified32.7%
(FPCore (x y z t) :precision binary64 (/ t (/ (- z y) (- x y))))
double code(double x, double y, double z, double t) {
return t / ((z - y) / (x - y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = t / ((z - y) / (x - y))
end function
public static double code(double x, double y, double z, double t) {
return t / ((z - y) / (x - y));
}
def code(x, y, z, t): return t / ((z - y) / (x - y))
function code(x, y, z, t) return Float64(t / Float64(Float64(z - y) / Float64(x - y))) end
function tmp = code(x, y, z, t) tmp = t / ((z - y) / (x - y)); end
code[x_, y_, z_, t_] := N[(t / N[(N[(z - y), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t}{\frac{z - y}{x - y}}
\end{array}
herbie shell --seed 2024158
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
:precision binary64
:alt
(! :herbie-platform default (/ t (/ (- z y) (- x y))))
(* (/ (- x y) (- z y)) t))