12 sum += 1e20; sum += 1; sum += 2; sum += 100; sum += 5000; sum += -1e20;
13 acc->
Sum( 1e20 ); acc->
Sum( 1 ); acc->
Sum( 2 ); acc->
Sum( 100 ); acc->
Sum( 5000 ); acc->
Sum( -1e20 );
14 Console::WriteLine(String::Format(
"{0} {1}", sum, acc->
Result()));
17 Console::WriteLine( String::Format(
"Caught exception: {0}", e->Message ) );
Exception class for NETGeographicLib.
void Sum(double a)
Adds a value to the accumulator.
void Assign(double a)
Assigns a value to an accumulator.
double Result()
Returns the accumulated value.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
const mpreal sum(const mpreal tab[], const unsigned long int n, int &status, mp_rnd_t mode=mpreal::get_default_rnd())
int main(array< System::String^>^)
.NET wrapper for GeographicLib::Accumulator.