Comments (5)
Re "floatish", the problem is that if we send or accept decimals in the
API, then a lot of programmers will use floats/doubles to produce or
consume those numbers, which will lead to bugs.
It's entirely possible to use a proper decimal datatype instead of
floats/doubles in all modern languages, so a potential mitigation is just
to add documentation saying "do NOT ever use floats/doubles to store or
process this. There is a library in your language that handles decimals. Go
find out and use it and nothing but it to handle these numbers."
Here's a simple example of the problems with using floats for decimals: 0.1
- 0.1 != 0.01
Not only is 0.1 times 0.1 not exactly 0.01, it isn't even the closest
possible number to 0.01.
On Jul 20, 2016 10:52 AM, "Nathan Wilcox" [email protected] wrote:
Unresolved issue: How do we represent values in the API? We want lossless
representation, but we also are dealing with Bitcoin's API which may use
"float-ish" numbers. Something to review and make an explicit decision on.โ
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#56 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/APp9QFNXyBUCPrv5CeOBs5zjQsm7WECIks5qXlIxgaJpZM4JQ52P
.
from zips.
Related is how to manage proving parameters: zcash/zcash#432 (comment)
Tangential topics for SPV clients: #288 delegated JoinSplit detection and #1113 delegated proving.
from zips.
Unresolved issue: How do we represent values in the API? We want lossless representation, but we also are dealing with Bitcoin's API which may use "float-ish" numbers. Something to review and make an explicit decision on.
from zips.
Hm, is the payment API in scope for the specification?
from zips.
I'm deciding that it is not in scope for the specification, but should be maintained as a ZIP. Can someone convert https://github.com/zcash/zcash/blob/master/doc/payment-api.md to rST and submit it please?
from zips.
Related Issues (20)
- [protocol spec] Document infeasibility of an attack on Poseidon HOT 1
- Define a Bech32 encoding for Sapling diversifiable full/incoming viewing keys HOT 3
- ZIP 32 should explicitly say that the master seed needs at least 256 bits of entropy
- Update all conformance key word boilerplate to reference BCP 14 rather than RFC 2119
- Add GitHub Actions workflow to render HTML, and remove checked-in HTML files HOT 1
- Add GitHub Actions workflow to run link checker
- `make linkcheck` reports false positives for links into HTML files on GitHub HOT 2
- [protocol spec] Acknowledgements are missing Brian Warner as a contributor to discovery of the Faerie Gold attack on Zerocash HOT 1
- Call for comments: ZSA Swaps base proposal HOT 3
- Rendering/Format Proposal: migrate ZIPs to a single `mdbook` instance.
- Clarify in ZIP 0 and/or the ZIP Guide how Deployment sections should be written
- [protocol spec] Rename ยง4.19.3 "Decryption using a Full Viewing Key (Sapling and Orchard)" in the protocol specification HOT 1
- A typo in transaction consensus rules HOT 1
- Protocol spec version 2024.4.1
- Update protocol spec references in ZSA ZIPs to point to 2023.4.0
- Update psi' to psi^nf in ZSA ZIPs
- [ZIP 321] Add examples that include Unified Addresses
- ZSA UX considerations for AssetId discovery and authentication
- Proposal: for ZIPs proposing consensus changes, require a public persistent feature-gated testnet as a prerequisite for some maturity level. HOT 1
- [ZIP 320] Transparent-source Addresses
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zips.