### ISO C++11 published

Posted:

**January 24th, 2016, 11:30 am**SERVING THE QUANTITATIVE FINANCE COMMUNITY

https://forum.wilmott.com/

Page **15** of **15**

Posted: **January 25th, 2016, 10:34 am**

That's a pretty interesting idea -- add warnings or errors when using a numerically unstable floating point expression: http://github.com/mcarton/rust-herbie-lint

Posted: **January 25th, 2016, 10:56 am**

QuoteOriginally posted by: PolterThat's a pretty interesting idea -- add warnings or errors when using a numerically unstable floating point expression: http://github.com/mcarton/rust-herbie-lintWhat is the definition of 'numerically unstable thing'Quotetest.rs:155:5: 155:30 warning: Numerically unstable expression, #[warn(herbie)] on by defaulttest.rs:155 (a+b).sin() - (a+b).cos(); ^~~~~~~~~~~~~~~~~~~~~~~~~test.rs:155:5: 155:30 help: Try thistest.rs: (b.sin() * (a.sin() + a.cos())) - ((a.cos() - a.sin()) * b.cos());Take b = 0, the answers are not even the same. Am I missing something subtle? Was it machine-produced code or written on the fly? Quotetest.rs:40:5: 40:18 warning: Numerically unstable expression, #[warn(herbie)] on by defaulttest.rs:40 (a/b + c) * b; ^~~~~~~~~~~~~test.rs:40:5: 40:18 help: Try thistest.rs: (c * b) + a;I agree with this one. But the algorithm should never get that far in the first place.

Posted: **January 25th, 2016, 6:12 pm**

QuoteOriginally posted by: CuchulainnQuoteOriginally posted by: PolterThat's a pretty interesting idea -- add warnings or errors when using a numerically unstable floating point expression: http://github.com/mcarton/rust-herbie-lintWhat is the definition of 'numerically unstable thing'From the paper, the goal seems to be the following:QuoteTo correct inaccurate formulas, programmers must rearrange their computations to avoid rounding error. These rearrangements are often based on identities of real-number arithmetic. For example, to avoid catastrophic cancellation in (1+x)-x , one could reassociateinto 1+(x-x) , which simplifies to 1 and is exactly accurate.Quotetest.rs:155:5: 155:30 warning: Numerically unstable expression, #[warn(herbie)] on by defaulttest.rs:155 (a+b).sin() - (a+b).cos(); ^~~~~~~~~~~~~~~~~~~~~~~~~test.rs:155:5: 155:30 help: Try thistest.rs: (b.sin() * (a.sin() + a.cos())) - ((a.cos() - a.sin()) * b.cos());Take b = 0, the answers are not even the same. Am I missing something subtle? Was it machine-produced code or written on the fly?Seems to reduce to the same thing: http://www.wolframalpha.com/input/?i=Fu ... y%5bsin(b)+*+(sin(a)+%2b+cos(a))+-+(cos(a)+-+sin(a))+*+cos(b)%5d

Posted: **January 25th, 2016, 7:54 pm**

QuoteOriginally posted by: PolterQuoteOriginally posted by: CuchulainnQuoteOriginally posted by: PolterThat's a pretty interesting idea -- add warnings or errors when using a numerically unstable floating point expression: http://github.com/mcarton/rust-herbie-lintWhat is the definition of 'numerically unstable thing'From the paper, the goal seems to be the following:QuoteTo correct inaccurate formulas, programmers must rearrange their computations to avoid rounding error. These rearrangements are often based on identities of real-number arithmetic. For example, to avoid catastrophic cancellation in (1+x)-x , one could reassociateinto 1+(x-x) , which simplifies to 1 and is exactly accurate.Quotetest.rs:155:5: 155:30 warning: Numerically unstable expression, #[warn(herbie)] on by defaulttest.rs:155 (a+b).sin() - (a+b).cos(); ^~~~~~~~~~~~~~~~~~~~~~~~~test.rs:155:5: 155:30 help: Try thistest.rs: (b.sin() * (a.sin() + a.cos())) - ((a.cos() - a.sin()) * b.cos());Take b = 0, the answers are not even the same. Am I missing something subtle? Was it machine-produced code or written on the fly?Seems to reduce to the same thing: http://www.wolframalpha.com/input/?i=Fu ... y%5bsin(b)+*+(sin(a)+%2b+cos(a))+-+(cos(a)+-+sin(a))+*+cos(b)%5dWhat if you do it by hand?? BTW I agree with Wolfram. I TAKE IT BACK it's notation!!!!(a+b)cos() == cos(a+b)LOL==It is not consistent with accepted mathematical notation, which is bad.

Posted: **January 26th, 2016, 10:52 am**

I think this is the official/accepted term:Loss of significance

Posted: **February 4th, 2016, 9:16 pm**

Does this class walk, talk and quack like an abstract class?

Posted: **February 18th, 2016, 9:23 am**

QuoteType generators are sometimes viewed as a workaround for the lack of ``templated typedefs'' in C++.

Posted: **February 26th, 2016, 10:02 am**

what is the status of the uckly duckling std::valarray in C++11?

Posted: **June 13th, 2016, 2:35 pm**

You can see that this code is wrong, but why?