Data update

This commit is contained in:
Ingy döt Net 2026-02-01 16:33:20 -08:00
parent 5150844a7d
commit 4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions

View file

@ -1,32 +0,0 @@
WITH GMP.Rationals, GMP.Integers, Ada.Text_IO, Ada.Strings.Fixed, Ada.Strings;
USE GMP.Rationals, GMP.Integers, Ada.Text_IO, Ada.Strings.Fixed, Ada.Strings;
PROCEDURE Main IS
FUNCTION Bernoulli_Number (N : Natural) RETURN Unbounded_Fraction IS
FUNCTION "/" (Left, Right : Natural) RETURN Unbounded_Fraction IS
(To_Unbounded_Integer (Left) / To_Unbounded_Integer (Right));
A : ARRAY (0 .. N) OF Unbounded_Fraction;
BEGIN
FOR M IN 0 .. N LOOP
A (M) := 1 / (M + 1);
FOR J IN REVERSE 1 .. M LOOP
A (J - 1) := (J / 1 ) * (A (J - 1) - A (J));
END LOOP;
END LOOP;
RETURN A (0);
END Bernoulli_Number;
BEGIN
FOR I IN 0 .. 60 LOOP
IF I MOD 2 = 0 OR I = 1 THEN
DECLARE
B : Unbounded_Fraction := Bernoulli_Number (I);
S : String := Image (GMP.Rationals.Numerator (B));
BEGIN
Put_Line ("B (" & (IF I < 10 THEN " " ELSE "") & Trim (I'Img, Left)
& ")=" & (44 - S'Length) * " " & Image (B));
END;
END IF;
END LOOP;
END Main;

View file

@ -1,5 +1,5 @@
-- 30 Jul 2025
include Settings
-- 23 Aug 2025
include Setting
numeric digits 16
arg xx
if xx = '' then
@ -10,29 +10,25 @@ say 'BERNOULLI NUMBERS'
say version
say
call Time('r')
call Rational1 xx
if ss then
call ShowFractions xx
call Timer
call Timer 'R'
call Time('r')
call Rational2 xx
if ss then
call ShowFractions xx
call Timer
call Timer 'R'
call Time('r')
call Decimal1 xx
if ss then
call ShowDecimals xx
call Timer
call Timer 'R'
call Time('r')
call Decimal2 xx
if ss then
call ShowDecimals xx
call Timer
call Timer 'R'
exit
Rational1: