PDA

View Full Version : Maths commands




jmac555
Jun 18, 2008, 03:17 AM
Hi i am about to enter a programming competition and much to my horror i realized that my knowledge of reasonably tricky maths commands in c++ is not strong enough. I was wondering if anybody could suggest a good place to brush up on commands to do with this subject. Basically the level i want is commands like (isPallendrome = true) and stuff relating to <math.h>
thanks in advance



lazydog
Jun 18, 2008, 05:07 AM
I'm not sure if this is useful to you, but there is a library to do symbolic stuff, SymbolicC++ (http://issc.rau.ac.za/symbolic/symbolic.html). As it happens I'm just about to try it out myself.

b e n

yeroen
Jun 18, 2008, 09:46 AM
Do you mean a palindrome in the sense that a string is equal to it's reverse? Or do you mean a palindrome in the more general sense that one string is a permutation of another string?

Generally speaking, unless you're approaching the subject through permutation groups, deciding whether or not a string is a palindrome of another string isn't dependent on any math libraries.

As for math libraries, math.h is the header for the C standard math library, which basically provides transcendental functions (google GNU C library for the manual). The Boost and TR1 C++ libraries expand on this a great deal adding special functions, random number generators, combinatorics, quaternions (i.e. ugly ways to write rotation matrices) etc.

What functionality, exactly, are you looking for?