Serving the Quantitative Finance Community

 
User avatar
Traden4Alpha
Posts: 3300
Joined: September 20th, 2002, 8:30 pm

ISO C++11 published

July 7th, 2015, 3:19 pm

QuoteOriginally posted by: outrunQuoteOriginally posted by: Traden4AlphaQuoteOriginally posted by: CuchulainnC++14 function composition, very powerful. It is almost like maths.It does seem powerful, but it's much more verbose than math.I tend to measure power of a language in terms of how much I can get done in the least number of characters (because my typing speed and accuracy is crap).So you would like APL very much? I think C++ is too cryptic and technical, a mix between pyhton and R would be something I'd like best for numerical math.How did you guess that I like APL? ;-)One of the features I like about math and APL (in contrast to C and most other languages) is the clear demarcation between system atoms (core functions, operators, and connectives) and user-defined atoms (named variables and functions). C et al build everything from ASCII characters which means that at a glance it's not possible to tell which tokens in a line of code are user-created variables, user-created functions, or reserved words.
 
User avatar
Cuchulainn
Posts: 20253
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

ISO C++11 published

July 7th, 2015, 6:43 pm

QuoteOriginally posted by: Traden4AlphaQuoteOriginally posted by: CuchulainnC++14 function composition, very powerful. It is almost like maths.It does seem powerful, but it's much more verbose than math.I tend to measure power of a language in terms of how much I can get done in the least number of characters (because my typing speed and accuracy is crap).Yes; I wantauto v = f(g);
 
User avatar
Traden4Alpha
Posts: 3300
Joined: September 20th, 2002, 8:30 pm

ISO C++11 published

July 7th, 2015, 7:18 pm

QuoteOriginally posted by: CuchulainnQuoteOriginally posted by: Traden4AlphaQuoteOriginally posted by: CuchulainnC++14 function composition, very powerful. It is almost like maths.It does seem powerful, but it's much more verbose than math.I tend to measure power of a language in terms of how much I can get done in the least number of characters (because my typing speed and accuracy is crap).Yes; I wantauto v = f(g);Indeed! Yet "auto" has 4X the required number of characters. And the code example you gave earlier was over 600 characters (and would still be over 600 characters even if you made all the variable names 1 char each).And then there's C++'s reliance on loops -- makes it as verbose as James Joyce!
 
User avatar
Cuchulainn
Posts: 20253
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

ISO C++11 published

July 7th, 2015, 7:29 pm

QuoteOriginally posted by: Traden4AlphaQuoteOriginally posted by: CuchulainnQuoteOriginally posted by: Traden4AlphaQuoteOriginally posted by: CuchulainnC++14 function composition, very powerful. It is almost like maths.It does seem powerful, but it's much more verbose than math.I tend to measure power of a language in terms of how much I can get done in the least number of characters (because my typing speed and accuracy is crap).Yes; I wantauto v = f(g);Indeed! Yet "auto" has 4X the required number of characters. And the code example you gave earlier was over 600 characters (and would still be over 600 characters even if you made all the variable names 1 char each).And then there's C++'s reliance on loops -- makes it as verbose as James Joyce!Don't get me started! That's the last time I am going to his 5-hour Broadway show. An endless loop separated by kommas and cheap semi-kolonials.
Last edited by Cuchulainn on July 6th, 2015, 10:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 20253
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

ISO C++11 published

July 8th, 2015, 8:22 pm

QuoteOriginally posted by: outrunQuoteOriginally posted by: CuchulainnQuoteOriginally posted by: Traden4AlphaAnd then there's C++'s reliance on loops -- makes it as verbose as James Joyce!Don't get me started! That's the last time I am going to his 5-hour Broadway show. An endless loop separated by kommas and cheap semi-kolonials.You still don't have a smartphone Cuch? Or was this you? Gentleman leaps onto Broadway stage to charge his iPhoneI did want to plug a smartphone where the sun does not shine to stop those actors ranting on about JJ.
 
User avatar
Cuchulainn
Posts: 20253
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

ISO C++11 published

July 8th, 2015, 8:22 pm

QuoteOriginally posted by: Traden4AlphaQuoteOriginally posted by: CuchulainnQuoteOriginally posted by: Traden4AlphaQuoteOriginally posted by: CuchulainnC++14 function composition, very powerful. It is almost like maths.It does seem powerful, but it's much more verbose than math.I tend to measure power of a language in terms of how much I can get done in the least number of characters (because my typing speed and accuracy is crap).Yes; I wantauto v = f(g);Indeed! Yet "auto" has 4X the required number of characters. And the code example you gave earlier was over 600 characters (and would still be over 600 characters even if you made all the variable names 1 char each).And then there's C++'s reliance on loops -- makes it as verbose as James Joyce!Actually f(g) does work! Bingo
Last edited by Cuchulainn on July 7th, 2015, 10:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 20253
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

ISO C++11 published

July 8th, 2015, 8:34 pm

Anyone can do numbers, but here is a numeric example:
 
User avatar
Cuchulainn
Posts: 20253
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

ISO C++11 published

July 13th, 2015, 7:47 am

QuoteOriginally posted by: CuchulainnQuoteOriginally posted by: outrunCan I do arctan(1+ arctan(1+... ?You don't know? That's easy.This is an example of an "iterated function". I tried a few options in C++14 but unable to compile. Maybe the C++ compiler builderS have a clever way for f(f(f(...))).However, the Abel function does work
Last edited by Cuchulainn on July 12th, 2015, 10:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 20253
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

ISO C++11 published

January 16th, 2016, 11:11 am

QuoteOriginally posted by: outrunjust that you know, C++11 has erfmath.h??? is it in global namespace or std?I tend to consult cppference.com
Last edited by Cuchulainn on January 15th, 2016, 11:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 20253
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

ISO C++11 published

January 16th, 2016, 3:28 pm

QuoteOriginally posted by: outrunThat's for the C99 language, for C++11 you should use <cmath>But interesting, no? A lot of QF algorithms use N(x) somewhere, and now there is native support for that, making it easier to write standalone snippets that don't require external libs like boost.Yes, my thoughts exactly. I have just computed the bivariate cdf using it and A&S 26.3.3 I use for the Z(w) part.Great discovery, outrun..
Last edited by Cuchulainn on January 15th, 2016, 11:00 pm, edited 1 time in total.