Add float scalar support for geo and approximate measurements #5
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/star-lang#5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
STAR-LANG-RESEARCH-009incorrectly rejected all floating-point JSON values. The current Star-CL fixture models latitude, longitude, altitude, and accuracy asdecimal, but these are approximate geospatial measurements and should be represented as floats.Numeric model
integer: exact integer, encoded as a JSON numberfloat: finite IEEE-754 binary64 value, encoded as a JSON numberdecimal: exact base-10 value, encoded as a canonical JSON stringUse
floatfor coordinates, altitude, accuracy, measurements, and scientific values where approximate arithmetic is expected. Keepdecimalfor money, contractual rates, fixed-scale quantities, and other exact values.Canonical float serialization decision
floatis a Common Lispdouble-float; the implementation must verify that the host representation is IEEE-754 binary64. Python and TypeScript are generated binding targets, not canonicalization runtimes.e, the RFC/ECMAScript fixed-versus-exponent thresholds and exponent spelling, with no redundant digits or zeros.0.Required implementation
floatas a supported scalar base type.double-floathas binary radix, 53-bit precision, and the IEEE-754 binary64 exponent range.floatencoder instar-canonical-json; route every manifest, wire-envelope, fixture, and generated-contract serialization path through it.0.floatto Common Lispdouble-float, Pythonfloat, and TypeScriptnumber.decimalmapped to exact canonical strings.latitudeandlongitudescalar bases fromdecimaltofloat.geo.altandgeo.accuracyfromdecimaltofloat.Research status
This issue is the accepted implementation amendment for the numeric portion of
STAR-LANG-RESEARCH-009. Synchronize that research document with this decision before marking the research ledger complete; implementation may proceed against this issue now.