Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1, B

Percentage Accurate: 81.3% → 92.4%
Time: 3.5s
Alternatives: 4
Speedup: 1.8×

Specification

?
\[\begin{array}{l} \\ x \cdot \frac{\frac{y}{z} \cdot t}{t} \end{array} \]
(FPCore (x y z t) :precision binary64 (* x (/ (* (/ y z) t) t)))
double code(double x, double y, double z, double t) {
	return x * (((y / z) * t) / 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) * t) / t)
end function
public static double code(double x, double y, double z, double t) {
	return x * (((y / z) * t) / t);
}
def code(x, y, z, t):
	return x * (((y / z) * t) / t)
function code(x, y, z, t)
	return Float64(x * Float64(Float64(Float64(y / z) * t) / t))
end
function tmp = code(x, y, z, t)
	tmp = x * (((y / z) * t) / t);
end
code[x_, y_, z_, t_] := N[(x * N[(N[(N[(y / z), $MachinePrecision] * t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x \cdot \frac{\frac{y}{z} \cdot t}{t}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 4 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 81.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x \cdot \frac{\frac{y}{z} \cdot t}{t} \end{array} \]
(FPCore (x y z t) :precision binary64 (* x (/ (* (/ y z) t) t)))
double code(double x, double y, double z, double t) {
	return x * (((y / z) * t) / 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) * t) / t)
end function
public static double code(double x, double y, double z, double t) {
	return x * (((y / z) * t) / t);
}
def code(x, y, z, t):
	return x * (((y / z) * t) / t)
function code(x, y, z, t)
	return Float64(x * Float64(Float64(Float64(y / z) * t) / t))
end
function tmp = code(x, y, z, t)
	tmp = x * (((y / z) * t) / t);
end
code[x_, y_, z_, t_] := N[(x * N[(N[(N[(y / z), $MachinePrecision] * t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x \cdot \frac{\frac{y}{z} \cdot t}{t}
\end{array}

Alternative 1: 92.4% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 1.7 \cdot 10^{-211}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y 1.7e-211) (/ y (/ z x)) (/ x (/ z y))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= 1.7e-211) {
		tmp = y / (z / x);
	} else {
		tmp = x / (z / y);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (y <= 1.7d-211) then
        tmp = y / (z / x)
    else
        tmp = x / (z / y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= 1.7e-211) {
		tmp = y / (z / x);
	} else {
		tmp = x / (z / y);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= 1.7e-211:
		tmp = y / (z / x)
	else:
		tmp = x / (z / y)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (y <= 1.7e-211)
		tmp = Float64(y / Float64(z / x));
	else
		tmp = Float64(x / Float64(z / y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= 1.7e-211)
		tmp = y / (z / x);
	else
		tmp = x / (z / y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[y, 1.7e-211], N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.7 \cdot 10^{-211}:\\
\;\;\;\;\frac{y}{\frac{z}{x}}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 1.7e-211

    1. Initial program 78.8%

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t} \]
    2. Step-by-step derivation
      1. associate-/l*87.5%

        \[\leadsto x \cdot \color{blue}{\frac{\frac{y}{z}}{\frac{t}{t}}} \]
      2. *-inverses87.5%

        \[\leadsto x \cdot \frac{\frac{y}{z}}{\color{blue}{1}} \]
      3. /-rgt-identity87.5%

        \[\leadsto x \cdot \color{blue}{\frac{y}{z}} \]
    3. Simplified87.5%

      \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    4. Step-by-step derivation
      1. *-commutative87.5%

        \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
      2. associate-*l/87.8%

        \[\leadsto \color{blue}{\frac{y \cdot x}{z}} \]
      3. associate-/l*95.9%

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
    5. Applied egg-rr95.9%

      \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]

    if 1.7e-211 < y

    1. Initial program 86.1%

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t} \]
    2. Step-by-step derivation
      1. associate-/l*97.1%

        \[\leadsto x \cdot \color{blue}{\frac{\frac{y}{z}}{\frac{t}{t}}} \]
      2. *-inverses97.1%

        \[\leadsto x \cdot \frac{\frac{y}{z}}{\color{blue}{1}} \]
      3. /-rgt-identity97.1%

        \[\leadsto x \cdot \color{blue}{\frac{y}{z}} \]
    3. Simplified97.1%

      \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    4. Step-by-step derivation
      1. clear-num97.1%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{z}{y}}} \]
      2. un-div-inv97.9%

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    5. Applied egg-rr97.9%

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification96.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 1.7 \cdot 10^{-211}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \end{array} \]

Alternative 2: 92.3% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 1.3 \cdot 10^{-210}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y 1.3e-210) (* y (/ x z)) (* x (/ y z))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= 1.3e-210) {
		tmp = y * (x / z);
	} else {
		tmp = x * (y / z);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (y <= 1.3d-210) then
        tmp = y * (x / z)
    else
        tmp = x * (y / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= 1.3e-210) {
		tmp = y * (x / z);
	} else {
		tmp = x * (y / z);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= 1.3e-210:
		tmp = y * (x / z)
	else:
		tmp = x * (y / z)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (y <= 1.3e-210)
		tmp = Float64(y * Float64(x / z));
	else
		tmp = Float64(x * Float64(y / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= 1.3e-210)
		tmp = y * (x / z);
	else
		tmp = x * (y / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[y, 1.3e-210], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.3 \cdot 10^{-210}:\\
\;\;\;\;y \cdot \frac{x}{z}\\

\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 1.2999999999999999e-210

    1. Initial program 78.9%

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t} \]
    2. Step-by-step derivation
      1. *-commutative78.9%

        \[\leadsto \color{blue}{\frac{\frac{y}{z} \cdot t}{t} \cdot x} \]
      2. associate-/l*87.6%

        \[\leadsto \color{blue}{\frac{\frac{y}{z}}{\frac{t}{t}}} \cdot x \]
      3. *-inverses87.6%

        \[\leadsto \frac{\frac{y}{z}}{\color{blue}{1}} \cdot x \]
      4. /-rgt-identity87.6%

        \[\leadsto \color{blue}{\frac{y}{z}} \cdot x \]
      5. associate-*l/87.9%

        \[\leadsto \color{blue}{\frac{y \cdot x}{z}} \]
      6. associate-*r/96.0%

        \[\leadsto \color{blue}{y \cdot \frac{x}{z}} \]
    3. Simplified96.0%

      \[\leadsto \color{blue}{y \cdot \frac{x}{z}} \]

    if 1.2999999999999999e-210 < y

    1. Initial program 86.0%

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t} \]
    2. Step-by-step derivation
      1. associate-/l*97.1%

        \[\leadsto x \cdot \color{blue}{\frac{\frac{y}{z}}{\frac{t}{t}}} \]
      2. *-inverses97.1%

        \[\leadsto x \cdot \frac{\frac{y}{z}}{\color{blue}{1}} \]
      3. /-rgt-identity97.1%

        \[\leadsto x \cdot \color{blue}{\frac{y}{z}} \]
    3. Simplified97.1%

      \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification96.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 1.3 \cdot 10^{-210}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \end{array} \]

Alternative 3: 92.5% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 1.8 \cdot 10^{-205}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y 1.8e-205) (* y (/ x z)) (/ x (/ z y))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= 1.8e-205) {
		tmp = y * (x / z);
	} else {
		tmp = x / (z / y);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (y <= 1.8d-205) then
        tmp = y * (x / z)
    else
        tmp = x / (z / y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= 1.8e-205) {
		tmp = y * (x / z);
	} else {
		tmp = x / (z / y);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= 1.8e-205:
		tmp = y * (x / z)
	else:
		tmp = x / (z / y)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (y <= 1.8e-205)
		tmp = Float64(y * Float64(x / z));
	else
		tmp = Float64(x / Float64(z / y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= 1.8e-205)
		tmp = y * (x / z);
	else
		tmp = x / (z / y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[y, 1.8e-205], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.8 \cdot 10^{-205}:\\
\;\;\;\;y \cdot \frac{x}{z}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 1.7999999999999999e-205

    1. Initial program 79.2%

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t} \]
    2. Step-by-step derivation
      1. *-commutative79.2%

        \[\leadsto \color{blue}{\frac{\frac{y}{z} \cdot t}{t} \cdot x} \]
      2. associate-/l*87.8%

        \[\leadsto \color{blue}{\frac{\frac{y}{z}}{\frac{t}{t}}} \cdot x \]
      3. *-inverses87.8%

        \[\leadsto \frac{\frac{y}{z}}{\color{blue}{1}} \cdot x \]
      4. /-rgt-identity87.8%

        \[\leadsto \color{blue}{\frac{y}{z}} \cdot x \]
      5. associate-*l/88.1%

        \[\leadsto \color{blue}{\frac{y \cdot x}{z}} \]
      6. associate-*r/96.0%

        \[\leadsto \color{blue}{y \cdot \frac{x}{z}} \]
    3. Simplified96.0%

      \[\leadsto \color{blue}{y \cdot \frac{x}{z}} \]

    if 1.7999999999999999e-205 < y

    1. Initial program 85.8%

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t} \]
    2. Step-by-step derivation
      1. associate-/l*97.1%

        \[\leadsto x \cdot \color{blue}{\frac{\frac{y}{z}}{\frac{t}{t}}} \]
      2. *-inverses97.1%

        \[\leadsto x \cdot \frac{\frac{y}{z}}{\color{blue}{1}} \]
      3. /-rgt-identity97.1%

        \[\leadsto x \cdot \color{blue}{\frac{y}{z}} \]
    3. Simplified97.1%

      \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    4. Step-by-step derivation
      1. clear-num97.1%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{z}{y}}} \]
      2. un-div-inv97.9%

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    5. Applied egg-rr97.9%

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification96.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 1.8 \cdot 10^{-205}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \end{array} \]

Alternative 4: 92.0% accurate, 1.8× speedup?

\[\begin{array}{l} \\ x \cdot \frac{y}{z} \end{array} \]
(FPCore (x y z t) :precision binary64 (* x (/ y z)))
double code(double x, double y, double z, double t) {
	return x * (y / z);
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = x * (y / z)
end function
public static double code(double x, double y, double z, double t) {
	return x * (y / z);
}
def code(x, y, z, t):
	return x * (y / z)
function code(x, y, z, t)
	return Float64(x * Float64(y / z))
end
function tmp = code(x, y, z, t)
	tmp = x * (y / z);
end
code[x_, y_, z_, t_] := N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x \cdot \frac{y}{z}
\end{array}
Derivation
  1. Initial program 82.0%

    \[x \cdot \frac{\frac{y}{z} \cdot t}{t} \]
  2. Step-by-step derivation
    1. associate-/l*91.8%

      \[\leadsto x \cdot \color{blue}{\frac{\frac{y}{z}}{\frac{t}{t}}} \]
    2. *-inverses91.8%

      \[\leadsto x \cdot \frac{\frac{y}{z}}{\color{blue}{1}} \]
    3. /-rgt-identity91.8%

      \[\leadsto x \cdot \color{blue}{\frac{y}{z}} \]
  3. Simplified91.8%

    \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
  4. Final simplification91.8%

    \[\leadsto x \cdot \frac{y}{z} \]

Developer target: 98.1% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y}{z}\\ t_2 := \frac{\frac{y}{z} \cdot t}{t}\\ t_3 := \frac{y}{\frac{z}{x}}\\ \mathbf{if}\;t_2 < -1.20672205123045 \cdot 10^{+245}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 < -5.907522236933906 \cdot 10^{-275}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 < 5.658954423153415 \cdot 10^{-65}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 < 2.0087180502407133 \cdot 10^{+217}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (/ y z))) (t_2 (/ (* (/ y z) t) t)) (t_3 (/ y (/ z x))))
   (if (< t_2 -1.20672205123045e+245)
     t_3
     (if (< t_2 -5.907522236933906e-275)
       t_1
       (if (< t_2 5.658954423153415e-65)
         t_3
         (if (< t_2 2.0087180502407133e+217) t_1 (/ (* y x) z)))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (y / z);
	double t_2 = ((y / z) * t) / t;
	double t_3 = y / (z / x);
	double tmp;
	if (t_2 < -1.20672205123045e+245) {
		tmp = t_3;
	} else if (t_2 < -5.907522236933906e-275) {
		tmp = t_1;
	} else if (t_2 < 5.658954423153415e-65) {
		tmp = t_3;
	} else if (t_2 < 2.0087180502407133e+217) {
		tmp = t_1;
	} else {
		tmp = (y * x) / z;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = x * (y / z)
    t_2 = ((y / z) * t) / t
    t_3 = y / (z / x)
    if (t_2 < (-1.20672205123045d+245)) then
        tmp = t_3
    else if (t_2 < (-5.907522236933906d-275)) then
        tmp = t_1
    else if (t_2 < 5.658954423153415d-65) then
        tmp = t_3
    else if (t_2 < 2.0087180502407133d+217) then
        tmp = t_1
    else
        tmp = (y * x) / z
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x * (y / z);
	double t_2 = ((y / z) * t) / t;
	double t_3 = y / (z / x);
	double tmp;
	if (t_2 < -1.20672205123045e+245) {
		tmp = t_3;
	} else if (t_2 < -5.907522236933906e-275) {
		tmp = t_1;
	} else if (t_2 < 5.658954423153415e-65) {
		tmp = t_3;
	} else if (t_2 < 2.0087180502407133e+217) {
		tmp = t_1;
	} else {
		tmp = (y * x) / z;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (y / z)
	t_2 = ((y / z) * t) / t
	t_3 = y / (z / x)
	tmp = 0
	if t_2 < -1.20672205123045e+245:
		tmp = t_3
	elif t_2 < -5.907522236933906e-275:
		tmp = t_1
	elif t_2 < 5.658954423153415e-65:
		tmp = t_3
	elif t_2 < 2.0087180502407133e+217:
		tmp = t_1
	else:
		tmp = (y * x) / z
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(y / z))
	t_2 = Float64(Float64(Float64(y / z) * t) / t)
	t_3 = Float64(y / Float64(z / x))
	tmp = 0.0
	if (t_2 < -1.20672205123045e+245)
		tmp = t_3;
	elseif (t_2 < -5.907522236933906e-275)
		tmp = t_1;
	elseif (t_2 < 5.658954423153415e-65)
		tmp = t_3;
	elseif (t_2 < 2.0087180502407133e+217)
		tmp = t_1;
	else
		tmp = Float64(Float64(y * x) / z);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (y / z);
	t_2 = ((y / z) * t) / t;
	t_3 = y / (z / x);
	tmp = 0.0;
	if (t_2 < -1.20672205123045e+245)
		tmp = t_3;
	elseif (t_2 < -5.907522236933906e-275)
		tmp = t_1;
	elseif (t_2 < 5.658954423153415e-65)
		tmp = t_3;
	elseif (t_2 < 2.0087180502407133e+217)
		tmp = t_1;
	else
		tmp = (y * x) / z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(y / z), $MachinePrecision] * t), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$3 = N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$2, -1.20672205123045e+245], t$95$3, If[Less[t$95$2, -5.907522236933906e-275], t$95$1, If[Less[t$95$2, 5.658954423153415e-65], t$95$3, If[Less[t$95$2, 2.0087180502407133e+217], t$95$1, N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{z}\\
t_2 := \frac{\frac{y}{z} \cdot t}{t}\\
t_3 := \frac{y}{\frac{z}{x}}\\
\mathbf{if}\;t_2 < -1.20672205123045 \cdot 10^{+245}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t_2 < -5.907522236933906 \cdot 10^{-275}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t_2 < 5.658954423153415 \cdot 10^{-65}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t_2 < 2.0087180502407133 \cdot 10^{+217}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x}{z}\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023196 
(FPCore (x y z t)
  :name "Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1, B"
  :precision binary64

  :herbie-target
  (if (< (/ (* (/ y z) t) t) -1.20672205123045e+245) (/ y (/ z x)) (if (< (/ (* (/ y z) t) t) -5.907522236933906e-275) (* x (/ y z)) (if (< (/ (* (/ y z) t) t) 5.658954423153415e-65) (/ y (/ z x)) (if (< (/ (* (/ y z) t) t) 2.0087180502407133e+217) (* x (/ y z)) (/ (* y x) z)))))

  (* x (/ (* (/ y z) t) t)))