[tor-bugs] #23368 [Core Tor/Tor]: Add design and coding guidelines for using floating point
Tor Bug Tracker & Wiki
blackhole at torproject.org
Thu Aug 31 02:36:54 UTC 2017
#23368: Add design and coding guidelines for using floating point
------------------------------+--------------------------------
Reporter: teor | Owner: (none)
Type: enhancement | Status: new
Priority: Medium | Milestone: Tor: 0.3.2.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Keywords: doc, tor-safety
Actual Points: | Parent ID:
Points: 0.5 | Reviewer:
Sponsor: |
------------------------------+--------------------------------
We should add these to a document in doc/HACKING:
1. Don't use floats.
2. If you must use floats, document how the limits of floating point
precision and calculation accuracy affect function outputs.
3. Remember that different environments can get different results from the
same floating point calculations. So you can't use floats in anything that
needs to be deterministic, like consensus generation.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/23368>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list