Skip to content
This repository has been archived by the owner on Aug 19, 2020. It is now read-only.

How to (not) use floating point numbers #7

Open
joepetrowski opened this issue Mar 25, 2020 · 8 comments
Open

How to (not) use floating point numbers #7

joepetrowski opened this issue Mar 25, 2020 · 8 comments
Labels
K1 - Runtime Info about the runtime. T2 - New Page Add a new page to the KB.

Comments

@joepetrowski
Copy link
Contributor

A lot of runtime developers ask about using floats in the runtime. Our knowledge base should include a page that:

  1. Explains why floats are problematic, and
  2. Tells people how to accomplish their goal without floats.
@joepetrowski joepetrowski added K1 - Runtime Info about the runtime. T2 - New Page Add a new page to the KB. labels Mar 25, 2020
@JoshOrndorff
Copy link
Contributor

See also JoshOrndorff/recipes#196

@coriolinus
Copy link

I suspect that most users who desire this feature can get what they need from substrate-fixed.

@joepetrowski
Copy link
Contributor Author

joepetrowski commented Mar 25, 2020

I suspect that most users who desire this feature can get what they need from substrate-fixed.

Sure, but we still need a page explaining why floating point is not OK and listing some options and tools, of which substrate-fixed is certainly one.

@JoshOrndorff
Copy link
Contributor

The acronym FP is a little ambiguous in this context.

@apopiak
Copy link
Contributor

apopiak commented Mar 27, 2020

I'd like to take on this one.

@coriolinus
Copy link

@apopiak See JoshOrndorff/recipes#196

@apopiak
Copy link
Contributor

apopiak commented Apr 23, 2020

Hey @joepetrowski , sorry but I've been dragging my feet on this one a little and now I'm neck deep in updating the weights for launch. I don't think I'll get to this in the next 1-2 weeks and it's been open for a while, so might be good to re-assign if it's a priority.
I talked to Marcio and he said he's willing to help (he's working on the implementation side of fixed point math in substrate).
I'd be happy to take this on again as soon as the substrate weights stuff is through.

@apopiak apopiak removed their assignment Apr 23, 2020
@apopiak
Copy link
Contributor

apopiak commented Apr 23, 2020

FYI #14 is a draft PR with the prep work for this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
K1 - Runtime Info about the runtime. T2 - New Page Add a new page to the KB.
Projects
None yet
Development

No branches or pull requests

4 participants