From 619795d721b1a417193eb663a09329ca771eb152 Mon Sep 17 00:00:00 2001 From: Adarsh Dubey <84132532+inclinedadarsh@users.noreply.github.com> Date: Mon, 23 Dec 2024 20:20:38 +0530 Subject: [PATCH 1/3] docs: add note clarifying multipleOf implementation add a note explaining the difference between float-point implementation of programming languages and json schema --- pages/understanding-json-schema/reference/numeric.md | 1 + 1 file changed, 1 insertion(+) diff --git a/pages/understanding-json-schema/reference/numeric.md b/pages/understanding-json-schema/reference/numeric.md index dbe32eaf5..3c7295717 100644 --- a/pages/understanding-json-schema/reference/numeric.md +++ b/pages/understanding-json-schema/reference/numeric.md @@ -162,6 +162,7 @@ The multiple can be a floating point number: 4.021 ``` + The JSON Specification allows an arbitrary implementation of the `multipleOf` keyword and is not constrained by the floating-point behavior of most programming languages. In contrast, most programming languages adhere to the IEEE754 standard for floating-point numbers, which can result in discrepancies between validation according to the JSON Specification and the behavior in programming languages. From 87d9f72e94f62bdf3db7f7a6b927dd219971d211 Mon Sep 17 00:00:00 2001 From: Adarsh Dubey <84132532+inclinedadarsh@users.noreply.github.com> Date: Sat, 4 Jan 2025 14:16:29 +0530 Subject: [PATCH 2/3] fix: reword note on numerical precision --- pages/understanding-json-schema/reference/numeric.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/understanding-json-schema/reference/numeric.md b/pages/understanding-json-schema/reference/numeric.md index 3c7295717..ee50912f1 100644 --- a/pages/understanding-json-schema/reference/numeric.md +++ b/pages/understanding-json-schema/reference/numeric.md @@ -162,7 +162,7 @@ The multiple can be a floating point number: 4.021 ``` - The JSON Specification allows an arbitrary implementation of the `multipleOf` keyword and is not constrained by the floating-point behavior of most programming languages. In contrast, most programming languages adhere to the IEEE754 standard for floating-point numbers, which can result in discrepancies between validation according to the JSON Specification and the behavior in programming languages. + The JSON Schema Specification defines numerical precision independently of the IEEE 754 standard. This means developers do not need to worry about the typical limitations of floating-point arithmetic, such as precision loss or representation errors, which are common in most programming languages. From adc02b767dab865960c4670d0403333748844b7e Mon Sep 17 00:00:00 2001 From: Adarsh Dubey <84132532+inclinedadarsh@users.noreply.github.com> Date: Thu, 23 Jan 2025 19:35:59 +0000 Subject: [PATCH 3/3] fix: clarify wording in numerical precision note --- pages/understanding-json-schema/reference/numeric.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/understanding-json-schema/reference/numeric.md b/pages/understanding-json-schema/reference/numeric.md index ee50912f1..e674d0dc2 100644 --- a/pages/understanding-json-schema/reference/numeric.md +++ b/pages/understanding-json-schema/reference/numeric.md @@ -162,7 +162,7 @@ The multiple can be a floating point number: 4.021 ``` - The JSON Schema Specification defines numerical precision independently of the IEEE 754 standard. This means developers do not need to worry about the typical limitations of floating-point arithmetic, such as precision loss or representation errors, which are common in most programming languages. + The JSON Specification defines numerical precision independently of the IEEE 754 standard. This means developers do not need to worry about the typical limitations of floating-point arithmetic, such as precision loss or representation errors, which are common in most programming languages.