Files
pplus-library/modules/numerics/trapezoid/routine.json
T
alexm 568474d52f
Test (in pplus-core) / in-core (push) Failing after 28m44s
Initial commit
2026-11-12 22:23:48 -05:00

40 lines
859 B
JSON

{
"name": "Trapezoid",
"summary": "The integral of samples Y taken H apart, by the trapezoidal rule.",
"tags": [
"integration",
"quadrature"
],
"sources": [
{
"title": "NIST Digital Library of Mathematical Functions, section 3.5(i), the composite trapezoidal rule (equation 3.5.2)",
"url": "https://dlmf.nist.gov/3.5.i"
}
],
"cases": [
{
"call": "Trapezoid([0.0, 1.0, 4.0, 9.0, 16.0], 1.0)"
},
{
"call": "Trapezoid([1.0, 1.0], 0.5)"
},
{
"call": "Trapezoid([0.0, 0.25, 1.0], 0.5)"
}
],
"references": [
{
"lang": "python",
"level": "plain",
"file": "ref/python/plain.py",
"note": "The same sums."
},
{
"lang": "mojo",
"level": "plain",
"file": "ref/mojo/plain.mojo",
"note": "The same sums in Mojo."
}
]
}