Commit f41148cc authored by Anastasiia's avatar Anastasiia

change ranges for benchmarks - Bsplines

parent ed9dbf75
......@@ -5,25 +5,25 @@ import Real._
object Bsplines {
def bspline0(u: Real): Real = {
require(0 <= u && u <= 0.875)
require(-10 <= u && u <= 0.875)
(1 - u) * (1 - u) * (1 - u) / 6.0
} ensuring (res => 0 <= res && res <= 0.17 && res +/- 1e-15)
// proven in paper: [-0.05, 0.17]
def bspline1(u: Real): Real = {
require(0.875 <= u && u <= 1)
require(-0.5 <= u && u <= 1.5)
(3 * u*u*u - 6 * u*u + 4) / 6.0
} ensuring (res => 0.16 <= res && res <= 0.7 && res +/- 1e-15)
// in paper [-0.05, 0.98]
def bspline2(u: Real): Real = {
require(0.5 <= u && u <= 1)
require(0.5 <= u && u <= 1.5)
(-3 * u*u*u + 3*u*u + 3*u + 1) / 6.0
} ensuring (res => 0.16 <= res && res <= 0.7 && res +/- 1e-15)
// in paper [-0.02, 0.89]
def bspline3(u: Real): Real = {
require(0.125 <= u && u <= 1)
require(0.125 <= u && u <= 10)
-u*u*u / 6.0
} ensuring (res => -0.17 <= res && res <= 0.0 && res +/- 1e-15)
// in paper [-0.17, 0.05]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment