Skip to content

fix: move bignum-dependent multipleOf tests to optional/bignum.json#866

Open
Sagar-6203620715 wants to merge 1 commit intojson-schema-org:mainfrom
Sagar-6203620715:move-bignum-multipleof-to-optional
Open

fix: move bignum-dependent multipleOf tests to optional/bignum.json#866
Sagar-6203620715 wants to merge 1 commit intojson-schema-org:mainfrom
Sagar-6203620715:move-bignum-multipleof-to-optional

Conversation

@Sagar-6203620715
Copy link

What this changes

Two test groups in the core multipleOf.json files require arbitrary-precision arithmetic to evaluate correctly, making them de-facto mandatory bignum tests. This violates the suite's own convention that bignum support is optional.

The two affected test groups, moved across all 6 drafts:

  • "float division = inf" — validates 1e308 against multipleOf: 0.123456789, expects valid: false. Assumes implementations overflow to false rather than erroring/throwing, which is not guaranteed on all platforms.

  • "small multiple of large integer" — validates 12391239123 against multipleOf: 1e-8, expects valid: true. Requires arbitrary-precision arithmetic to compute correctly; IEEE 754 double implementations will silently produce a wrong result.

Files modified

Each multipleOf.json retains exactly 3 test groups: "by int", "by number", and "by small number" — none of which require bignum support.

Notes

  • Draft-specific $schema URIs are preserved exactly as they appeared in the original multipleOf.json files (draft4/6/7 have no $schema; 2019-09, 2020-12, and v1 retain their respective URIs).
  • The wording difference in draft4 ("invalid, but naive..." vs "always invalid, but naive..." in later drafts) is intentionally preserved.
  • All 12 modified files pass JSON validation.
  • No other tests are affected.

Fixes #536

Signed-off-by: Sagar-6203620715 <sagar6203620715@gmail.com>
@Sagar-6203620715 Sagar-6203620715 requested a review from a team as a code owner March 7, 2026 08:35
@Sagar-6203620715
Copy link
Author

/cc @Julian

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.

multipleOf contains incorrectly optional (bignum dependent) tests

2 participants