+ "\n calculated: " + euFloating.NPV()
+ "\n expected: " + floating.settlementValue()
+ "\n error: " + error);
}
error = Math.abs(amFloating.NPV() - floating.settlementValue());
if (error > tolerance) {
fail("failed to reproduce floating-rate bond price:"
+ "\n calculated: " + amFloating.NPV()
+ "\n expected: " + floating.settlementValue()
+ "\n error: " + error);