Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions docs/hi/project/scientific-computing.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ stable `softmax`, score ranking और विशेष loss-gradient kernels ह
सामान्य native compiler, GPU tensors और पूरा automatic differentiation
framework अभी नहीं बने हैं।

## नया विकास: sampled calculus
## Source में उपलब्ध sampled calculus (अभी रिलीज़ नहीं हुआ)

[Compiler PR #153](https://github.com/scarp-lang/scarp/pull/153)
में दो नए, typed और pure functions का प्रस्ताव एवं implementation है:
प्रकाशित alpha.3 के बाद **main में merge हो चुका है**। इसमें दो typed और pure functions जोड़े गए:

| प्रस्तावित फ़ंक्शन | नतीजा | कार्य |
| --- | --- | --- |
Expand All @@ -29,13 +29,19 @@ framework अभी नहीं बने हैं।
**ये फ़ंक्शन प्रकाशित alpha.3 में उपलब्ध नहीं हैं।**
किसी नए compatible compiler build के परीक्षण और आधिकारिक प्रकाशन
के बाद ही इन्हें released APIs मानना चाहिए।
[असली compiler branch का तकनीकी विवरण](https://github.com/scarp-lang/scarp/pull/153/files)
[merged compiler के code और tests](https://github.com/scarp-lang/scarp/pull/153/files)
देख सकते हैं।

दोनों inputs की लंबाई बराबर और कम-से-कम 2 होनी चाहिए। Coordinates
strictly increasing होने चाहिए। ये numerical estimates हैं, symbolic
differentiation या बिल्कुल सही गणितीय integration का दावा नहीं करते।

[Compiler PR #155](https://github.com/scarp-lang/scarp/pull/155) में
`sample_cumulative_area(x, y) -> vector` पर काम हो रहा है। यह हर sample
तक जमा हुआ integral देगा: पहला परिणाम शून्य और आख़िरी कुल integral होगा
(जब परिणाम finite और representable हों)। **यह अभी विकास के चरण में है,
प्रकाशित alpha.3 में उपलब्ध नहीं है।**

## आगे काम का सही क्रम

1. **सही गणित:** numerical errors, precision, resource budgets, regression tests और benchmarks।
Expand Down
23 changes: 14 additions & 9 deletions docs/project/scientific-computing.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,31 @@ Rust-hosted scalar subset; this is **not** general native executable compilation
There is no GPU tensor backend, automatic differentiation engine or neural
network training framework.

## Work in progress: sampled calculus
## Source-only sampled calculus (unreleased)

[Compiler PR #153](https://github.com/scarp-lang/scarp/pull/153)
proposes two typed pure kernels:
was **merged into main** after the published alpha.3 release. It adds two typed pure kernels:

| Proposed call | Result | Purpose |
| --- | --- | --- |
| `sample_area(x, y)` | `float` | Integrate measurements using the composite trapezoidal rule |
| `sample_slopes(x, y)` | `vector` | Estimate a secant derivative for each adjacent interval |

This PR is **not part of alpha.3**. Do not copy its examples into projects
built against the published compiler until a verified compatible release
is identified. The [compiler's detailed implementation and tests](https://github.com/scarp-lang/scarp/pull/153/files)
are reviewable, but the development branch can change.
These calls are **not part of the published alpha.3 artifacts**. Do not
copy them into projects built against that published compiler until a newer,
compatible release is verified. Source code and tests are available in the
[merged compiler PR](https://github.com/scarp-lang/scarp/pull/153/files).

Both functions require equal-length finite-vector inputs with at least two
entries and strictly increasing coordinates. They are not symbolic
differentiation, spline fitting or exact integration. The branch checks
numerical overflow, enforces bounded work and numerical output allocation,
and uses finite binary64 arithmetic.
differentiation, spline fitting or exact integration. The merged code checks numerical overflow, enforces bounded work and
numerical output allocation, and uses finite binary64 arithmetic.

[Compiler PR #155](https://github.com/scarp-lang/scarp/pull/155) additionally
proposes `sample_cumulative_area(x, y) -> vector`, a time-series prefix
integration kernel with one result per input coordinate. Its first value is
zero and its final value matches the full sampled integral for representable
results. **PR #155 is development work, not an alpha.3 feature.**

## Architecture and dependency order

Expand Down
Loading