40 lines
859 B
JSON
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."
|
|
}
|
|
]
|
|
}
|