
(FPCore (x y z) :precision binary64 (+ (* x y) (* z (- 1.0 y))))
double code(double x, double y, double z) {
return (x * y) + (z * (1.0 - y));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x * y) + (z * (1.0d0 - y))
end function
public static double code(double x, double y, double z) {
return (x * y) + (z * (1.0 - y));
}
def code(x, y, z): return (x * y) + (z * (1.0 - y))
function code(x, y, z) return Float64(Float64(x * y) + Float64(z * Float64(1.0 - y))) end
function tmp = code(x, y, z) tmp = (x * y) + (z * (1.0 - y)); end
code[x_, y_, z_] := N[(N[(x * y), $MachinePrecision] + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot y + z \cdot \left(1 - y\right)
\end{array}
Herbie found 7 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (+ (* x y) (* z (- 1.0 y))))
double code(double x, double y, double z) {
return (x * y) + (z * (1.0 - y));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x * y) + (z * (1.0d0 - y))
end function
public static double code(double x, double y, double z) {
return (x * y) + (z * (1.0 - y));
}
def code(x, y, z): return (x * y) + (z * (1.0 - y))
function code(x, y, z) return Float64(Float64(x * y) + Float64(z * Float64(1.0 - y))) end
function tmp = code(x, y, z) tmp = (x * y) + (z * (1.0 - y)); end
code[x_, y_, z_] := N[(N[(x * y), $MachinePrecision] + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot y + z \cdot \left(1 - y\right)
\end{array}
(FPCore (x y z) :precision binary64 (fma y x (* (- 1.0 y) z)))
double code(double x, double y, double z) {
return fma(y, x, ((1.0 - y) * z));
}
function code(x, y, z) return fma(y, x, Float64(Float64(1.0 - y) * z)) end
code[x_, y_, z_] := N[(y * x + N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, x, \left(1 - y\right) \cdot z\right)
\end{array}
Initial program 97.8%
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f6499.0
Applied rewrites99.0%
(FPCore (x y z) :precision binary64 (let* ((t_0 (* (- x z) y))) (if (<= y -3.4) t_0 (if (<= y 1.0) (fma y x z) t_0))))
double code(double x, double y, double z) {
double t_0 = (x - z) * y;
double tmp;
if (y <= -3.4) {
tmp = t_0;
} else if (y <= 1.0) {
tmp = fma(y, x, z);
} else {
tmp = t_0;
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(x - z) * y) tmp = 0.0 if (y <= -3.4) tmp = t_0; elseif (y <= 1.0) tmp = fma(y, x, z); else tmp = t_0; end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x - z), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -3.4], t$95$0, If[LessEqual[y, 1.0], N[(y * x + z), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(x - z\right) \cdot y\\
\mathbf{if}\;y \leq -3.4:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 1:\\
\;\;\;\;\mathsf{fma}\left(y, x, z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -3.39999999999999991 or 1 < y Initial program 95.7%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lift--.f6452.0
Applied rewrites52.0%
Taylor expanded in y around inf
mul-1-negN/A
lower-neg.f6451.1
Applied rewrites51.1%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
lower--.f6499.0
Applied rewrites99.0%
if -3.39999999999999991 < y < 1Initial program 100.0%
Taylor expanded in y around 0
Applied rewrites99.0%
lift-*.f64N/A
lift-+.f64N/A
*-commutativeN/A
lower-fma.f6499.0
Applied rewrites99.0%
(FPCore (x y z) :precision binary64 (let* ((t_0 (* (- 1.0 y) z))) (if (<= z -1.05e+40) t_0 (if (<= z 1.2e+53) (fma y x z) t_0))))
double code(double x, double y, double z) {
double t_0 = (1.0 - y) * z;
double tmp;
if (z <= -1.05e+40) {
tmp = t_0;
} else if (z <= 1.2e+53) {
tmp = fma(y, x, z);
} else {
tmp = t_0;
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(1.0 - y) * z) tmp = 0.0 if (z <= -1.05e+40) tmp = t_0; elseif (z <= 1.2e+53) tmp = fma(y, x, z); else tmp = t_0; end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -1.05e+40], t$95$0, If[LessEqual[z, 1.2e+53], N[(y * x + z), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(1 - y\right) \cdot z\\
\mathbf{if}\;z \leq -1.05 \cdot 10^{+40}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+53}:\\
\;\;\;\;\mathsf{fma}\left(y, x, z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -1.05000000000000005e40 or 1.2e53 < z Initial program 95.0%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lift--.f6488.9
Applied rewrites88.9%
if -1.05000000000000005e40 < z < 1.2e53Initial program 99.8%
Taylor expanded in y around 0
Applied rewrites86.0%
lift-*.f64N/A
lift-+.f64N/A
*-commutativeN/A
lower-fma.f6486.0
Applied rewrites86.0%
(FPCore (x y z) :precision binary64 (if (<= (+ (* x y) (* z (- 1.0 y))) 1e+300) (fma y x z) (* (- y) z)))
double code(double x, double y, double z) {
double tmp;
if (((x * y) + (z * (1.0 - y))) <= 1e+300) {
tmp = fma(y, x, z);
} else {
tmp = -y * z;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (Float64(Float64(x * y) + Float64(z * Float64(1.0 - y))) <= 1e+300) tmp = fma(y, x, z); else tmp = Float64(Float64(-y) * z); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[(N[(x * y), $MachinePrecision] + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e+300], N[(y * x + z), $MachinePrecision], N[((-y) * z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y + z \cdot \left(1 - y\right) \leq 10^{+300}:\\
\;\;\;\;\mathsf{fma}\left(y, x, z\right)\\
\mathbf{else}:\\
\;\;\;\;\left(-y\right) \cdot z\\
\end{array}
\end{array}
if (+.f64 (*.f64 x y) (*.f64 z (-.f64 #s(literal 1 binary64) y))) < 1.0000000000000001e300Initial program 100.0%
Taylor expanded in y around 0
Applied rewrites78.9%
lift-*.f64N/A
lift-+.f64N/A
*-commutativeN/A
lower-fma.f6478.9
Applied rewrites78.9%
if 1.0000000000000001e300 < (+.f64 (*.f64 x y) (*.f64 z (-.f64 #s(literal 1 binary64) y))) Initial program 82.9%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lift--.f6457.9
Applied rewrites57.9%
Taylor expanded in y around inf
mul-1-negN/A
lower-neg.f6455.0
Applied rewrites55.0%
(FPCore (x y z) :precision binary64 (if (<= y -8.2e-37) (* y x) (if (<= y 0.000102) z (if (<= y 3.7e+52) (* y x) (* (- y) z)))))
double code(double x, double y, double z) {
double tmp;
if (y <= -8.2e-37) {
tmp = y * x;
} else if (y <= 0.000102) {
tmp = z;
} else if (y <= 3.7e+52) {
tmp = y * x;
} else {
tmp = -y * z;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (y <= (-8.2d-37)) then
tmp = y * x
else if (y <= 0.000102d0) then
tmp = z
else if (y <= 3.7d+52) then
tmp = y * x
else
tmp = -y * z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -8.2e-37) {
tmp = y * x;
} else if (y <= 0.000102) {
tmp = z;
} else if (y <= 3.7e+52) {
tmp = y * x;
} else {
tmp = -y * z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -8.2e-37: tmp = y * x elif y <= 0.000102: tmp = z elif y <= 3.7e+52: tmp = y * x else: tmp = -y * z return tmp
function code(x, y, z) tmp = 0.0 if (y <= -8.2e-37) tmp = Float64(y * x); elseif (y <= 0.000102) tmp = z; elseif (y <= 3.7e+52) tmp = Float64(y * x); else tmp = Float64(Float64(-y) * z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -8.2e-37) tmp = y * x; elseif (y <= 0.000102) tmp = z; elseif (y <= 3.7e+52) tmp = y * x; else tmp = -y * z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -8.2e-37], N[(y * x), $MachinePrecision], If[LessEqual[y, 0.000102], z, If[LessEqual[y, 3.7e+52], N[(y * x), $MachinePrecision], N[((-y) * z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{-37}:\\
\;\;\;\;y \cdot x\\
\mathbf{elif}\;y \leq 0.000102:\\
\;\;\;\;z\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{+52}:\\
\;\;\;\;y \cdot x\\
\mathbf{else}:\\
\;\;\;\;\left(-y\right) \cdot z\\
\end{array}
\end{array}
if y < -8.1999999999999996e-37 or 1.01999999999999999e-4 < y < 3.7e52Initial program 97.2%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f6452.8
Applied rewrites52.8%
if -8.1999999999999996e-37 < y < 1.01999999999999999e-4Initial program 100.0%
Taylor expanded in y around 0
Applied rewrites72.3%
if 3.7e52 < y Initial program 97.2%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lift--.f6451.1
Applied rewrites51.1%
Taylor expanded in y around inf
mul-1-negN/A
lower-neg.f6444.7
Applied rewrites44.7%
(FPCore (x y z) :precision binary64 (if (<= y -8.2e-37) (* y x) (if (<= y 0.000102) z (* y x))))
double code(double x, double y, double z) {
double tmp;
if (y <= -8.2e-37) {
tmp = y * x;
} else if (y <= 0.000102) {
tmp = z;
} else {
tmp = y * x;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (y <= (-8.2d-37)) then
tmp = y * x
else if (y <= 0.000102d0) then
tmp = z
else
tmp = y * x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -8.2e-37) {
tmp = y * x;
} else if (y <= 0.000102) {
tmp = z;
} else {
tmp = y * x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -8.2e-37: tmp = y * x elif y <= 0.000102: tmp = z else: tmp = y * x return tmp
function code(x, y, z) tmp = 0.0 if (y <= -8.2e-37) tmp = Float64(y * x); elseif (y <= 0.000102) tmp = z; else tmp = Float64(y * x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -8.2e-37) tmp = y * x; elseif (y <= 0.000102) tmp = z; else tmp = y * x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -8.2e-37], N[(y * x), $MachinePrecision], If[LessEqual[y, 0.000102], z, N[(y * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{-37}:\\
\;\;\;\;y \cdot x\\
\mathbf{elif}\;y \leq 0.000102:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\end{array}
if y < -8.1999999999999996e-37 or 1.01999999999999999e-4 < y Initial program 96.0%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f6452.7
Applied rewrites52.7%
if -8.1999999999999996e-37 < y < 1.01999999999999999e-4Initial program 100.0%
Taylor expanded in y around 0
Applied rewrites72.3%
(FPCore (x y z) :precision binary64 z)
double code(double x, double y, double z) {
return z;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = z
end function
public static double code(double x, double y, double z) {
return z;
}
def code(x, y, z): return z
function code(x, y, z) return z end
function tmp = code(x, y, z) tmp = z; end
code[x_, y_, z_] := z
\begin{array}{l}
\\
z
\end{array}
Initial program 97.8%
Taylor expanded in y around 0
Applied rewrites36.3%
herbie shell --seed 2025119
(FPCore (x y z)
:name "Diagrams.TwoD.Segment:bezierClip from diagrams-lib-1.3.0.3"
:precision binary64
(+ (* x y) (* z (- 1.0 y))))