crystal-data / num.cr

Scientific computing in pure Crystal
MIT License
151 stars 12 forks source link

Rewriting base quite a bit to support better inline operations #15

Closed christopherzimmerman closed 4 years ago

christopherzimmerman commented 4 years ago

Instead of something expensive like:

1 / t + t / 2 * t

Use

t.map { |i| 1 / i + i / 2 * i }

4 times a smaller constant. Also ironic that this branch is called einsum and yet einsum has been axed.