Add exact arithmetic implementation and tests
- Introduced exact arithmetic with support for large integers and fractions in `exact.gd`, `big_integer.gd`, and `exact_value.gd`. - Implemented a comprehensive test suite in `test_exact_math.gd` to validate arithmetic operations against expected results. - Added a README in `math` directory to document the exact arithmetic system and its usage. - Ensured that all arithmetic operations maintain precision without floating-point errors, using a custom representation for large numbers. - Included methods for encoding and decoding exact values for serialization.
This commit is contained in:
@@ -1,5 +1,15 @@
|
||||
# Проверки поэтапного переноса из Owniverse.U
|
||||
|
||||
## Точная арифметика
|
||||
|
||||
`godot --headless --path Owniverse.GI --script res://tests/test_exact_math.gd`
|
||||
|
||||
Независимый эталон Python Fraction, границы int64 и 10^27, точная сериализация,
|
||||
рецепты с дробными стоимостями, сохранение сумм, время и 100 циклов с меняющимися
|
||||
долями. Все остальные тесты используют числовое сравнение и сериализацию через
|
||||
`E`, а не сравнение ссылок на большие числа. Границы точности и новый формат
|
||||
сохранения описаны в [документации арифметики](../world/owniverse/math/README.md).
|
||||
|
||||
## Модули симуляции
|
||||
|
||||
`godot --headless --path Owniverse.GI --script res://tests/test_module_lifecycle.gd`
|
||||
|
||||
Reference in New Issue
Block a user