Skip to content

Example - Boost NTL integration for arbitrary precision calculations

Notifications You must be signed in to change notification settings

campbell-2589/arbitrary-precision-analytics

Repository files navigation

=============================

Arbitrary precision root finding with boost and Numeric Template Library (NTL).

Doxygen code documentation hosed on gh-pages branch at :

http://brucebcampbell.github.com/arbitrary-precision-analytics/index.html

This repository is a small project to write a library that instrumented some of the boost numerical functions with the arbitrary precision computation provided by NTL.

You will find example code implementing the Newton Raphson method for calculating roots, and the Miler-Rabin primality test.

This version uses boost 1.51.0 and NTL 5.5.2. These are located for convenience in the Packages repository.

Here is a check (using NTL) of the output for the cube root of 794 to 1024 precision;

9.259911460232221094625793698636637154245268549510110715554379502935598232566421 93054969787730973482431038572921744007809586133210387850583331352709397212073530 69323121179614659308867304496447441378707538499984081718017920347152268949536531 32952700730791762339750488810801106309561145003269884674879320469274014143597987 20392096076912706340723733643882121885140507786155552585133672781055823894364996 31104621095525503751358518739172851850710226780605768505998205625831238928997233 87913474927609726314981308741758109166029036131954355961278445045020944020051599 77431509395887381973363964625506443732947819721055385691775352241407472782391475 77546791659274494347318101014083752740012840807976233741375402847645453379273674 53580684489620451020457981527682226469665589012569202586554085343037374053622962 40172253232871724332012589735787485936402806017550949046833932222899685722557857 83421863576742753768240041782899869155665353342310877733632152166299421089200379 37762244989786103032021469250167911013704724609851837158203125 *

9.259911460232221094625793698636637154245268549510110715554379502935598232566421 93054969787730973482431038572921744007809586133210387850583331352709397212073530 69323121179614659308867304496447441378707538499984081718017920347152268949536531 32952700730791762339750488810801106309561145003269884674879320469274014143597987 20392096076912706340723733643882121885140507786155552585133672781055823894364996 31104621095525503751358518739172851850710226780605768505998205625831238928997233 87913474927609726314981308741758109166029036131954355961278445045020944020051599 77431509395887381973363964625506443732947819721055385691775352241407472782391475 77546791659274494347318101014083752740012840807976233741375402847645453379273674 53580684489620451020457981527682226469665589012569202586554085343037374053622962 40172253232871724332012589735787485936402806017550949046833932222899685722557857 83421863576742753768240041782899869155665353342310877733632152166299421089200379 37762244989786103032021469250167911013704724609851837158203125 *

9.259911460232221094625793698636637154245268549510110715554379502935598232566421 93054969787730973482431038572921744007809586133210387850583331352709397212073530 69323121179614659308867304496447441378707538499984081718017920347152268949536531 32952700730791762339750488810801106309561145003269884674879320469274014143597987 20392096076912706340723733643882121885140507786155552585133672781055823894364996 31104621095525503751358518739172851850710226780605768505998205625831238928997233 87913474927609726314981308741758109166029036131954355961278445045020944020051599 77431509395887381973363964625506443732947819721055385691775352241407472782391475 77546791659274494347318101014083752740012840807976233741375402847645453379273674 53580684489620451020457981527682226469665589012569202586554085343037374053622962 40172253232871724332012589735787485936402806017550949046833932222899685722557857 83421863576742753768240041782899869155665353342310877733632152166299421089200379 37762244989786103032021469250167911013704724609851837158203125 =

794

*/

About

Example - Boost NTL integration for arbitrary precision calculations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published