Increased test coverage
Using 'case' instead of trickled ifs

Seems the perfect case for case ;).
Compated var declaration and initialization

No need to have two lines. The type is even explicit when we are type
casting to `float32(size)`
Increased coverage
standardized supported sizes
Refactor regexp.Compile to init

It would be better to not recompile a static regular expression each
time the function executes. Abstracting it to the `init()` method.

TODO: Check if `panic()` is the right thing to do on `init()`
Remove named returns since not used in func body

Might prevent potential subtle bugs
Better not use `error` as var name

Better not to use `error` as var name since it might eclipse the error
type and cause subtle bugs