
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (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 - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (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 - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- z t) (/ (- x y) (- t a)) x))
(t_2 (- x (/ (* (- t z) (- y x)) (- a t)))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -5e-247)
t_2
(if (<= t_2 0.0)
(fma (- x y) (/ (- z a) t) y)
(if (<= t_2 1e+301) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((z - t), ((x - y) / (t - a)), x);
double t_2 = x - (((t - z) * (y - x)) / (a - t));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -5e-247) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = fma((x - y), ((z - a) / t), y);
} else if (t_2 <= 1e+301) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(z - t), Float64(Float64(x - y) / Float64(t - a)), x) t_2 = Float64(x - Float64(Float64(Float64(t - z) * Float64(y - x)) / Float64(a - t))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= -5e-247) tmp = t_2; elseif (t_2 <= 0.0) tmp = fma(Float64(x - y), Float64(Float64(z - a) / t), y); elseif (t_2 <= 1e+301) tmp = t_2; else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] * N[(N[(x - y), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(N[(N[(t - z), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -5e-247], t$95$2, If[LessEqual[t$95$2, 0.0], N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[t$95$2, 1e+301], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z - t, \frac{x - y}{t - a}, x\right)\\
t_2 := x - \frac{\left(t - z\right) \cdot \left(y - x\right)}{a - t}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-247}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{elif}\;t\_2 \leq 10^{+301}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -inf.0 or 1.00000000000000005e301 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 29.6%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6480.5
Applied rewrites80.5%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -4.99999999999999978e-247 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 1.00000000000000005e301Initial program 99.1%
if -4.99999999999999978e-247 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.3%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f644.3
Applied rewrites4.3%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-/.f64N/A
associate-/r/N/A
lower-fma.f64N/A
lower-/.f646.3
Applied rewrites6.3%
Taylor expanded in t around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
distribute-lft-out--N/A
distribute-rgt-out--N/A
associate-*r/N/A
+-commutativeN/A
Applied rewrites99.9%
Final simplification91.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- z t) (/ (- x y) (- t a)) x))
(t_2 (- x (/ (* (- t z) (- y x)) (- a t)))))
(if (<= t_2 -2e+139)
t_1
(if (<= t_2 -5e-247)
(- x (/ (* (- z t) y) (- t a)))
(if (<= t_2 0.0) (fma (- x y) (/ (- z a) t) y) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((z - t), ((x - y) / (t - a)), x);
double t_2 = x - (((t - z) * (y - x)) / (a - t));
double tmp;
if (t_2 <= -2e+139) {
tmp = t_1;
} else if (t_2 <= -5e-247) {
tmp = x - (((z - t) * y) / (t - a));
} else if (t_2 <= 0.0) {
tmp = fma((x - y), ((z - a) / t), y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(z - t), Float64(Float64(x - y) / Float64(t - a)), x) t_2 = Float64(x - Float64(Float64(Float64(t - z) * Float64(y - x)) / Float64(a - t))) tmp = 0.0 if (t_2 <= -2e+139) tmp = t_1; elseif (t_2 <= -5e-247) tmp = Float64(x - Float64(Float64(Float64(z - t) * y) / Float64(t - a))); elseif (t_2 <= 0.0) tmp = fma(Float64(x - y), Float64(Float64(z - a) / t), y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] * N[(N[(x - y), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(N[(N[(t - z), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+139], t$95$1, If[LessEqual[t$95$2, -5e-247], N[(x - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 0.0], N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z - t, \frac{x - y}{t - a}, x\right)\\
t_2 := x - \frac{\left(t - z\right) \cdot \left(y - x\right)}{a - t}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+139}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-247}:\\
\;\;\;\;x - \frac{\left(z - t\right) \cdot y}{t - a}\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -2.00000000000000007e139 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 61.6%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6484.9
Applied rewrites84.9%
if -2.00000000000000007e139 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -4.99999999999999978e-247Initial program 99.9%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f6498.0
Applied rewrites98.0%
if -4.99999999999999978e-247 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.3%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f644.3
Applied rewrites4.3%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-/.f64N/A
associate-/r/N/A
lower-fma.f64N/A
lower-/.f646.3
Applied rewrites6.3%
Taylor expanded in t around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
distribute-lft-out--N/A
distribute-rgt-out--N/A
associate-*r/N/A
+-commutativeN/A
Applied rewrites99.9%
Final simplification88.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ (- x y) (/ (- t a) (- t z)))))
(t_2 (- x (/ (* (- t z) (- y x)) (- a t)))))
(if (<= t_2 -5e-247)
t_1
(if (<= t_2 0.0) (fma (- x y) (/ (- z a) t) y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((x - y) / ((t - a) / (t - z)));
double t_2 = x - (((t - z) * (y - x)) / (a - t));
double tmp;
if (t_2 <= -5e-247) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = fma((x - y), ((z - a) / t), y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(x - y) / Float64(Float64(t - a) / Float64(t - z)))) t_2 = Float64(x - Float64(Float64(Float64(t - z) * Float64(y - x)) / Float64(a - t))) tmp = 0.0 if (t_2 <= -5e-247) tmp = t_1; elseif (t_2 <= 0.0) tmp = fma(Float64(x - y), Float64(Float64(z - a) / t), y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(x - y), $MachinePrecision] / N[(N[(t - a), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(N[(N[(t - z), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-247], t$95$1, If[LessEqual[t$95$2, 0.0], N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{x - y}{\frac{t - a}{t - z}}\\
t_2 := x - \frac{\left(t - z\right) \cdot \left(y - x\right)}{a - t}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{-247}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -4.99999999999999978e-247 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 69.1%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6489.8
Applied rewrites89.8%
if -4.99999999999999978e-247 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.3%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f644.3
Applied rewrites4.3%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-/.f64N/A
associate-/r/N/A
lower-fma.f64N/A
lower-/.f646.3
Applied rewrites6.3%
Taylor expanded in t around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
distribute-lft-out--N/A
distribute-rgt-out--N/A
associate-*r/N/A
+-commutativeN/A
Applied rewrites99.9%
Final simplification90.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ x t) (- z a) y)))
(if (<= t -4.3e+20)
t_1
(if (<= t 1.08e+20)
(fma (- y x) (/ z a) x)
(if (<= t 1.4e+217) (* (/ y (- t a)) (- t z)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x / t), (z - a), y);
double tmp;
if (t <= -4.3e+20) {
tmp = t_1;
} else if (t <= 1.08e+20) {
tmp = fma((y - x), (z / a), x);
} else if (t <= 1.4e+217) {
tmp = (y / (t - a)) * (t - z);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x / t), Float64(z - a), y) tmp = 0.0 if (t <= -4.3e+20) tmp = t_1; elseif (t <= 1.08e+20) tmp = fma(Float64(y - x), Float64(z / a), x); elseif (t <= 1.4e+217) tmp = Float64(Float64(y / Float64(t - a)) * Float64(t - z)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -4.3e+20], t$95$1, If[LessEqual[t, 1.08e+20], N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 1.4e+217], N[(N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x}{t}, z - a, y\right)\\
\mathbf{if}\;t \leq -4.3 \cdot 10^{+20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.08 \cdot 10^{+20}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{+217}:\\
\;\;\;\;\frac{y}{t - a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.3e20 or 1.39999999999999997e217 < t Initial program 40.2%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites78.5%
Taylor expanded in x around inf
Applied rewrites75.0%
if -4.3e20 < t < 1.08e20Initial program 88.0%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6477.2
Applied rewrites77.2%
Applied rewrites78.5%
if 1.08e20 < t < 1.39999999999999997e217Initial program 34.2%
Taylor expanded in x around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6475.4
Applied rewrites75.4%
Final simplification76.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- x y) t) (- z a) y)))
(if (<= t -1.56e+81)
t_1
(if (<= t 3.6e+31) (- x (/ (* z (- y x)) (- t a))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((x - y) / t), (z - a), y);
double tmp;
if (t <= -1.56e+81) {
tmp = t_1;
} else if (t <= 3.6e+31) {
tmp = x - ((z * (y - x)) / (t - a));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(x - y) / t), Float64(z - a), y) tmp = 0.0 if (t <= -1.56e+81) tmp = t_1; elseif (t <= 3.6e+31) tmp = Float64(x - Float64(Float64(z * Float64(y - x)) / Float64(t - a))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -1.56e+81], t$95$1, If[LessEqual[t, 3.6e+31], N[(x - N[(N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x - y}{t}, z - a, y\right)\\
\mathbf{if}\;t \leq -1.56 \cdot 10^{+81}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+31}:\\
\;\;\;\;x - \frac{z \cdot \left(y - x\right)}{t - a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.56e81 or 3.59999999999999996e31 < t Initial program 34.9%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites77.9%
if -1.56e81 < t < 3.59999999999999996e31Initial program 87.4%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6481.3
Applied rewrites81.3%
Final simplification79.9%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ (- x y) t) (- z a) y))) (if (<= t -6.8e+19) t_1 (if (<= t 7.2e+28) (fma (- y x) (/ z a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((x - y) / t), (z - a), y);
double tmp;
if (t <= -6.8e+19) {
tmp = t_1;
} else if (t <= 7.2e+28) {
tmp = fma((y - x), (z / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(x - y) / t), Float64(z - a), y) tmp = 0.0 if (t <= -6.8e+19) tmp = t_1; elseif (t <= 7.2e+28) tmp = fma(Float64(y - x), Float64(z / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -6.8e+19], t$95$1, If[LessEqual[t, 7.2e+28], N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x - y}{t}, z - a, y\right)\\
\mathbf{if}\;t \leq -6.8 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{+28}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.8e19 or 7.1999999999999999e28 < t Initial program 38.2%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites76.4%
if -6.8e19 < t < 7.1999999999999999e28Initial program 88.0%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6477.2
Applied rewrites77.2%
Applied rewrites78.5%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ x t) (- z a) y))) (if (<= t -4.3e+20) t_1 (if (<= t 1e+29) (fma (- y x) (/ z a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x / t), (z - a), y);
double tmp;
if (t <= -4.3e+20) {
tmp = t_1;
} else if (t <= 1e+29) {
tmp = fma((y - x), (z / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x / t), Float64(z - a), y) tmp = 0.0 if (t <= -4.3e+20) tmp = t_1; elseif (t <= 1e+29) tmp = fma(Float64(y - x), Float64(z / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -4.3e+20], t$95$1, If[LessEqual[t, 1e+29], N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x}{t}, z - a, y\right)\\
\mathbf{if}\;t \leq -4.3 \cdot 10^{+20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 10^{+29}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.3e20 or 9.99999999999999914e28 < t Initial program 38.2%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites76.4%
Taylor expanded in x around inf
Applied rewrites70.5%
if -4.3e20 < t < 9.99999999999999914e28Initial program 88.0%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6477.2
Applied rewrites77.2%
Applied rewrites78.5%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ x t) (- z a) y))) (if (<= t -1.65e+46) t_1 (if (<= t 9.5e+28) (fma (/ y a) z x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x / t), (z - a), y);
double tmp;
if (t <= -1.65e+46) {
tmp = t_1;
} else if (t <= 9.5e+28) {
tmp = fma((y / a), z, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x / t), Float64(z - a), y) tmp = 0.0 if (t <= -1.65e+46) tmp = t_1; elseif (t <= 9.5e+28) tmp = fma(Float64(y / a), z, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -1.65e+46], t$95$1, If[LessEqual[t, 9.5e+28], N[(N[(y / a), $MachinePrecision] * z + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x}{t}, z - a, y\right)\\
\mathbf{if}\;t \leq -1.65 \cdot 10^{+46}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{+28}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, z, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.6499999999999999e46 or 9.49999999999999927e28 < t Initial program 37.2%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites76.8%
Taylor expanded in x around inf
Applied rewrites70.9%
if -1.6499999999999999e46 < t < 9.49999999999999927e28Initial program 88.1%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6476.8
Applied rewrites76.8%
Taylor expanded in x around 0
Applied rewrites69.7%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ (- x y) t) z y))) (if (<= t -2.3e+60) t_1 (if (<= t 700000000.0) (fma (/ y a) z x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((x - y) / t), z, y);
double tmp;
if (t <= -2.3e+60) {
tmp = t_1;
} else if (t <= 700000000.0) {
tmp = fma((y / a), z, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(x - y) / t), z, y) tmp = 0.0 if (t <= -2.3e+60) tmp = t_1; elseif (t <= 700000000.0) tmp = fma(Float64(y / a), z, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * z + y), $MachinePrecision]}, If[LessEqual[t, -2.3e+60], t$95$1, If[LessEqual[t, 700000000.0], N[(N[(y / a), $MachinePrecision] * z + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x - y}{t}, z, y\right)\\
\mathbf{if}\;t \leq -2.3 \cdot 10^{+60}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 700000000:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, z, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.30000000000000017e60 or 7e8 < t Initial program 37.1%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites76.7%
Taylor expanded in a around 0
Applied rewrites68.3%
if -2.30000000000000017e60 < t < 7e8Initial program 88.2%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6476.8
Applied rewrites76.8%
Taylor expanded in x around 0
Applied rewrites69.7%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ (- y x) t) a y))) (if (<= t -4.8e+80) t_1 (if (<= t 3.6e+31) (fma (/ y a) z x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((y - x) / t), a, y);
double tmp;
if (t <= -4.8e+80) {
tmp = t_1;
} else if (t <= 3.6e+31) {
tmp = fma((y / a), z, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(y - x) / t), a, y) tmp = 0.0 if (t <= -4.8e+80) tmp = t_1; elseif (t <= 3.6e+31) tmp = fma(Float64(y / a), z, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * a + y), $MachinePrecision]}, If[LessEqual[t, -4.8e+80], t$95$1, If[LessEqual[t, 3.6e+31], N[(N[(y / a), $MachinePrecision] * z + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y - x}{t}, a, y\right)\\
\mathbf{if}\;t \leq -4.8 \cdot 10^{+80}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+31}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, z, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.79999999999999958e80 or 3.59999999999999996e31 < t Initial program 35.5%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6455.9
Applied rewrites55.9%
Taylor expanded in a around 0
Applied rewrites56.7%
if -4.79999999999999958e80 < t < 3.59999999999999996e31Initial program 87.3%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6475.8
Applied rewrites75.8%
Taylor expanded in x around 0
Applied rewrites69.0%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ y t) (- z) y))) (if (<= t -1.2e+77) t_1 (if (<= t 7.2e+28) (fma (/ y a) z x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((y / t), -z, y);
double tmp;
if (t <= -1.2e+77) {
tmp = t_1;
} else if (t <= 7.2e+28) {
tmp = fma((y / a), z, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(y / t), Float64(-z), y) tmp = 0.0 if (t <= -1.2e+77) tmp = t_1; elseif (t <= 7.2e+28) tmp = fma(Float64(y / a), z, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / t), $MachinePrecision] * (-z) + y), $MachinePrecision]}, If[LessEqual[t, -1.2e+77], t$95$1, If[LessEqual[t, 7.2e+28], N[(N[(y / a), $MachinePrecision] * z + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y}{t}, -z, y\right)\\
\mathbf{if}\;t \leq -1.2 \cdot 10^{+77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{+28}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, z, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.1999999999999999e77 or 7.1999999999999999e28 < t Initial program 35.5%
Taylor expanded in t around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites55.5%
Taylor expanded in a around 0
Applied rewrites69.1%
Taylor expanded in x around 0
Applied rewrites54.1%
if -1.1999999999999999e77 < t < 7.1999999999999999e28Initial program 87.3%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6475.8
Applied rewrites75.8%
Taylor expanded in x around 0
Applied rewrites69.0%
(FPCore (x y z t a) :precision binary64 (if (<= t -4.8e+80) y (if (<= t 3.6e+31) (fma (/ y a) z x) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.8e+80) {
tmp = y;
} else if (t <= 3.6e+31) {
tmp = fma((y / a), z, x);
} else {
tmp = y;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4.8e+80) tmp = y; elseif (t <= 3.6e+31) tmp = fma(Float64(y / a), z, x); else tmp = y; end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.8e+80], y, If[LessEqual[t, 3.6e+31], N[(N[(y / a), $MachinePrecision] * z + x), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{+80}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+31}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, z, x\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -4.79999999999999958e80 or 3.59999999999999996e31 < t Initial program 35.5%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6455.9
Applied rewrites55.9%
Taylor expanded in t around inf
Applied rewrites47.7%
if -4.79999999999999958e80 < t < 3.59999999999999996e31Initial program 87.3%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6475.8
Applied rewrites75.8%
Taylor expanded in x around 0
Applied rewrites69.0%
(FPCore (x y z t a) :precision binary64 (if (<= t -0.00027) y (if (<= t 1e+29) (fma t (/ x a) x) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -0.00027) {
tmp = y;
} else if (t <= 1e+29) {
tmp = fma(t, (x / a), x);
} else {
tmp = y;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -0.00027) tmp = y; elseif (t <= 1e+29) tmp = fma(t, Float64(x / a), x); else tmp = y; end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -0.00027], y, If[LessEqual[t, 1e+29], N[(t * N[(x / a), $MachinePrecision] + x), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.00027:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 10^{+29}:\\
\;\;\;\;\mathsf{fma}\left(t, \frac{x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -2.70000000000000003e-4 or 9.99999999999999914e28 < t Initial program 39.2%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6454.8
Applied rewrites54.8%
Taylor expanded in t around inf
Applied rewrites45.9%
if -2.70000000000000003e-4 < t < 9.99999999999999914e28Initial program 87.8%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6445.1
Applied rewrites45.1%
Taylor expanded in y around 0
Applied rewrites42.9%
Taylor expanded in t around 0
Applied rewrites44.2%
(FPCore (x y z t a) :precision binary64 (if (<= t -0.00027) y (if (<= t 1e+29) (* 1.0 x) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -0.00027) {
tmp = y;
} else if (t <= 1e+29) {
tmp = 1.0 * x;
} else {
tmp = 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 <= (-0.00027d0)) then
tmp = y
else if (t <= 1d+29) then
tmp = 1.0d0 * x
else
tmp = 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 <= -0.00027) {
tmp = y;
} else if (t <= 1e+29) {
tmp = 1.0 * x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -0.00027: tmp = y elif t <= 1e+29: tmp = 1.0 * x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -0.00027) tmp = y; elseif (t <= 1e+29) tmp = Float64(1.0 * x); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -0.00027) tmp = y; elseif (t <= 1e+29) tmp = 1.0 * x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -0.00027], y, If[LessEqual[t, 1e+29], N[(1.0 * x), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.00027:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 10^{+29}:\\
\;\;\;\;1 \cdot x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -2.70000000000000003e-4 or 9.99999999999999914e28 < t Initial program 39.2%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6454.8
Applied rewrites54.8%
Taylor expanded in t around inf
Applied rewrites45.9%
if -2.70000000000000003e-4 < t < 9.99999999999999914e28Initial program 87.8%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6476.9
Applied rewrites76.9%
Taylor expanded in x around inf
Applied rewrites51.3%
Taylor expanded in z around 0
Applied rewrites40.0%
(FPCore (x y z t a) :precision binary64 y)
double code(double x, double y, double z, double t, double a) {
return y;
}
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
end function
public static double code(double x, double y, double z, double t, double a) {
return y;
}
def code(x, y, z, t, a): return y
function code(x, y, z, t, a) return y end
function tmp = code(x, y, z, t, a) tmp = y; end
code[x_, y_, z_, t_, a_] := y
\begin{array}{l}
\\
y
\end{array}
Initial program 64.8%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6449.7
Applied rewrites49.7%
Taylor expanded in t around inf
Applied rewrites25.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))
(if (< a -1.6153062845442575e-142)
t_1
(if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
double tmp;
if (a < -1.6153062845442575e-142) {
tmp = t_1;
} else if (a < 3.774403170083174e-182) {
tmp = y - ((z / t) * (y - x));
} else {
tmp = t_1;
}
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) :: t_1
real(8) :: tmp
t_1 = x + (((y - x) / 1.0d0) * ((z - t) / (a - t)))
if (a < (-1.6153062845442575d-142)) then
tmp = t_1
else if (a < 3.774403170083174d-182) then
tmp = y - ((z / t) * (y - x))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
double tmp;
if (a < -1.6153062845442575e-142) {
tmp = t_1;
} else if (a < 3.774403170083174e-182) {
tmp = y - ((z / t) * (y - x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t))) tmp = 0 if a < -1.6153062845442575e-142: tmp = t_1 elif a < 3.774403170083174e-182: tmp = y - ((z / t) * (y - x)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - x) / 1.0) * Float64(Float64(z - t) / Float64(a - t)))) tmp = 0.0 if (a < -1.6153062845442575e-142) tmp = t_1; elseif (a < 3.774403170083174e-182) tmp = Float64(y - Float64(Float64(z / t) * Float64(y - x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t))); tmp = 0.0; if (a < -1.6153062845442575e-142) tmp = t_1; elseif (a < 3.774403170083174e-182) tmp = y - ((z / t) * (y - x)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] / 1.0), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[a, -1.6153062845442575e-142], t$95$1, If[Less[a, 3.774403170083174e-182], N[(y - N[(N[(z / t), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\
\;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024331
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (if (< a -646122513817703/4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))) (if (< a 1887201585041587/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))))))
(+ x (/ (* (- y x) (- z t)) (- a t))))