You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
2.0 KiB

25 years ago
  1. Benchmark for Computer-Algebra Libraries
  2. ========================================
  3. (jointly developed by the LiDIA and CLN developers, 1996)
  4. A. Elementary integer computations
  5. B. Transcendental functions
  6. C. Elementary polynomial functions
  7. D. Polynomial factorization
  8. A. Elementary integer computations:
  9. The tests are run with N = 100, 1000, 10000, 100000 decimal digits.
  10. Precompute x1 = floor((sqrt(5)+1)/2 * 10^(2N))
  11. x2 = floor(sqrt(3) * 10^N)
  12. x3 = 10^N+1
  13. Then time the following operations:
  14. 1. Multiplication x1*x2,
  15. 2. Division (with remainder) x1 / x2,
  16. 3. integer_sqrt(x3),
  17. 4. gcd(x1,x2),
  18. A'. (from Pari)
  19. u=1;v=1;p=1;q=1;for(k=1..1000){w=u+v;u=v;v=w;p=p*w;q=lcm(q,w);}
  20. B. Transcendental functions: The tests are run with a precision of
  21. N = 100, 1000, 10000, 100000 decimal digits.
  22. Precompute x1 = sqrt(2)
  23. x2 = sqrt(3)
  24. x3 = log(2)
  25. Then time the following operations:
  26. 1. Multiplication x1*x2,
  27. 2. Square root sqrt(x3),
  28. 3. pi (once),
  29. 4. Euler's constant C (once),
  30. 5. e (once),
  31. 6. exp(-x1),
  32. 7. log(x2),
  33. 8. sin(5*x1),
  34. 9. cos(5*x1),
  35. 10. asin(x3),
  36. 11. acos(x3),
  37. 12. atan(x3),
  38. 13. sinh(x2),
  39. 14. cosh(x2),
  40. 15. asinh(x3),
  41. 16. acosh(1+x3),
  42. 17. atanh(x3).
  43. C. Univariate polynomials: The tests are run with degree N = 100, 1000, and
  44. with coefficient bound M = 10^9, 10^20.
  45. Precompute p1(X) = sum(i=0..2N, (floor(sqrt(5)*M*i) mod M)*(-1)^i * X^i)
  46. p2(X) = sum(i=0..N, (floor(sqrt(3)*M*i) mod M) * x^i
  47. Then time the following operations:
  48. 1. Multiplication p1(X)*p2(X),
  49. 2. Pseudo-division p1(X)*c^N = p2(X)*q(X)+r(X),
  50. 3. gcd(p1(X),p2(X)).
  51. D. Factorization of univariate polynomials: The benchmark by J. von zur Gathen.
  52. For N = 500, precompute p := smallest prime >= pi*2^N.
  53. Then time the following operation:
  54. 1. Factorize X^N+X+1 mod p in the ring F_p[X].
  55. [von zur Gathen: A Polynomial Factorization Challenge.
  56. SIGSAM Bulletin 26,2 (1992), 22-24.]