Skip to content

fix(apiquery): encode float32 query values at float32 precision - #554

Closed
latent-9 wants to merge 1 commit into
lithic-com:mainfrom
latent-9:fix/apiquery-float32-precision
Closed

latent-9 wants to merge 1 commit into
lithic-com:mainfrom
latent-9:fix/apiquery-float32-precision

Conversation

@latent-9

Copy link
Copy Markdown

internal/apiquery/encoder.go formats both reflect.Float32 and reflect.Float64 values with strconv.FormatFloat(..., 64), so float32 query parameters are serialized with float64 noise, e.g. 43.76 becomes 43.7599983215332. The sibling internal/apiform/encoder.go already splits the two kinds; this makes apiquery match. Query tests pinned to the noisy output are updated to the exact value.

@latent-9

Copy link
Copy Markdown
Author

Closing: mass submitted fix, no traction; will resubmit per-repo with proper context if still relevant.

@latent-9 latent-9 closed this Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant