@cella-lang/python 0.1.202611090955 → 0.1.202611100309
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGES.md +6 -0
- package/README.md +3 -1
- package/index.json +264 -248
- package/package.json +5 -5
- package/python.builtins.cell +0 -0
- package/python.calls.cell +0 -0
- package/python.cell +0 -0
- package/python.containers.cell +0 -0
- package/python.debugging.cell +0 -0
- package/python.dispatch.cell +0 -0
- package/python.execution.cell +0 -0
- package/python.flattening.cell +0 -0
- package/python.generators.cell +0 -0
- package/python.iterators.cell +0 -0
- package/python.lazy.cell +0 -0
- package/python.lowering.cell +0 -0
- package/python.methods.cell +0 -0
- package/python.numbers.cell +0 -0
- package/python.objects.cell +0 -0
- package/python.operations.cell +0 -0
- package/python.printing.cell +0 -0
- package/python.querying.cell +0 -0
- package/python.random.cell +0 -0
- package/python.session.cell +0 -0
- package/python.sets.cell +0 -0
- package/python.sorting.cell +0 -0
- package/python.symbols.cell +0 -0
- package/python.syntax.cell +0 -0
- package/python.text.cell +0 -0
- package/python.values.cell +0 -0
- package/python.variables.cell +0 -0
package/CHANGES.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## 未發佈
|
|
4
4
|
|
|
5
|
+
- **新增 `math.fmod`**(之前判 unknown):照 CPython 的 `math_fmod`——結果帶被除數的符號,除數是 0 或被除數無限(除數有限)是
|
|
6
|
+
`ValueError: math domain error`,無限的除數給被除數,NaN 傳下去,參數個數與型別的錯誤同 `math.pow`。對 CPython 的差分
|
|
7
|
+
(`tools/diff.py --only-math`,fmod 與 pow 的數值格子)全一致。fmod 是精確的,不附假設。
|
|
8
|
+
- **`math.pow` 與浮點數的 `**` 的判決附假設 `libm:math.correctlyRounded`**(`implementation` 是 `libm`,和 C 家族同一條):CPython 把 `pow` 的精度交給
|
|
9
|
+
平台的數學函式庫,模型給正確捨入的結果。`math.sqrt`、`math.fmod` 是 IEEE 754 的精確運算,不附。有 `:` 的假設名依冒號前後拆成
|
|
10
|
+
`implementation` 與 `choice`,沒有的照舊是 `CPython`。
|
|
5
11
|
- **新增 `python.observedTypes source input fuel`**(形狀和 semorphe 談定,2026-11-09):跑一次程式(參數同 `python.verdict`),回
|
|
6
12
|
`{"verdict", "nodes", "basis"}`。`nodes` 和 C 家族的 `types().nodes` 同形狀(節點 id 對型別文字),型別照 Python typing 的寫法:
|
|
7
13
|
`int`、`float`、`str`、`bool`、`None`、類別名;`list[int]`、`set[str]`、`dict[str, int]` 取元素(鍵、值)型別的聯集,`tuple[int, str]`
|
package/README.md
CHANGED
|
@@ -74,7 +74,9 @@ Each module imports the standard library, `@cella-lang/machine` and the modules
|
|
|
74
74
|
A float's `**` (and `pow`, `math.pow`, the `math` functions) gives the correctly rounded result. CPython calls the
|
|
75
75
|
platform's C `pow`, which the C standard does not require to round correctly (macOS gives `1.7976931348623157e308 **
|
|
76
76
|
0.5` one unit in the last place above the correctly rounded value); as for C and C++, a verdict that depends on the
|
|
77
|
-
last bit holds for a libm that rounds correctly.
|
|
77
|
+
last bit holds for a libm that rounds correctly. A verdict that computed `math.pow` or a float `**` says so in `assumes`
|
|
78
|
+
(`{"implementation": "libm", "choice": "math.correctlyRounded"}`, the same entry the C family writes for `pow`); `math.sqrt`
|
|
79
|
+
and `math.fmod` are exact and assume nothing.
|
|
78
80
|
|
|
79
81
|
## Not in this version
|
|
80
82
|
|