FL64 is an number analytics, and error correction library.
Number in Parts: Link | Basic functions. |
Adding parts back together: Link | |
Manipulating parts: Link | |
Creating a number in Parts: Link | |
Irrational numbers: Link | Analyzing Numbers, and how it works. |
The secret structure to all numbers (No such thing as random numbers): Link | |
Periodic Recurring/number patterns: Link | |
Fraction Data type: Link | Error correction. |
Error Correction: Link | |
Binary translation operations: Link | Binary, and bitwise operations. |
Direct Binary bitwise operations: Link | |
Vector and Array operation: Link |
var pi = 3.1415;
pi = pi.split();
console.log(pi);
pi = pi.split();
console.log(pi);
var pi = 3.1415;
pi = pi.split();
console.log(pi.toString());
pi = pi.split();
console.log(pi.toString());
var pi = 3.1415;
console.log(pi.reValue());
pi = pi.split();
console.log(pi.reValue());
pi = pi.split();
console.log(pi.toString());
var pi = 3.1415;
pi = pi.split(7,9);
pi = pi.split(3,5);
console.log(pi.toString());
var pi = 3.1415;
pi = pi.split(7,9);
pi = pi.split(3,5);
while( pi > 0 ) { pi = pi.split(); }
console.log(pi.toString());
var pi = 3.1415;
pi = pi.split(7,9);
pi = pi.split(3,5);
pi = pi.splitAll();
console.log(pi.toString());
var pi = 3.1415;
pi = pi.splitAll();
var fract = pi.calcF();
var Number = pi.calc();
console.log(pi.toString());
console.log(fract.toString());
console.log(Number.toString());
var pi = 3.1415;
pi = pi.splitAll();
var fract = pi.calcF(2, 5);
var Number = pi.calc(2, 5);
console.log(pi.toString());
console.log(fract.toString());
console.log(Number.toString());
var pi = 3.1415;
pi = pi.splitAll();
var fract = pi.calcF(0, pi.length - 2);
var Number = pi.calc(0, pi.length - 2);
console.log(pi.toString());
console.log(fract.toString());
console.log(Number.toString());
var pi = 3.1415;
pi = pi.splitAll();
console.log(pi.toString());
pi = pi.remove(4);
pi = pi.splitAll();
console.log(pi.toString());
var pi = 3.1415;
pi = pi.splitAll();
console.log(pi.toString());
pi = pi.setA(4, 3);
pi = pi.setB(4, 4);
pi = pi.splitAll();
console.log(pi.toString());
var val = 1.3922111911773327;
function A(x)
{
return(x);
}
function B(x)
{
return(x);
}
val = val.splitAll();
console.log(val.toString());
val = val.Trans(0,A,B);
console.log(val.toString());
var val = NaN;
val = val.split(1,1);
val = val.split(2,1);
val = val.split(2,1);
val = val.split(2,1);
val = val.split(2,1);
val = val.split(2,1);
val = val.split(2,1);
val = val.split(2,1);
val = val.split(2,1);
val = val.split(2,1);
val = val.calc();
console.log(val.toString());
var val = NaN;
function A(x)
{
return(2);
}
function B(x)
{
return(1);
}
val = val.split(1,1);
val = val.Trans(1,A,B);
val = val.calc();
console.log(val.toString());
var val = NaN;
function A(x)
{
return( Math.pow( 10, x + 1 ) + 1 );
}
function B(x)
{
return( -Math.pow( 10, x + 1 ) );
}
val = val.split(1,1);
val = val.split(10,-10);
val = val.Trans(2, A, B);
val = val.calc(0,9);
console.log(val);
Pattern. | |
A | B |
1 | 1 |
10 | -10 |
101 | -100 |
1001 | -1000 |
10001 | -10000 |
100001 | -100000 |
1000001 | -1000000 |
10000001 | -10000000 |
100000001 | -100000000 |
var val = NaN;
function A(x)
{
return( 6 );
}
function B(x)
{
return( 1 + (x * 4) + (x * x * 4) );
}
val = val.split(3,1);
val = val.Trans(1,A,B);
val = val.calc();
console.log(val.toString());
var val = NaN;
function A(x)
{
return(1);
}
function B(x)
{
return(1);
}
val = val.Trans(0,A,B);
val = val.calc();
console.log(val.toString());
√1 | _ | √2 | _ | √3 | _ | √4 | _ | √5 | _ | √6 | _ | √7 | _ | √8 | _ | √9 | _ | √10 | _ | √11 | _ | √12 | _ | √13 | _ | √14 | _ | √15 | _ | √16 | _ | √17 | _ | √18 | _ | √19 | _ | √20 | _ | √21 | _ | √22 | _ | √23 | _ | √24 | ||||||||||||||||||||||||
A | B | _ | A | B | _ | A | B | _ | A | B | _ | A | B | _ | A | B | _ | A | B | _ | A | B | _ | A | B | _ | A | B | _ | A | B | _ | A | B | _ | A | B | _ | A | B | _ | A | B | _ | A | B | _ | A | B | _ | A | B | _ | A | B | _ | A | B | _ | A | B | _ | A | B | _ | A | B | _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| _ | 8 | 5 | _ | 8 | 6 | _ | 8 | 7 | _ | 8 | 8 |
0 | 0 | _ | 2 | 1 | _ | 2 | 2 | _ | 0 | 0 | _ | 4 | 1 | _ | 4 | 2 | _ | 4 | 3 | _ | 4 | 4 | _ | 0 | 0 | _ | 6 | 1 | _ | 6 | 2 | _ | 6 | 3 | _ | 6 | 4 | _ | 6 | 5 | _ | 6 | 6 | _ | 0 | 0 | _ | 8 | 1 | _ | 8 | 2 | _ | 8 | 3 | _ | 8 | 4 | _ | 8 | 5 | _ | 8 | 6 | _ | 8 | 7 | _ | 8 | 8 |
0 | 0 | _ | 2 | 1 | _ | 2 | 2 | _ | 0 | 0 | _ | 4 | 1 | _ | 4 | 2 | _ | 4 | 3 | _ | 4 | 4 | _ | 0 | 0 | _ | 6 | 1 | _ | 6 | 2 | _ | 6 | 3 | _ | 6 | 4 | _ | 6 | 5 | _ | 6 | 6 | _ | 0 | 0 | _ | 7 | 1 | _ | 8 | 2 | _ | 8 | 3 | _ | 8 | 4 | _ | 8 | 5 | _ | 8 | 6 | _ | 8 | 7 | _ | 8 | 8 |
var val = NaN;
function A(x)
{
return(8);
}
function B(x)
{
return(7);
}
val = val.split(4,7);
val = val.Trans(1,A,B);
val = val.calc();
console.log(val.toString());
var a = 71, b = -11;
var v = a/2 + Math.sqrt(a*a/4 + b);
console.log( "Calculated value = " + v + "" );
while( v != 0 ){ v=v.split(a,b); }
console.log( "Value split in A by B\r\n" + v.toString() );
Natural log. | |
A | B |
2 | 1 |
1 | 1 |
2 | 2 |
3 | 3 |
4 | 4 |
5 | 5 |
6 | 6 |
7 | 7 |
8 | 8 |
9 | 9 |
var val = NaN;
function A(x)
{
return( x );
}
function B(x)
{
return( x );
}
val = val.split(2,1);
val = val.Trans(1,A,B);
val = val.calc();
console.log(val.toString());
1÷9 | 0.111111111111111 |
2÷9 | 0.222222222222222 |
3÷9 | 0.333333333333333 |
4÷9 | 0.444444444444444 |
5÷9 | 0.555555555555555 |
6÷9 | 0.666666666666666 |
7÷9 | 0.777777777777777 |
8÷9 | 0.888888888888888 |
var val = 3 / 9;
console.log(val);
var val = 3 / 9;
console.log(val.toString(3));
var val = 3 / 9;
val = val.splitAll();
val = val.calcF();
console.log(val.toString());
var pat = new Pattern("31415",10);
console.log(pat);
var fract = pat.getFract();
console.log(fract.toString());
var pat = new Pattern("DAMIAN",24);
console.log(pat);
var fract = pat.getFract();
var val = fract.valueOf();
console.log(fract.toString());
console.log(val.toString(24));
var pat = new Pattern("1011");
console.log(pat);
var fract = pat.getFract();
var val = fract.valueOf();
console.log(fract.toString());
console.log(val.toString(2));
var f = new Fract(711,911);
var val = f.valueOf();
console.log(val.toString(2));
console.log(f.toString());
var pat = f.divP();
console.log(pat.toString());
var val = 711 / 911;
console.log(val.toString(2));
var f = val.getFract();
var pat = f.divP();
console.log(pat.toString());
var f = new Fract(711,911);
var val = f.valueOf();
console.log(val.toString());
console.log(f.toString());
var pat = f.divP(10);
console.log(pat.toString());
var val = 711 / 911;
console.log(val.toString());
var f = val.getFract();
var pat = f.divP(10);
console.log(pat.toString());
var f1 = new Fract(1,10);
var f2 = new Fract(2,10);
//Add the two fractions.
f1.x += f2.x;
//Display the result.
console.log(f1);
var f1 = 0.1;
var f2 = 0.2;
//Add the two numbers.
f1 += f2;
//Display the result.
console.log(f1);
var f = new Fract(31415,10000);
//Display fraction.
console.log(f.toString());
//Smallest fraction.
f = f.reduce();
//Display the result.
console.log(f.toString());
var f = new Fract(2,10);
//Indivisible part in binary base 2.
var pat = f.divP(2);
//Display the indivisible pattern.
console.log(pat);
var n = 3.147547;
var er = 2; //Number Of binary digits.
//The exponent position using log 2.
var pos = Math.round(Math.log(n)/Math.log(2));
//The last binary digit.
var er = 2**(pos-(53-er)); er -= 2**(pos-53);
//Show the error that is being introduced.
console.log( "Value before error is introduced.\r\n\r\n" + n.toString(2) + "\r\n\r\n" );
console.log( "Value that is going to be added to Number as error.\r\n\r\n" + er.toString(2) + "\r\n\r\n" );
n += er;
console.log( "Value After error is introduced.\r\n\r\n" + n.toString(2) + "\r\n\r\n" );
//Show various stats about the number in question.
n.stats();
//Call the error correction method on the number.
console.log( "\r\n\r\nError corrected value = " + n.err() );
var n = 3.147547;
var er = 2; //Number Of binary digits.
//The exponent position using log 2.
var pos = Math.round(Math.log(n)/Math.log(2));
//The last binary digit.
var er = 2**(pos-(53-er)); er -= 2**(pos-53);
//Show the error that is being introduced.
console.log( "Value before error is introduced.\r\n\r\n" + n.toString(2) + "\r\n\r\n" );
console.log( "Value that is going to be added to Number as error.\r\n\r\n" + er.toString(2) + "\r\n\r\n" );
n += er;
console.log( "Value After error is introduced.\r\n\r\n" + n.toString(2) + "\r\n\r\n" );
//Show various stats about the number in question.
n.stats();
//Call the error correction method on the number.
console.log( "\r\n\r\nError corrected value = " + n.avgFract().toString() );
var pi = Math.PI;
pi = pi.splitAll();
console.log(pi.toString());
//Set the limit.
pi.limit( 1 / Math.pow(2, 26 ) );
console.log(pi.toString());
var pi = Math.PI;
pi = pi.splitAll();
console.log(pi.toString());
//Set the limit.
pi.limit( 1 / Math.pow(2, 26 ) );
console.log(pi.toString());
//Set limit back to normal.
pi.limit( 1 / Math.pow(2, 52 ) );
//Split to all parts again.
pi = pi.splitAll();
console.log(pi.toString());
var ac = 50;
var pi = Math.PI.limit( 1 / ( Math.pow( 2, 52 / ( 100 / ac ) ) ) );
var fract = pi.getFract();
console.log(fract.toString());
var val = 27.34;
val = val.bits();
console.log(val.toString());
val.sing = 1;
val.exp += 1;
val.mantissa += 1;
console.log(val.toString());
var val = 27.34;
val = val.bits();
console.log(val);
val.sing = 1;
val.exp += 1;
val.mantissa += 1;
console.log(val);
var val = 27.34;
val = val.bits();
val = val + 0;
console.log(val);
val.sing = 1;
val.exp += 1;
val.mantissa += 1;
console.log(val);
var val = 27.34;
val = val.bits();
console.log(val.toString(10));
var val = parseNumber("04628388743545398231", 10);
console.log(val);
var val = parseNumber("0100000000111011010101110000101000111101011100001010001111010111");
console.log(val);
var val = Math.PI;
console.log(val.toString(36));
var val = parseFloat("3.53I5AB8P5F", 36);
console.log(val);
var val = parseFloat("3.141592653589793");
console.log(val);
var val = 0.1;
console.log( val.toString( 10, true ) );
var val = Math.PI;
console.log( val.toString( 10, true ) );
var val = Math.PI;
console.log( val.toString( 36, true ) );
var n = Math.PI;
for( var i = 0; i < 64; i++ )
{
n = n.bitLsh(1);
console.log(n.toString());
}
var n = Math.PI;
for( var i = 0; i < 64; i++ )
{
n = n.bitLsh(1);
console.log(n);
}
var n = Math.PI;
for( var i = 0; i < 64; i++ )
{
n = n.bitRsh(1);
console.log(n.toString());
console.log(n);
}
var n = Math.PI;
n = n.bits();
console.log(n);
console.log(n.toString());
n = n.bitNot();
console.log(n);
console.log(n.toString());
var n = Math.PI;
n = n.bits();
console.log(n);
console.log(n.toString());
n = n.bitAnd(2.1);
console.log(n);
console.log(n.toString());
var n = Math.PI;
n = n.bits();
console.log(n);
console.log(n.toString());
n = n.bitOr(2.1);
console.log(n);
console.log(n.toString());
var n = Math.PI;
n = n.bits();
console.log(n);
console.log(n.toString());
n = n.bitXor(2.1);
console.log(n);
console.log(n.toString());
var array = [7, 7.7, 9.11, 3.11, 723];
array = array.bits();
console.log(array.join("\r\n"));
var array = [7, 7.7, 9.11, 3.11, 723];
array = array.getFract();
console.log(array.join("\r\n"));
var array = [7, 7.7, 9.11, 3.11, 723];
array = array.bitRsh(1);
console.log(array.join("\r\n"));