:

operator ^= left out?

Added by: ~LB, 2010 VIII 17

Added by: ~LB, 2010 VIII 17

In the latest download there down't seem to be a function defined for ^= with integers. I haven't tried floats, yet. It's not immediately need because I just made it with a for loop and multiplying it by itself as needed. Also, I get errors for certain expressions that contain only variables defined by this library, yet if I add a simple + 0 + in some places, it goes away. 0_0

Added by: tomek, 2010 X 14

Operator ^= is available in 0.9.2 release. But you are probably speaking about Pow() method, sample program:

#include <ttmath/ttmath.h>
#include <iostream>

typedef ttmath::UInt<TTMATH_BITS(256)> Long;

int main()
{
Long a, b;

a = 2;
b = 8;

a.Pow(b); // a*a*a*a*a*a*a*a
std::cout << a << std::endl;

a = 2;
a ^= b; // binary xor
std::cout << a << std::endl;
}