Skip to content

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

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

fix(apiquery): encode float32 query values at float32 precision#11
latent-9 wants to merge 1 commit into
ArcadeAI: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.

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