What are some examples of cases where using floating point IS appropriate that are less science-y and more business-y?

Specifically I'm looking for use cases for floating point which involve

* no trigonometry
* no calculus or differential equations
* no rotations (eg no graphics programming)

my agenda here is I'm trying to come up with some rough guidelines to help people understand when it makes sense to use floating point and when it doesn't.

So far I have "if your code is doing statistics/trigonometry/calculus/square roots, you probably want floating point! But if not... consider an integer instead". I think it still needs more nuance but it's a start.

@b0rk This is one of those few places where I look at the problem domain and go "Okay, *this* is easier in Haskell." Because the real answer to the question of "How do you deal with the precision gap in floating point" is "Don't reduce precision until you have to," and lazy evaluation is *great* for that.

... that having been said, you don't need Haskell to implement lazy evaluation.

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.