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)
- NU6 specification audit
- NU7 specification audit
- Documentation Q4 2024
- Protocol spec version 2024.6.1
- Protocol spec version 2025.7.0
- Q3 2024 protocol spec updates
- Protocol spec version 2024.5.0
- Protocol spec version 2024.5.1
- ZIP ?: Deployment of the NU7 Network Upgrade
- [protocol spec] Section 5.4.1.9 (Sinsemilla Hash Function) declares use of LEOS2IP when it should declare use of LEBS2IP HOT 1
- Index is not updated by CI HOT 1
- [ZSA] Describe state that full nodes must store for each asset, and explain the rationale for the 512-bytes asset_id limit
- [ZSA] Ensure that ZIP 209-style issuance tracking is applied to ZSA assets
- [ZSA] Add ZIP for recommended wallet support of ZSAs HOT 1
- [ZSA] Clarify the interaction between enableSpendsOrchard, enableOutputsOrchard, and enableZSAs HOT 1
- Variable block sizes for blocks with large, short-lived memos
- Consider a Zcash-specific namespace for compatibility with CAIP standards HOT 1
- [ZIP idea] Blocks should balance exactly HOT 1
- Update ZIP 32 to document the transparent key hierarchy, including the use of index 2 at the scope/change level
- De-duplicate footnotes in markdown rendering
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.