Printing error and tolerance when comparing floating-point using Approx

40 views
Skip to first unread message

Kartik Kumar

unread,
Feb 24, 2015, 8:19:33 AM2/24/15
to catch...@googlegroups.com
Hi all,

I'm using a custom Approx object at the moment for my floating-point comparison tests. When a test fails, the LHS and RHS values are reported, but what I'd really like to know is the tolerance that was set and what the computed error is (relative or absolute using the formula in Approx at the moment).

Is there an easy way to print/report this information to console in addition to the LHS and RHS values? Would be very useful when debugging test failures.

Regards,

Kartik
Reply all
Reply to author
Forward
0 new messages