Average Error: 15.5 → 7.3
Time: 54.5s
Precision: 64
Internal Precision: 576
$\left(\left(\left(a \cdot b\right) \cdot c\right) \cdot d\right) \cdot e$
$\begin{array}{l} \mathbf{if}\;\left(a \cdot b\right) \cdot \left(\left(c \cdot d\right) \cdot e\right) \le -2.449798474933185 \cdot 10^{+307}:\\ \;\;\;\;\left(\left(a \cdot b\right) \cdot c\right) \cdot \left(d \cdot e\right)\\ \mathbf{if}\;\left(a \cdot b\right) \cdot \left(\left(c \cdot d\right) \cdot e\right) \le -3.0996394049401 \cdot 10^{-316}:\\ \;\;\;\;\left(a \cdot b\right) \cdot \left(\left(c \cdot d\right) \cdot e\right)\\ \mathbf{if}\;\left(a \cdot b\right) \cdot \left(\left(c \cdot d\right) \cdot e\right) \le 1.1158373798195 \cdot 10^{-317}:\\ \;\;\;\;\left(\left(a \cdot \left(b \cdot c\right)\right) \cdot d\right) \cdot e\\ \mathbf{if}\;\left(a \cdot b\right) \cdot \left(\left(c \cdot d\right) \cdot e\right) \le 8.480130073042715 \cdot 10^{+262}:\\ \;\;\;\;\left(a \cdot b\right) \cdot \left(\left(c \cdot d\right) \cdot e\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(a \cdot \left(b \cdot c\right)\right) \cdot d\right) \cdot e\\ \end{array}$

# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Split input into 3 regimes
2. ## if (* (* a b) (* (* c d) e)) < -2.449798474933185e+307

1. Initial program 29.8

$\left(\left(\left(a \cdot b\right) \cdot c\right) \cdot d\right) \cdot e$
2. Using strategy rm
3. Applied associate-*l*27.1

$\leadsto \color{blue}{\left(\left(a \cdot b\right) \cdot c\right) \cdot \left(d \cdot e\right)}$

## if -2.449798474933185e+307 < (* (* a b) (* (* c d) e)) < -3.0996394049401e-316 or 1.1158373798195e-317 < (* (* a b) (* (* c d) e)) < 8.480130073042715e+262

1. Initial program 13.2

$\left(\left(\left(a \cdot b\right) \cdot c\right) \cdot d\right) \cdot e$
2. Using strategy rm
3. Applied associate-*l*7.2

$\leadsto \color{blue}{\left(\left(a \cdot b\right) \cdot \left(c \cdot d\right)\right)} \cdot e$
4. Using strategy rm
5. Applied associate-*l*1.1

$\leadsto \color{blue}{\left(a \cdot b\right) \cdot \left(\left(c \cdot d\right) \cdot e\right)}$

## if -3.0996394049401e-316 < (* (* a b) (* (* c d) e)) < 1.1158373798195e-317 or 8.480130073042715e+262 < (* (* a b) (* (* c d) e))

1. Initial program 16.2

$\left(\left(\left(a \cdot b\right) \cdot c\right) \cdot d\right) \cdot e$
2. Using strategy rm
3. Applied associate-*l*10.9

$\leadsto \left(\color{blue}{\left(a \cdot \left(b \cdot c\right)\right)} \cdot d\right) \cdot e$
3. Recombined 3 regimes into one program.

# Runtime

Time bar (total: 54.5s)Debug log

herbie shell --seed '#(2775764126 3555076145 3898259844 1891440260 2599947619 1948460636)'
(FPCore (a b c d e)
:name "a*b*c*d*e"
(* (* (* (* a b) c) d) e))