
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 10 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{a - t}
\end{array}
(FPCore (x y z t a) :precision binary64 (fma (/ (- z t) (- a t)) y x))
double code(double x, double y, double z, double t, double a) {
return fma(((z - t) / (a - t)), y, x);
}
function code(x, y, z, t, a) return fma(Float64(Float64(z - t) / Float64(a - t)), y, x) end
code[x_, y_, z_, t_, a_] := N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * y + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\frac{z - t}{a - t}, y, x\right)
\end{array}
Initial program 83.8%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6498.6
Applied rewrites98.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1420000.0) (not (<= t 7e+15))) (fma (- 1.0 (/ z t)) y x) (fma (- z t) (/ y a) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1420000.0) || !(t <= 7e+15)) {
tmp = fma((1.0 - (z / t)), y, x);
} else {
tmp = fma((z - t), (y / a), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1420000.0) || !(t <= 7e+15)) tmp = fma(Float64(1.0 - Float64(z / t)), y, x); else tmp = fma(Float64(z - t), Float64(y / a), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1420000.0], N[Not[LessEqual[t, 7e+15]], $MachinePrecision]], N[(N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision] * y + x), $MachinePrecision], N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1420000 \lor \neg \left(t \leq 7 \cdot 10^{+15}\right):\\
\;\;\;\;\mathsf{fma}\left(1 - \frac{z}{t}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{y}{a}, x\right)\\
\end{array}
\end{array}
if t < -1.42e6 or 7e15 < t Initial program 73.0%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
associate-/l*N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
neg-sub0N/A
div-subN/A
*-inversesN/A
associate-+l-N/A
neg-sub0N/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f6494.3
Applied rewrites94.3%
if -1.42e6 < t < 7e15Initial program 96.0%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f6489.2
Applied rewrites89.2%
Final simplification91.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -12500.0) (not (<= t 7e+15))) (fma (- 1.0 (/ z t)) y x) (fma (/ y a) z x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -12500.0) || !(t <= 7e+15)) {
tmp = fma((1.0 - (z / t)), y, x);
} else {
tmp = fma((y / a), z, x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -12500.0) || !(t <= 7e+15)) tmp = fma(Float64(1.0 - Float64(z / t)), y, x); else tmp = fma(Float64(y / a), z, x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -12500.0], N[Not[LessEqual[t, 7e+15]], $MachinePrecision]], N[(N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision] * y + x), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * z + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -12500 \lor \neg \left(t \leq 7 \cdot 10^{+15}\right):\\
\;\;\;\;\mathsf{fma}\left(1 - \frac{z}{t}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, z, x\right)\\
\end{array}
\end{array}
if t < -12500 or 7e15 < t Initial program 73.0%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
associate-/l*N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
neg-sub0N/A
div-subN/A
*-inversesN/A
associate-+l-N/A
neg-sub0N/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f6494.3
Applied rewrites94.3%
if -12500 < t < 7e15Initial program 96.0%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6497.0
Applied rewrites97.0%
Taylor expanded in t around 0
+-commutativeN/A
associate-*l/N/A
lower-fma.f64N/A
lower-/.f6485.3
Applied rewrites85.3%
Final simplification90.1%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.08e-16) (- x (* y (/ t (- a t)))) (if (<= t 7e+15) (fma (- z t) (/ y a) x) (fma (- 1.0 (/ z t)) y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.08e-16) {
tmp = x - (y * (t / (a - t)));
} else if (t <= 7e+15) {
tmp = fma((z - t), (y / a), x);
} else {
tmp = fma((1.0 - (z / t)), y, x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.08e-16) tmp = Float64(x - Float64(y * Float64(t / Float64(a - t)))); elseif (t <= 7e+15) tmp = fma(Float64(z - t), Float64(y / a), x); else tmp = fma(Float64(1.0 - Float64(z / t)), y, x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.08e-16], N[(x - N[(y * N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e+15], N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision], N[(N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision] * y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.08 \cdot 10^{-16}:\\
\;\;\;\;x - y \cdot \frac{t}{a - t}\\
\mathbf{elif}\;t \leq 7 \cdot 10^{+15}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(1 - \frac{z}{t}, y, x\right)\\
\end{array}
\end{array}
if t < -1.08e-16Initial program 77.2%
Taylor expanded in z around 0
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6492.3
Applied rewrites92.3%
if -1.08e-16 < t < 7e15Initial program 95.7%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f6490.0
Applied rewrites90.0%
if 7e15 < t Initial program 71.7%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
associate-/l*N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
neg-sub0N/A
div-subN/A
*-inversesN/A
associate-+l-N/A
neg-sub0N/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f6496.8
Applied rewrites96.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -18500000.0) (not (<= t 7e+15))) (+ y x) (fma (/ y a) z x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -18500000.0) || !(t <= 7e+15)) {
tmp = y + x;
} else {
tmp = fma((y / a), z, x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -18500000.0) || !(t <= 7e+15)) tmp = Float64(y + x); else tmp = fma(Float64(y / a), z, x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -18500000.0], N[Not[LessEqual[t, 7e+15]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * z + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -18500000 \lor \neg \left(t \leq 7 \cdot 10^{+15}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, z, x\right)\\
\end{array}
\end{array}
if t < -1.85e7 or 7e15 < t Initial program 73.0%
Taylor expanded in t around inf
+-commutativeN/A
lower-+.f6489.0
Applied rewrites89.0%
if -1.85e7 < t < 7e15Initial program 96.0%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6497.0
Applied rewrites97.0%
Taylor expanded in t around 0
+-commutativeN/A
associate-*l/N/A
lower-fma.f64N/A
lower-/.f6485.3
Applied rewrites85.3%
Final simplification87.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -18500000.0) (not (<= t 7e+15))) (+ y x) (fma (/ z a) y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -18500000.0) || !(t <= 7e+15)) {
tmp = y + x;
} else {
tmp = fma((z / a), y, x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -18500000.0) || !(t <= 7e+15)) tmp = Float64(y + x); else tmp = fma(Float64(z / a), y, x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -18500000.0], N[Not[LessEqual[t, 7e+15]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(N[(z / a), $MachinePrecision] * y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -18500000 \lor \neg \left(t \leq 7 \cdot 10^{+15}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y, x\right)\\
\end{array}
\end{array}
if t < -1.85e7 or 7e15 < t Initial program 73.0%
Taylor expanded in t around inf
+-commutativeN/A
lower-+.f6489.0
Applied rewrites89.0%
if -1.85e7 < t < 7e15Initial program 96.0%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6484.1
Applied rewrites84.1%
Final simplification86.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.45e-113) (not (<= t 4.4e-146))) (+ y x) (* (/ y a) z)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.45e-113) || !(t <= 4.4e-146)) {
tmp = y + x;
} else {
tmp = (y / a) * z;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-1.45d-113)) .or. (.not. (t <= 4.4d-146))) then
tmp = y + x
else
tmp = (y / a) * z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.45e-113) || !(t <= 4.4e-146)) {
tmp = y + x;
} else {
tmp = (y / a) * z;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.45e-113) or not (t <= 4.4e-146): tmp = y + x else: tmp = (y / a) * z return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.45e-113) || !(t <= 4.4e-146)) tmp = Float64(y + x); else tmp = Float64(Float64(y / a) * z); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.45e-113) || ~((t <= 4.4e-146))) tmp = y + x; else tmp = (y / a) * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.45e-113], N[Not[LessEqual[t, 4.4e-146]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.45 \cdot 10^{-113} \lor \neg \left(t \leq 4.4 \cdot 10^{-146}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a} \cdot z\\
\end{array}
\end{array}
if t < -1.45000000000000002e-113 or 4.4e-146 < t Initial program 79.5%
Taylor expanded in t around inf
+-commutativeN/A
lower-+.f6482.0
Applied rewrites82.0%
if -1.45000000000000002e-113 < t < 4.4e-146Initial program 95.7%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6496.3
Applied rewrites96.3%
Taylor expanded in z around inf
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6454.6
Applied rewrites54.6%
Taylor expanded in t around 0
Applied rewrites48.8%
Final simplification73.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.2e-175) (not (<= t 1.22e-184))) (+ y x) (/ (* y z) a)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.2e-175) || !(t <= 1.22e-184)) {
tmp = y + x;
} else {
tmp = (y * z) / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-1.2d-175)) .or. (.not. (t <= 1.22d-184))) then
tmp = y + x
else
tmp = (y * z) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.2e-175) || !(t <= 1.22e-184)) {
tmp = y + x;
} else {
tmp = (y * z) / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.2e-175) or not (t <= 1.22e-184): tmp = y + x else: tmp = (y * z) / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.2e-175) || !(t <= 1.22e-184)) tmp = Float64(y + x); else tmp = Float64(Float64(y * z) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.2e-175) || ~((t <= 1.22e-184))) tmp = y + x; else tmp = (y * z) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.2e-175], N[Not[LessEqual[t, 1.22e-184]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{-175} \lor \neg \left(t \leq 1.22 \cdot 10^{-184}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot z}{a}\\
\end{array}
\end{array}
if t < -1.2e-175 or 1.2200000000000001e-184 < t Initial program 80.4%
Taylor expanded in t around inf
+-commutativeN/A
lower-+.f6478.0
Applied rewrites78.0%
if -1.2e-175 < t < 1.2200000000000001e-184Initial program 97.9%
Taylor expanded in z around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6448.8
Applied rewrites48.8%
Taylor expanded in t around 0
Applied rewrites51.7%
Final simplification72.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.45e-113) (not (<= t 4.4e-146))) (+ y x) (* (/ z a) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.45e-113) || !(t <= 4.4e-146)) {
tmp = y + x;
} else {
tmp = (z / a) * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-1.45d-113)) .or. (.not. (t <= 4.4d-146))) then
tmp = y + x
else
tmp = (z / a) * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.45e-113) || !(t <= 4.4e-146)) {
tmp = y + x;
} else {
tmp = (z / a) * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.45e-113) or not (t <= 4.4e-146): tmp = y + x else: tmp = (z / a) * y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.45e-113) || !(t <= 4.4e-146)) tmp = Float64(y + x); else tmp = Float64(Float64(z / a) * y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.45e-113) || ~((t <= 4.4e-146))) tmp = y + x; else tmp = (z / a) * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.45e-113], N[Not[LessEqual[t, 4.4e-146]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(N[(z / a), $MachinePrecision] * y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.45 \cdot 10^{-113} \lor \neg \left(t \leq 4.4 \cdot 10^{-146}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{a} \cdot y\\
\end{array}
\end{array}
if t < -1.45000000000000002e-113 or 4.4e-146 < t Initial program 79.5%
Taylor expanded in t around inf
+-commutativeN/A
lower-+.f6482.0
Applied rewrites82.0%
if -1.45000000000000002e-113 < t < 4.4e-146Initial program 95.7%
Taylor expanded in z around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6450.9
Applied rewrites50.9%
Taylor expanded in t around 0
Applied rewrites46.0%
Applied rewrites45.1%
Final simplification72.2%
(FPCore (x y z t a) :precision binary64 (+ y x))
double code(double x, double y, double z, double t, double a) {
return y + x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = y + x
end function
public static double code(double x, double y, double z, double t, double a) {
return y + x;
}
def code(x, y, z, t, a): return y + x
function code(x, y, z, t, a) return Float64(y + x) end
function tmp = code(x, y, z, t, a) tmp = y + x; end
code[x_, y_, z_, t_, a_] := N[(y + x), $MachinePrecision]
\begin{array}{l}
\\
y + x
\end{array}
Initial program 83.8%
Taylor expanded in t around inf
+-commutativeN/A
lower-+.f6468.7
Applied rewrites68.7%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- a t) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((a - t) / (z - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y / ((a - t) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((a - t) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((a - t) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(a - t) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((a - t) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{a - t}{z - t}}
\end{array}
herbie shell --seed 2024318
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
:precision binary64
:alt
(! :herbie-platform default (+ x (/ y (/ (- a t) (- z t)))))
(+ x (/ (* y (- z t)) (- a t))))