Just another update

This commit is contained in:
Ingy döt Net 2015-02-20 00:35:01 -05:00
parent a25938f123
commit 00a190b0a6
6591 changed files with 94363 additions and 23227 deletions

View file

@ -0,0 +1,11 @@
#include <cstdint>
#include <iostream>
#include <limits>
int main()
{
auto i = std::uintmax_t{};
while (i < std::numeric_limits<decltype(i)>::max())
std::cout << ++i << '\n';
}

View file

@ -0,0 +1,19 @@
// Using the proposed unbounded integer library
#include <iostream>
#include <seminumeric>
int main()
{
try
{
auto i = std::experimental::seminumeric::integer{};
while (true)
std::cout << ++i << '\n';
}
catch (...)
{
// Do nothing
}
}

View file

@ -1,11 +0,0 @@
#include <iostream>
#include <cstdint>
int main()
{
uint32_t i = 0;
while(true)
std::cout << ++i << std::endl;
return 0;
}

View file

@ -0,0 +1 @@
(while (println (++ i)))

View file

@ -0,0 +1,27 @@
MODULE IntegerSeq;
IMPORT
Out,
Object:BigInt;
PROCEDURE IntegerSequence*;
VAR
i: LONGINT;
BEGIN
FOR i := 0 TO MAX(LONGINT) DO
Out.LongInt(i,0);Out.String(", ")
END;
Out.Ln
END IntegerSequence;
PROCEDURE BigIntSequence*;
VAR
i: BigInt.BigInt;
BEGIN
i := BigInt.zero;
LOOP
Out.Object(i.ToString() + ", ");
i := i.Add(BigInt.one);
END
END BigIntSequence;
END IntegerSeq.

View file

@ -0,0 +1,2 @@
use bigint;
my $i = 0; print ++$i, "\n" while 1;

View file

@ -0,0 +1,5 @@
z <- 0
repeat {
print(z)
z <- z + 1
}

View file

@ -9,15 +9,15 @@
where it started, and this computer program will still be counting.
According to Sir Author Eddington in 1938 at his Tamer Lecture at
Trinity Collecge (Cambridge), he postulated that there are exactly
According to Sir Arthur Eddington in 1938 at his Tamer Lecture at
Trinity College (Cambridge), he postulated that there are exactly
136 2^245
136 2^256
protons in the universe and the same number of electrons, which is
equal to around 1.57477e+79.
Although, a modern extimate is around 10^80.
Although, a modern estimate is around 10^80.
One estimate of the age of the universe is 13.7 billion years,

View file

@ -1,2 +1 @@
i = 0
puts(i += 1) while true
1.step{|n| puts n}