21 lines
459 B
Text
21 lines
459 B
Text
include "NSLog.incl"
|
|
include "gmp.incl"
|
|
|
|
void local fn LongMultiplication
|
|
mpz_t power, result
|
|
mpz_init(power)
|
|
mpz_init(result)
|
|
|
|
mpz_ui_pow_ui( result, 2, 64 )
|
|
CFTimeInterval t = fn CACurrentMediaTime
|
|
mpz_mul( result, result, result )
|
|
NSLog( @"\n2^64 * 2^64 = %@", fn mpz_cf( 10, result ) )
|
|
NSLog( @"\nCompute time: %.3f ms",(fn CACurrentMediaTime-t)*1000 )
|
|
|
|
mpz_clear(power )
|
|
mpz_clear(result )
|
|
end fn
|
|
|
|
fn LongMultiplication
|
|
|
|
HandleEvents
|