Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #30503 > unrolled thread

Layered object

Started byjonas.thornvall@gmail.com
First post2016-05-21 10:41 -0700
Last post2016-05-25 17:21 -0700
Articles 20 on this page of 33 — 6 participants

Back to article view | Back to comp.lang.javascript


Contents

  Layered object jonas.thornvall@gmail.com - 2016-05-21 10:41 -0700
    Re: Layered object Aleksandro <aleksandro@gmx.com> - 2016-05-21 19:41 -0400
      Re: Layered object jonas.thornvall@gmail.com - 2016-05-21 23:42 -0700
        Re: Layered object jonas.thornvall@gmail.com - 2016-05-22 03:50 -0700
    Re: Layered object "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-05-22 09:03 -0700
      Re: Layered object jonas.thornvall@gmail.com - 2016-05-22 14:59 -0700
        Re: Layered object "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-05-22 15:57 -0700
          Re: Layered object jonas.thornvall@gmail.com - 2016-05-22 22:46 -0700
            Re: Layered object "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-05-25 17:13 -0700
          Re: Layered object jonas.thornvall@gmail.com - 2016-05-22 23:05 -0700
            Re: Layered object "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-05-25 17:15 -0700
          Re: Layered object jonas.thornvall@gmail.com - 2016-05-22 23:08 -0700
          Re: Layered object jonas.thornvall@gmail.com - 2016-05-23 08:31 -0700
            Re: Layered object jonas.thornvall@gmail.com - 2016-05-24 05:38 -0700
              Re: Layered object "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-05-25 17:22 -0700
                Re: Layered object jonas.thornvall@gmail.com - 2016-05-25 22:56 -0700
                  Re: Layered object jonas.thornvall@gmail.com - 2016-05-25 23:07 -0700
                    Re: Layered object jonas.thornvall@gmail.com - 2016-05-25 23:10 -0700
                      Re: Layered object jonas.thornvall@gmail.com - 2016-05-25 23:24 -0700
                        Re: Layered object jonas.thornvall@gmail.com - 2016-05-26 01:47 -0700
                          Re: Layered object jonas.thornvall@gmail.com - 2016-05-26 01:53 -0700
                            Re: Layered object jonas.thornvall@gmail.com - 2016-05-26 02:58 -0700
                            Re: Layered object "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-05-26 06:42 -0700
                  Re: Layered object Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-05-26 11:30 +0100
                    Re: Layered object jonas.thornvall@gmail.com - 2016-05-26 03:47 -0700
                      Re: Layered object Tim Streater <timstreater@greenbee.net> - 2016-05-26 12:43 +0100
                      Re: Layered object Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-05-26 14:13 +0100
                      Re: Layered object "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-05-26 07:05 -0700
                    Re: Layered object jonas.thornvall@gmail.com - 2016-05-26 03:51 -0700
                    Re: Layered object jonas.thornvall@gmail.com - 2016-05-26 04:00 -0700
                    Re: Layered object Dr J R Stockton <reply1600@merlyn.demon.co.uk.invalid> - 2016-05-27 22:14 +0100
                  Re: Layered object "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-05-26 06:40 -0700
            Re: Layered object "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-05-25 17:21 -0700

Page 1 of 2  [1] 2  Next page →


#30503 — Layered object

Fromjonas.thornvall@gmail.com
Date2016-05-21 10:41 -0700
SubjectLayered object
Message-ID<89e1dd41-b971-4f04-aad2-e726abe20d56@googlegroups.com>
I have an object storing integers, many formulas may of course generate the same integer. And for some expressions for example on form a*x^j i would like to store each occurence. Now all my numbers are printed out in a square grid.

Right now the storing structure look like this and i set fontcolor and rectangle color as i print out the grid.

However i would like to store multiple func and rcolors within same object?
Thus make func and rcolor the multidimensional part of the array.

I am totally clueless for how both initiate and update such an object in javascript. I have managed to do it for numbers but i never initiated the object it was somehow forked in as i updated the object. And i really did not understand how it really worked. So if someone could show me howto make this array of integers to holld multiple functions and rectangles for each arr[i] it would be great.

function arraysize()
{

   for ( i = - scope; i <= scope; i ++ )
   {
      arr[i] =
      {
         count : i,
         func : '',
         fcolor : 'black',
         rheight : 100,
         rwidth : 100,
         rcolor : 'white',
         prime : true,
         formula : 0,
         sigma : 0,
      }
   }
}

[toc] | [next] | [standalone]


#30505

FromAleksandro <aleksandro@gmx.com>
Date2016-05-21 19:41 -0400
Message-ID<nhqrh5$drt$1@dont-email.me>
In reply to#30503
On 21/05/16 13:41, jonas.thornvall@gmail.com wrote:
> I have an object storing integers, many formulas may of course generate the same integer. And for some expressions for example on form a*x^j i would like to store each occurence. Now all my numbers are printed out in a square grid.
> 
> Right now the storing structure look like this and i set fontcolor and rectangle color as i print out the grid.
> 
> However i would like to store multiple func and rcolors within same object?
> Thus make func and rcolor the multidimensional part of the array.
> 
> I am totally clueless for how both initiate and update such an object in javascript. I have managed to do it for numbers but i never initiated the object it was somehow forked in as i updated the object. And i really did not understand how it really worked. So if someone could show me howto make this array of integers to holld multiple functions and rectangles for each arr[i] it would be great.
> 
> function arraysize()
> {
> 
>    for ( i = - scope; i <= scope; i ++ )
>    {
>       arr[i] =
>       {
>          count : i,
>          func : '',
>          fcolor : 'black',
>          rheight : 100,
>          rwidth : 100,
>          rcolor : 'white',
>          prime : true,
>          formula : 0,
>          sigma : 0,
>       }
>    }
> }
> 

Sorry but I am drunk lol I wall think for an ann-er in the morning lololol

[toc] | [prev] | [next] | [standalone]


#30507

Fromjonas.thornvall@gmail.com
Date2016-05-21 23:42 -0700
Message-ID<377a7af5-a75b-4ec0-93a6-32daa95b2129@googlegroups.com>
In reply to#30505
Den söndag 22 maj 2016 kl. 01:41:58 UTC+2 skrev Aleksandro:
> On 21/05/16 13:41, jonas.thornvall@gmail.com wrote:
> > I have an object storing integers, many formulas may of course generate the same integer. And for some expressions for example on form a*x^j i would like to store each occurence. Now all my numbers are printed out in a square grid.
> > 
> > Right now the storing structure look like this and i set fontcolor and rectangle color as i print out the grid.
> > 
> > However i would like to store multiple func and rcolors within same object?
> > Thus make func and rcolor the multidimensional part of the array.
> > 
> > I am totally clueless for how both initiate and update such an object in javascript. I have managed to do it for numbers but i never initiated the object it was somehow forked in as i updated the object. And i really did not understand how it really worked. So if someone could show me howto make this array of integers to holld multiple functions and rectangles for each arr[i] it would be great.
> > 
> > function arraysize()
> > {
> > 
> >    for ( i = - scope; i <= scope; i ++ )
> >    {
> >       arr[i] =
> >       {
> >          count : i,
> >          func : '',
> >          fcolor : 'black',
> >          rheight : 100,
> >          rwidth : 100,
> >          rcolor : 'white',
> >          prime : true,
> >          formula : 0,
> >          sigma : 0,
> >       }
> >    }
> > }
> > 
> 
> Sorry but I am drunk lol I wall think for an ann-er in the morning lololol

Lets hope you sobered up...
var x = new Array(10);
for (var i = 0; i < 10; i++) {
  x[i] = new Array(20);
}
x[5][12] = 3.0;

How does this relate to my example array above?
I do not know how many occurences there will be, and it is only the func and rcolor property of the object that will be multidimensional.

for ( i = - scope; i <= scope; i ++ )
    {
      
       arr[i] =
       {
          count : i,
          func : '',
          fcolor : 'black',
          rheight : 100,
          rwidth : 100,
          rcolor : 'white',
          prime : true,
          formula : 0,
          sigma : 0,
       }
      arr[i] = new Array(20);//??????????
    }
}

[toc] | [prev] | [next] | [standalone]


#30508

Fromjonas.thornvall@gmail.com
Date2016-05-22 03:50 -0700
Message-ID<7061f6e1-cedb-42ab-b41b-e162133f4939@googlegroups.com>
In reply to#30507
Den söndag 22 maj 2016 kl. 08:42:41 UTC+2 skrev jonas.t...@gmail.com:
> Den söndag 22 maj 2016 kl. 01:41:58 UTC+2 skrev Aleksandro:
> > On 21/05/16 13:41, jonas.thornvall@gmail.com wrote:
> > > I have an object storing integers, many formulas may of course generate the same integer. And for some expressions for example on form a*x^j i would like to store each occurence. Now all my numbers are printed out in a square grid.
> > > 
> > > Right now the storing structure look like this and i set fontcolor and rectangle color as i print out the grid.
> > > 
> > > However i would like to store multiple func and rcolors within same object?
> > > Thus make func and rcolor the multidimensional part of the array.
> > > 
> > > I am totally clueless for how both initiate and update such an object in javascript. I have managed to do it for numbers but i never initiated the object it was somehow forked in as i updated the object. And i really did not understand how it really worked. So if someone could show me howto make this array of integers to holld multiple functions and rectangles for each arr[i] it would be great.
> > > 
> > > function arraysize()
> > > {
> > > 
> > >    for ( i = - scope; i <= scope; i ++ )
> > >    {
> > >       arr[i] =
> > >       {
> > >          count : i,
> > >          func : '',
> > >          fcolor : 'black',
> > >          rheight : 100,
> > >          rwidth : 100,
> > >          rcolor : 'white',
> > >          prime : true,
> > >          formula : 0,
> > >          sigma : 0,
> > >       }
> > >    }
> > > }
> > > 
> > 
> > Sorry but I am drunk lol I wall think for an ann-er in the morning lololol
> 
> Lets hope you sobered up...
> var x = new Array(10);
> for (var i = 0; i < 10; i++) {
>   x[i] = new Array(20);
> }
> x[5][12] = 3.0;
> 
> How does this relate to my example array above?
> I do not know how many occurences there will be, and it is only the func and rcolor property of the object that will be multidimensional.
> 
> for ( i = - scope; i <= scope; i ++ )
>     {
>       
>        arr[i] =
>        {
>           count : i,
>           func : '',
>           fcolor : 'black',
>           rheight : 100,
>           rwidth : 100,
>           rcolor : 'white',
>           prime : true,
>           formula : 0,
>           sigma : 0,
>        }
>       arr[i] = new Array(20);//??????????
>     }
> }

If i let out 20 above,  arr[i] = new Array(); will the subarray dynamically assign memory as i pass new properties?

So to update the object i use arr[x][y].func="mystring" or arr[x][y].rcolor="green". 

Is there space allocated for the rest of the attributes/properties of the object?

Does the object creation and the update seem right?


[toc] | [prev] | [next] | [standalone]


#30509

From"Michael Haufe (TNO)" <tno@thenewobjective.com>
Date2016-05-22 09:03 -0700
Message-ID<3aa6bb6e-c513-4228-ada6-095c58d67022@googlegroups.com>
In reply to#30503
On Saturday, May 21, 2016 at 12:41:36 PM UTC-5, jonas.t...@gmail.com wrote:
> I have an object storing integers, many formulas may of course generate the same integer. And for some expressions for example on form a*x^j i would like to store each occurence. Now all my numbers are printed out in a square grid.

Don't. It's going to be slower.

[toc] | [prev] | [next] | [standalone]


#30510

Fromjonas.thornvall@gmail.com
Date2016-05-22 14:59 -0700
Message-ID<0984346c-891a-4f03-96c5-c983f96aeb1d@googlegroups.com>
In reply to#30509
Den söndag 22 maj 2016 kl. 18:03:24 UTC+2 skrev Michael Haufe (TNO):
> On Saturday, May 21, 2016 at 12:41:36 PM UTC-5, jonas.t...@gmail.com wrote:
> > I have an object storing integers, many formulas may of course generate the same integer. And for some expressions for example on form a*x^j i would like to store each occurence. Now all my numbers are printed out in a square grid.
> 
> Don't. It's going to be slower.

Well just storing them within the array can hardly slow it down or?

[toc] | [prev] | [next] | [standalone]


#30511

From"Michael Haufe (TNO)" <tno@thenewobjective.com>
Date2016-05-22 15:57 -0700
Message-ID<1426456b-46cd-4a18-8d3b-1447508dd3e6@googlegroups.com>
In reply to#30510
On Sunday, May 22, 2016 at 4:59:50 PM UTC-5, jonas.t...@gmail.com wrote:
> Den söndag 22 maj 2016 kl. 18:03:24 UTC+2 skrev Michael Haufe (TNO):
> > On Saturday, May 21, 2016 at 12:41:36 PM UTC-5, jonas.t...@gmail.com wrote:
> > > I have an object storing integers, many formulas may of course generate the same integer. And for some expressions for example on form a*x^j i would like to store each occurence. Now all my numbers are printed out in a square grid.
> > 
> > Don't. It's going to be slower.
> 
> Well just storing them within the array can hardly slow it down or?

Memoization isn't free and your approach would be even less so. I've written a little about this topic in the past:

<https://thenewobjective.com/blog/2013/01/dynamic-programming-for-great-justice/>

[toc] | [prev] | [next] | [standalone]


#30514

Fromjonas.thornvall@gmail.com
Date2016-05-22 22:46 -0700
Message-ID<f1336942-b7c2-4cfa-8b28-bf1f4b62a918@googlegroups.com>
In reply to#30511
Den måndag 23 maj 2016 kl. 00:57:57 UTC+2 skrev Michael Haufe (TNO):
> On Sunday, May 22, 2016 at 4:59:50 PM UTC-5, jonas.t...@gmail.com wrote:
> > Den söndag 22 maj 2016 kl. 18:03:24 UTC+2 skrev Michael Haufe (TNO):
> > > On Saturday, May 21, 2016 at 12:41:36 PM UTC-5, jonas.t...@gmail.com wrote:
> > > > I have an object storing integers, many formulas may of course generate the same integer. And for some expressions for example on form a*x^j i would like to store each occurence. Now all my numbers are printed out in a square grid.
> > > 
> > > Don't. It's going to be slower.
> > 
> > Well just storing them within the array can hardly slow it down or?
> 
> Memoization isn't free and your approach would be even less so. I've written a little about this topic in the past:
> 
> <https://thenewobjective.com/blog/2013/01/dynamic-programming-for-great-justice/>

Beside for the last example, what is really the benefit of the recursive examples compared to the iterative?

For me that is not used to recursive calls the iterative naive approach using for and while is much easier to read and understand.

What is the main benefit with recursive calls, speed?

[toc] | [prev] | [next] | [standalone]


#30546

From"Michael Haufe (TNO)" <tno@thenewobjective.com>
Date2016-05-25 17:13 -0700
Message-ID<aa4d7adc-33fb-4976-8400-6c1941a083bc@googlegroups.com>
In reply to#30514
On Monday, May 23, 2016 at 12:46:12 AM UTC-5, jonas.t...@gmail.com wrote:
> Den måndag 23 maj 2016 kl. 00:57:57 UTC+2 skrev Michael Haufe (TNO):
> > On Sunday, May 22, 2016 at 4:59:50 PM UTC-5, jonas.t...@gmail.com wrote:
> > > Den söndag 22 maj 2016 kl. 18:03:24 UTC+2 skrev Michael Haufe (TNO):
> > > > On Saturday, May 21, 2016 at 12:41:36 PM UTC-5, jonas.t...@gmail.com wrote:
> > > > > I have an object storing integers, many formulas may of course generate the same integer. And for some expressions for example on form a*x^j i would like to store each occurence. Now all my numbers are printed out in a square grid.
> > > > 
> > > > Don't. It's going to be slower.
> > > 
> > > Well just storing them within the array can hardly slow it down or?
> > 
> > Memoization isn't free and your approach would be even less so. I've written a little about this topic in the past:
> > 
> > <https://thenewobjective.com/blog/2013/01/dynamic-programming-for-great-justice/>
> 
> Beside for the last example, what is really the benefit of the recursive examples compared to the iterative?

From the standpoint of speed and memory? They're equivalent as I explained:

O(n)/O(1) time/space

From the standpoint of brevity, the recursive form is 3 times shorter. ES6 evolved since I wrote the original. Here is a more modern comparison:

//before
function fib(n){
    if(n < 2)   
        return n;

	var f0 = 0, f1 = 1, f;

    for(var i = 1; i < n; i++){
        f  = f0 + f1;
        f0 = f1;
        f1 = f;
    }
    return f;
}

//after
var fib = n => {
  let f = (n0,n1,step) => step == n ? n1 : f(n1, n0 + n1, step + 1)
  return f(0,1,1)
}


> For me that is not used to recursive calls the iterative naive approach using for and while is much easier to read and understand.

Easy != Simple. Easy just means familiar. With practice you can understand recursion just as well

> What is the main benefit with recursive calls, speed?

The main benefit IMO is the ability to write concise algorithms that solve a problem in terms of itself.

[toc] | [prev] | [next] | [standalone]


#30515

Fromjonas.thornvall@gmail.com
Date2016-05-22 23:05 -0700
Message-ID<6fda8732-0818-4382-8d58-656704e17dea@googlegroups.com>
In reply to#30511
Den måndag 23 maj 2016 kl. 00:57:57 UTC+2 skrev Michael Haufe (TNO):
> On Sunday, May 22, 2016 at 4:59:50 PM UTC-5, jonas.t...@gmail.com wrote:
> > Den söndag 22 maj 2016 kl. 18:03:24 UTC+2 skrev Michael Haufe (TNO):
> > > On Saturday, May 21, 2016 at 12:41:36 PM UTC-5, jonas.t...@gmail.com wrote:
> > > > I have an object storing integers, many formulas may of course generate the same integer. And for some expressions for example on form a*x^j i would like to store each occurence. Now all my numbers are printed out in a square grid.
> > > 
> > > Don't. It's going to be slower.
> > 
> > Well just storing them within the array can hardly slow it down or?
> 
> Memoization isn't free and your approach would be even less so. I've written a little about this topic in the past:
> 
> <https://thenewobjective.com/blog/2013/01/dynamic-programming-for-great-justice/>

Do you have any suggestion, or do you just say it is not wise to make a deeper multidimensional storage structure?

I think the script could benefit from using a layered structure for the expression. For those integers that get multiple occurences i just put a border around no need to draw them out. 

And then you could use an optional event handler on mouse over and on mouse click to zoom in and scroll through the occurences/expressions.

[toc] | [prev] | [next] | [standalone]


#30547

From"Michael Haufe (TNO)" <tno@thenewobjective.com>
Date2016-05-25 17:15 -0700
Message-ID<a9322bcc-ad12-4eda-a87c-3fef5c04105f@googlegroups.com>
In reply to#30515
On Monday, May 23, 2016 at 1:05:12 AM UTC-5, jonas.t...@gmail.com wrote:

> Do you have any suggestion, or do you just say it is not wise to make a deeper multidimensional storage structure?
> 
> I think the script could benefit from using a layered structure for the expression. For those integers that get multiple occurences i just put a border around no need to draw them out. 
> 
> And then you could use an optional event handler on mouse over and on mouse click to zoom in and scroll through the occurences/expressions.

I think you are trying to solve too many things simultaneously. Start from the bottom up instead of the top down. 

[toc] | [prev] | [next] | [standalone]


#30516

Fromjonas.thornvall@gmail.com
Date2016-05-22 23:08 -0700
Message-ID<19bad3f5-82f6-4a16-a3c7-cd1d4063ca73@googlegroups.com>
In reply to#30511
Den måndag 23 maj 2016 kl. 00:57:57 UTC+2 skrev Michael Haufe (TNO):
> On Sunday, May 22, 2016 at 4:59:50 PM UTC-5, jonas.t...@gmail.com wrote:
> > Den söndag 22 maj 2016 kl. 18:03:24 UTC+2 skrev Michael Haufe (TNO):
> > > On Saturday, May 21, 2016 at 12:41:36 PM UTC-5, jonas.t...@gmail.com wrote:
> > > > I have an object storing integers, many formulas may of course generate the same integer. And for some expressions for example on form a*x^j i would like to store each occurence. Now all my numbers are printed out in a square grid.
> > > 
> > > Don't. It's going to be slower.
> > 
> > Well just storing them within the array can hardly slow it down or?
> 
> Memoization isn't free and your approach would be even less so. I've written a little about this topic in the past:
> 
> <https://thenewobjective.com/blog/2013/01/dynamic-programming-for-great-justice/>

I like your writing style better than the recursive programming, very clear and concise. :)

[toc] | [prev] | [next] | [standalone]


#30517

Fromjonas.thornvall@gmail.com
Date2016-05-23 08:31 -0700
Message-ID<01b07c96-617e-4d2f-83bc-e85fb4079a99@googlegroups.com>
In reply to#30511
Den måndag 23 maj 2016 kl. 00:57:57 UTC+2 skrev Michael Haufe (TNO):
> On Sunday, May 22, 2016 at 4:59:50 PM UTC-5, jonas.t...@gmail.com wrote:
> > Den söndag 22 maj 2016 kl. 18:03:24 UTC+2 skrev Michael Haufe (TNO):
> > > On Saturday, May 21, 2016 at 12:41:36 PM UTC-5, jonas.t...@gmail.com wrote:
> > > > I have an object storing integers, many formulas may of course generate the same integer. And for some expressions for example on form a*x^j i would like to store each occurence. Now all my numbers are printed out in a square grid.
> > > 
> > > Don't. It's going to be slower.
> > 
> > Well just storing them within the array can hardly slow it down or?
> 
> Memoization isn't free and your approach would be even less so. I've written a little about this topic in the past:
> 
> <https://thenewobjective.com/blog/2013/01/dynamic-programming-for-great-justice/>

For even greater justice, but a tad slower using base 10 but faster and bigger using bigger base.

<script language="Javascript">

/*ADD TWO VARIABLES USING CHOSEN BASE*/
function naiveAdd(base, arrOne, arrTwo)
{
   addOne=arrOne.slice();
   addTwo=arrTwo.slice(); 
   abigArr = addOne.length;
   asmallArr = addTwo.length;
   addResult = [];
   remainder = 0;
   for (i = 0; i < asmallArr; i ++ )
   {
      
      addOne[i] = addOne[i] + addTwo[i] + remainder;
      if (addOne[i] >= base)
      {  
         
         addOne[i] = addOne[i] - base;
         remainder = 1;
      
      }
      else
      {
         remainder = 0;
      }
   }
   // If strings of equal length but there is a remainder;
   while (remainder == 1 && addOne[i]==(base-1))
   {
      addOne[i] = 0;
      i++;
   }
   if (remainder == 1) {if (isNaN(addOne[i])) addOne[i] = 0; addOne[i] = addOne[i]+1;}
   return addOne;
}

/* COMPARE SIZE OF TWO ARRAYS, IF A < B RETURN TRUE, IF B >= A RETURN FALSE */
function lessThan(A, B)
{
   var AA = A.length;
   var BB = B.length;
   if(AA > BB) return false;
   if(AA < BB) return true;
   // AA = BB, compare indexes from biggest to smallest.
   for(i = AA - 1; i >= 0; i -- )
   {
      if(A[i] < B[i]) return true;
      if(A[i] > B[i]) return false;
   }
   return false;
}

/* ORDER THE ARRAYS SO THE BIGGER IS PASSED AS FIRST ARGUMENT*/
function orderArrayAdd(Abase, A, B)
{
   return lessThan(A, B) ? counterArr = naiveAdd(Abase, B, A) : counterArr = naiveAdd(Abase, A, B);
}

/* GET VALUES FROM INPUT*/
function fetchValues(){
base=document.eval.FBASE.value;
myeval = document.eval.expression.value;
lucasStart = document.eval.start.value;
lStart=parseInt(lucasStart)
lucasScope = document.eval.scope.value;
lScope=parseInt(lucasScope)
}

/* PARSE VALUES FROM INPUT */
function parseToInt(){
if (result = myeval.indexOf("+") != - 1)
   {
      opArr = myeval.split("+");
      operation = "+";
   }
   arrOne = opArr[0].split("").map(Number).reverse();
   arrTwo = opArr[1].split("").map(Number).reverse();
}


function main(){
document.eval.result.value="";
document.eval.timing.value="";
evalStr="";
var out=[];counter=1;
fetchValues();
base=parseInt(base);
parseToInt();
flip=0;
/* TIMER START */
var start = new Date().getTime();
lEnd=lStart+lScope;

while(counter<=lEnd){
out=orderArrayAdd(base,arrOne,arrTwo);
arrOne=arrTwo.slice();
arrTwo=out.slice();
if (counter>=lStart && counter<lEnd) {fib=out.slice();evalStr+=counter+"th"+" "+fib.reverse().join(',')+"\n";}
counter++;
}
/* TIMER END */
var end = new Date().getTime();
var time = end - start;
document.eval.result.value+=evalStr;
document.eval.timing.value+=time;
} </script>

<html><body onLoad="main()";>
<H1>FIBONACCI AND OTHER SERIES</H1>
<form name="eval" onsubmit="main(); return false;">
CHOSE BASE <input type="text" name="FBASE"  value="4503599627370495" size="20"><P>
<input type="submit" value="Generate"><input type="text" name="timing"  value="" size="4"> ms<br>
Start print x'th number in Serie<input type="text" name="start" value="100000" size="9"> How many follwing in Serie -><input type="text" name="scope" value="1" size="9"><br>
Generate Serie expansons using startvalues<input type="text" name="expression" value="1+0" size="10"><br>
Result <textarea name="result" cols="100" rows="30"></textarea><br>


</form>
</body></html>

[toc] | [prev] | [next] | [standalone]


#30534

Fromjonas.thornvall@gmail.com
Date2016-05-24 05:38 -0700
Message-ID<3e435eda-049d-42e3-a633-5166155388cb@googlegroups.com>
In reply to#30517
Den måndag 23 maj 2016 kl. 17:31:41 UTC+2 skrev jonas.t...@gmail.com:
> Den måndag 23 maj 2016 kl. 00:57:57 UTC+2 skrev Michael Haufe (TNO):
> > On Sunday, May 22, 2016 at 4:59:50 PM UTC-5, jonas.t...@gmail.com wrote:
> > > Den söndag 22 maj 2016 kl. 18:03:24 UTC+2 skrev Michael Haufe (TNO):
> > > > On Saturday, May 21, 2016 at 12:41:36 PM UTC-5, jonas.t...@gmail.com wrote:
> > > > > I have an object storing integers, many formulas may of course generate the same integer. And for some expressions for example on form a*x^j i would like to store each occurence. Now all my numbers are printed out in a square grid.
> > > > 
> > > > Don't. It's going to be slower.
> > > 
> > > Well just storing them within the array can hardly slow it down or?
> > 
> > Memoization isn't free and your approach would be even less so. I've written a little about this topic in the past:
> > 
> > <https://thenewobjective.com/blog/2013/01/dynamic-programming-for-great-justice/>
> 
> For even greater justice, but a tad slower using base 10 but faster and bigger using bigger base.
> 
> <script language="Javascript">
> 
> /*ADD TWO VARIABLES USING CHOSEN BASE*/
> function naiveAdd(base, arrOne, arrTwo)
> {
>    addOne=arrOne.slice();
>    addTwo=arrTwo.slice(); 
>    abigArr = addOne.length;
>    asmallArr = addTwo.length;
>    addResult = [];
>    remainder = 0;
>    for (i = 0; i < asmallArr; i ++ )
>    {
>       
>       addOne[i] = addOne[i] + addTwo[i] + remainder;
>       if (addOne[i] >= base)
>       {  
>          
>          addOne[i] = addOne[i] - base;
>          remainder = 1;
>       
>       }
>       else
>       {
>          remainder = 0;
>       }
>    }
>    // If strings of equal length but there is a remainder;
>    while (remainder == 1 && addOne[i]==(base-1))
>    {
>       addOne[i] = 0;
>       i++;
>    }
>    if (remainder == 1) {if (isNaN(addOne[i])) addOne[i] = 0; addOne[i] = addOne[i]+1;}
>    return addOne;
> }
> 
> /* COMPARE SIZE OF TWO ARRAYS, IF A < B RETURN TRUE, IF B >= A RETURN FALSE */
> function lessThan(A, B)
> {
>    var AA = A.length;
>    var BB = B.length;
>    if(AA > BB) return false;
>    if(AA < BB) return true;
>    // AA = BB, compare indexes from biggest to smallest.
>    for(i = AA - 1; i >= 0; i -- )
>    {
>       if(A[i] < B[i]) return true;
>       if(A[i] > B[i]) return false;
>    }
>    return false;
> }
> 
> /* ORDER THE ARRAYS SO THE BIGGER IS PASSED AS FIRST ARGUMENT*/
> function orderArrayAdd(Abase, A, B)
> {
>    return lessThan(A, B) ? counterArr = naiveAdd(Abase, B, A) : counterArr = naiveAdd(Abase, A, B);
> }
> 
> /* GET VALUES FROM INPUT*/
> function fetchValues(){
> base=document.eval.FBASE.value;
> myeval = document.eval.expression.value;
> lucasStart = document.eval.start.value;
> lStart=parseInt(lucasStart)
> lucasScope = document.eval.scope.value;
> lScope=parseInt(lucasScope)
> }
> 
> /* PARSE VALUES FROM INPUT */
> function parseToInt(){
> if (result = myeval.indexOf("+") != - 1)
>    {
>       opArr = myeval.split("+");
>       operation = "+";
>    }
>    arrOne = opArr[0].split("").map(Number).reverse();
>    arrTwo = opArr[1].split("").map(Number).reverse();
> }
> 
> 
> function main(){
> document.eval.result.value="";
> document.eval.timing.value="";
> evalStr="";
> var out=[];counter=1;
> fetchValues();
> base=parseInt(base);
> parseToInt();
> flip=0;
> /* TIMER START */
> var start = new Date().getTime();
> lEnd=lStart+lScope;
> 
> while(counter<=lEnd){
> out=orderArrayAdd(base,arrOne,arrTwo);
> arrOne=arrTwo.slice();
> arrTwo=out.slice();
> if (counter>=lStart && counter<lEnd) {fib=out.slice();evalStr+=counter+"th"+" "+fib.reverse().join(',')+"\n";}
> counter++;
> }
> /* TIMER END */
> var end = new Date().getTime();
> var time = end - start;
> document.eval.result.value+=evalStr;
> document.eval.timing.value+=time;
> } </script>
> 
> <html><body onLoad="main()";>
> <H1>FIBONACCI AND OTHER SERIES</H1>
> <form name="eval" onsubmit="main(); return false;">
> CHOSE BASE <input type="text" name="FBASE"  value="4503599627370495" size="20"><P>
> <input type="submit" value="Generate"><input type="text" name="timing"  value="" size="4"> ms<br>
> Start print x'th number in Serie<input type="text" name="start" value="100000" size="9"> How many follwing in Serie -><input type="text" name="scope" value="1" size="9"><br>
> Generate Serie expansons using startvalues<input type="text" name="expression" value="1+0" size="10"><br>
> Result <textarea name="result" cols="100" rows="30"></textarea><br>
> 
> 
> </form>
> </body></html>

I am not sure what all the prescriptions is all about but i sure find them annoying.

[toc] | [prev] | [next] | [standalone]


#30549

From"Michael Haufe (TNO)" <tno@thenewobjective.com>
Date2016-05-25 17:22 -0700
Message-ID<80388e60-d044-40b4-8254-c5b92ed0a019@googlegroups.com>
In reply to#30534
On Tuesday, May 24, 2016 at 7:38:51 AM UTC-5, jonas.t...@gmail.com wrote:
>
> I am not sure what all the prescriptions is all about but i sure find them annoying.

Prescription drugs? That would explain a bit...

[toc] | [prev] | [next] | [standalone]


#30550

Fromjonas.thornvall@gmail.com
Date2016-05-25 22:56 -0700
Message-ID<ebbf4f76-ace5-4be0-b351-0ce9df7adb96@googlegroups.com>
In reply to#30549
Den torsdag 26 maj 2016 kl. 02:22:46 UTC+2 skrev Michael Haufe (TNO):
> On Tuesday, May 24, 2016 at 7:38:51 AM UTC-5, jonas.t...@gmail.com wrote:
> >
> > I am not sure what all the prescriptions is all about but i sure find them annoying.
> 
> Prescription drugs? That would explain a bit...

The nonsense ads, i find them annoying. For some reason there usually comes a dozen or so as soon i post some code.

If there is no speed gain i think i keep the simpleton / naive approach. I think beginners in programming will favour understanding that code. When i look at recursive code it look so entangled. 

The operations seems snared into the execution part, with c=a; a=b; b=c; there is really no doubt about what is happening wheter you use a for or a while loop.

Regarding my code, it may not be beautiful but it certainly does what it is meant to do in a miracuous way. Finding Fib nr 100000 and printing it in 5 seconds.

That is a 21033 digit number... so my approach to programming may not be so bad afterall...

And ***I*** did calculate and wrote it out using 2k of code in javascript, a feat you and the other simpletons of this group ;) would not dream of without the help from my code. 

[toc] | [prev] | [next] | [standalone]


#30551

Fromjonas.thornvall@gmail.com
Date2016-05-25 23:07 -0700
Message-ID<0103beb0-91a3-4349-bcd1-2ccac2898098@googlegroups.com>
In reply to#30550
Den torsdag 26 maj 2016 kl. 07:57:04 UTC+2 skrev jonas.t...@gmail.com:
> Den torsdag 26 maj 2016 kl. 02:22:46 UTC+2 skrev Michael Haufe (TNO):
> > On Tuesday, May 24, 2016 at 7:38:51 AM UTC-5, jonas.t...@gmail.com wrote:
> > >
> > > I am not sure what all the prescriptions is all about but i sure find them annoying.
> > 
> > Prescription drugs? That would explain a bit...
> 
> The nonsense ads, i find them annoying. For some reason there usually comes a dozen or so as soon i post some code.
> 
> If there is no speed gain i think i keep the simpleton / naive approach. I think beginners in programming will favour understanding that code. When i look at recursive code it look so entangled. 
> 
> The operations seems snared into the execution part, with c=a; a=b; b=c; there is really no doubt about what is happening wheter you use a for or a while loop.
> 
> Regarding my code, it may not be beautiful but it certainly does what it is meant to do in a miracuous way. Finding Fib nr 100000 and printing it in 5 seconds.
> 
> That is a 21033 digit number... so my approach to programming may not be so bad afterall...
> 
> And ***I*** did calculate and wrote it out using 2k of code in javascript, a feat you and the other simpletons of this group ;) would not dream of without the help from my code.

By the way Wolfram Alpha is way off, it seem it cannot handle numbers of that size without doing some dysfunctional approximations.

[toc] | [prev] | [next] | [standalone]


#30552

Fromjonas.thornvall@gmail.com
Date2016-05-25 23:10 -0700
Message-ID<0b6f5919-50c2-4f4d-ad39-e8faa04d6c82@googlegroups.com>
In reply to#30551
Den torsdag 26 maj 2016 kl. 08:07:54 UTC+2 skrev jonas.t...@gmail.com:
> Den torsdag 26 maj 2016 kl. 07:57:04 UTC+2 skrev jonas.t...@gmail.com:
> > Den torsdag 26 maj 2016 kl. 02:22:46 UTC+2 skrev Michael Haufe (TNO):
> > > On Tuesday, May 24, 2016 at 7:38:51 AM UTC-5, jonas.t...@gmail.com wrote:
> > > >
> > > > I am not sure what all the prescriptions is all about but i sure find them annoying.
> > > 
> > > Prescription drugs? That would explain a bit...
> > 
> > The nonsense ads, i find them annoying. For some reason there usually comes a dozen or so as soon i post some code.
> > 
> > If there is no speed gain i think i keep the simpleton / naive approach. I think beginners in programming will favour understanding that code. When i look at recursive code it look so entangled. 
> > 
> > The operations seems snared into the execution part, with c=a; a=b; b=c; there is really no doubt about what is happening wheter you use a for or a while loop.
> > 
> > Regarding my code, it may not be beautiful but it certainly does what it is meant to do in a miracuous way. Finding Fib nr 100000 and printing it in 5 seconds.
> > 
> > That is a 21033 digit number... so my approach to programming may not be so bad afterall...
> > 
> > And ***I*** did calculate and wrote it out using 2k of code in javascript, a feat you and the other simpletons of this group ;) would not dream of without the help from my code.
> 
> By the way Wolfram Alpha is way off, it seem it cannot handle numbers of that size without doing some dysfunctional approximations.

You see my bignumber approach actually work weither it is 20000, 200 0000 or 2 million digits.

I'm just a tad better.

And it works in anybase.
https://www.youtube.com/watch?v=5NJZre-2QBE

[toc] | [prev] | [next] | [standalone]


#30553

Fromjonas.thornvall@gmail.com
Date2016-05-25 23:24 -0700
Message-ID<dc80ef0f-4bd1-4960-9436-5a67ce84acd5@googlegroups.com>
In reply to#30552
Den torsdag 26 maj 2016 kl. 08:10:29 UTC+2 skrev jonas.t...@gmail.com:
> Den torsdag 26 maj 2016 kl. 08:07:54 UTC+2 skrev jonas.t...@gmail.com:
> > Den torsdag 26 maj 2016 kl. 07:57:04 UTC+2 skrev jonas.t...@gmail.com:
> > > Den torsdag 26 maj 2016 kl. 02:22:46 UTC+2 skrev Michael Haufe (TNO):
> > > > On Tuesday, May 24, 2016 at 7:38:51 AM UTC-5, jonas.t...@gmail.com wrote:
> > > > >
> > > > > I am not sure what all the prescriptions is all about but i sure find them annoying.
> > > > 
> > > > Prescription drugs? That would explain a bit...
> > > 
> > > The nonsense ads, i find them annoying. For some reason there usually comes a dozen or so as soon i post some code.
> > > 
> > > If there is no speed gain i think i keep the simpleton / naive approach. I think beginners in programming will favour understanding that code. When i look at recursive code it look so entangled. 
> > > 
> > > The operations seems snared into the execution part, with c=a; a=b; b=c; there is really no doubt about what is happening wheter you use a for or a while loop.
> > > 
> > > Regarding my code, it may not be beautiful but it certainly does what it is meant to do in a miracuous way. Finding Fib nr 100000 and printing it in 5 seconds.
> > > 
> > > That is a 21033 digit number... so my approach to programming may not be so bad afterall...
> > > 
> > > And ***I*** did calculate and wrote it out using 2k of code in javascript, a feat you and the other simpletons of this group ;) would not dream of without the help from my code.
> > 
> > By the way Wolfram Alpha is way off, it seem it cannot handle numbers of that size without doing some dysfunctional approximations.
> 
> You see my bignumber approach actually work weither it is 20000, 200 0000 or 2 million digits.
> 
> I'm just a tad better.
> 
> And it works in anybase.
> https://www.youtube.com/watch?v=5NJZre-2QBE
The 100 000 Fib
20552 characters in base 10,000000 ends with a 5

25974069347221724166155034021275915414880485386517696584724770703952534543511273686265556772836716744754637587223074432111638399473875091309656973821883044935228763853133492135326792789567015127657827163560807350532224323311438398651613782723812477745377833729991621463450054669860398627509966393664092118901252719601721050630035058689402855810367511765825136837743868493641345733883436515877542537191241050332195991330062204363035213756525421823998690848556374080179251761629391754963458558616300762819916081109836526352995440694284206571460449380564713634633000520852277707554446794723709039790191486043284681985796115951018506082649192345873133991513391993236312301864172536477136266475081339824312317343145296418179005118795731676683497990168201184990775668645684506628739248560391404760519955006628882634587718941068037009187936500173301171002831047394745625691444932821374855573864080579813028266640270354294412104919995803131876805899186513425175959911525631553377039969410355182752749199598022575079023779813089922984996304496255814045517000250299764322193462165366210841876745428298261398234478366581588408190330738293950082132093747154851312722081730543226486694963098791471436292555425262404399961532697987687510646819068792118299167964409178271868561702918102212679267413626549978496884368097525470013145741864064482994858725517447466956518791269169932445648176733222571493149677633458466238303338223970243685947828764187578857291071013370300094229333597292779191409212804915459762627915705524815888405177941819295216769576608748815567860128818354354292373978115478570132843861272862017665395344499300198006295389369855007232866513171811358866135374726845854325489811371766051946169379168844253425947812631388952479565943807153019112539648471126389007133628569101551453423329441284357220996286746119420951661023097470996553190058158669911445442647882872642845017253320486483194578920399848938236367456182203750973485668474338872490493370316338265717607297788917989136673251962324711803728017392157239082276922807729245666275053833750069260772159361942126892030256744356537800831830637593334523502569729065152853271943677560156660399164048825639676930792905029514886934137991251748566670747175149389790386533381395346848378086126737554383821108448976538368483182588363399173104558509056638462025014631311831087429077292622159430242915947403061018398168550669502619737615857176119947587572212987205312060791864983615969233959410411863516885488391191851790615115627529361584900087215019222651178531508925102752804515123860379218469212153382928713692432152733271415747882959026015719548531644479454675285840236000238344795203451080332820138038807089807348326201227952633606773669875783326254859449602191736886778624112056210983698519729017715781120404586491539351157834995461006366357454485082418882790675313599505192062229760153765297973085881648731173082370598284894044874039320535929359764541655607954724778620299692329561389719894679422187273605123365595211331087787582288795975803204596084790245063851941743126163775104599211248687949634170686209290889306852523480569259983337751039010131661781230511457193276629167125446512151746802548190358351688971707576778656188008220346836321018130262329960275994035799977740462449521145315883703579044832931500072461734173558055678321534543411700202585608916629419863740151456957227283692196322951118776253075340259478144820465746028848556280693481139827601685558407954216205754355729151064153759293902288435612079264375560062367986544382464373946972471945996555795505838034825597839682776084731530251788951718630722761103630509367426226171736305861329154424695432904616258691774630578507674937487992329181750163484068813465534370997589353607405172909412697657593295156818624747127636468836551757018353417274662607306510451195762866349922848678780591085118985653555434958761664016447588286336297040462890976773625658430235314749461233912068632146637087844699214275415694109122465685712047172411333784898167649692498163342117685715031167104006817530319211541561195804257065869312727621371069747222602965552461105371555453249975843275200199214301915053629960070429632978051036665063878626815765877268374512897685079636637105938091122542883583919412115477375998130192165095214013330607098731373292651816922684506344395405672981203154639232498179378046910379342216949522917930299492375072993250630594281390279308413447306141164335561476409310442591848136393054236937897652052645634764831827263337151211203062923388928648794920973784786188486826804647319539284039830800880386904955741975621929392211082576639768136104449002472948340326796768837621396744757138872928630798218493143438797780887379588968409461434159271317578365114578289355818599292353438888884658745213083813777944363611976283903689459576012031650227985790154534474735270697285145459986142290273729113146378204551622544753535677362279364854503571020864454120898423503890877223039849380214734809687433336225449150117411751570704561050895274000206380497967964026178186644812485472696308234733772455433905198413087697812765659167642290229481817630757102557933650081522863836344931380899717858707086363220586901893837776606300606675773242727292924742129526500076646722730009956124191409138984675224955790729398495608750456694217771551107346630456603944136235888443676215273928597722879373559667239246138274687032178584599482575147454064364609970593161205968415604732343966524572316503177928338605938836041769142873273570398680334264670071717363573091122981306903286137122597937096605775172964528263757434075792282180744352908669606854021718597891166333863858589736209114248432178645039479195424208191626088571069110433994801473013100869848866430721216762473119618190737820766582968280796079482259549036328266578006994856825353643667482253460375134503603152154296943991866236857638062351209884448741138600171173647632126299614856192559970756682786677873237741944446227539990929104469771647615111867232723867928133367306181944849396607123345271856520253643621964198782752978813068031314181706931446822118927578497828109436775154071016350553798003842219045508482239386993296926659221112742698133062300073465628498093636693049446801628553712633412620378491919498600097200836727876650786886306933418995225768314390832484886340318941941613697984383334660867670943164365353843091215781554351285207772085809892099586449602479491970687237656871092343807195098248144731578137800863935841875665509850132188285284018498140769073850736953537771188038852893534760093338598691608289335421147722936561972762646037262723932099118782040767412272258127667294007192423793330972132364184093956102995971291799828299539147382437802779051112309545825328887211461701334403859396540478061993332245473178034073409251213217279595753863158148810392952475410943885550983826276331276067181261710220113561818007754002275167341441692164249731756213631285882819780578883245453458152243493726813343399771051253208147834567139835038332901313945986481820272322043341930929011907832896569222878337497354301561722829115627329468814853281922107523736268276431526857354932230280181014496490091552924863833888566489300225097434360120081436515362536919944670971112695196672578061891215440222487564601554632812091945824653557432047644212650790655282083379760714651275832048716527157747232588727576112835759213255393444628943325815028633583669291828566894736223508250294964065798630809614341696830467595174355313224362664207197608459024263017473392225291248366316428006552870975051997504913985946807101360233644016441791886108532307649917143720544678235972117604651532001630853363193515896458906817223728123103202718979179512727996565369403211124284659099455638021546131610626752163380566439431888126819949400553706869762185523185892110096344101293353573391845966819753983428469682288946007635203168892200202193131836975755696206111577430582630553586201563789124631220672933992617378379625150999935403648731423288739779689089083699962929953919772177965334212492919783837514600620549673416628334873410110977705358980664981360113955715843283087139405825352740560810115039079416880791972129331483030726386786314110384431282159949368243429981887197686376044963425975242568861886889789808883158650762626048564650043228968561492550639688114044004295038942458723822335431010786915173283336047792627277656860761777056168740525774374998377583014385613542727383858977413352694916548392972151955479357892386676250274537010466090938244962662693532130374453889247921616118888970207791044856319951482663080287954954645358386630734442375331971227915886177289652090149848305435983207713266534072906620167757064096901837712013068232453334779666652532549087361961483782415660712716503835822572892157820936951099589013285949072430618332575521208097175220229497428018234454137119162984499147222541965946822214682606449618392542496709031040075814888579716722463228870164384039084638567311643081695373267903311458368057521119639905615169154708510459700542098571797318015564741406172334145847111268547929892443013914682891036791792169786165824897322033591376706527676521371439853027609884780562169946596554613791749856597392273794167264953778019929835542786617912312669937473077773569324430166839333011554515542656864937492128687491217542459678311329692484924667442619993397282567487346020115044222878046612432018301618232183908654771042398228531316559685688052265714744288233175394565438819286244326625033453881995900851521138312449186180262443219554043398572284134125440941177172215686708629174212405311062052284298619927362940620883475485364512812327960909721395377536002307676569420821994303464878334854449271353945022459133437466493770165560576338469706291872574542655879414630176639760457474311081556747091652708748125267159913793240527304613693961169892589808311906322510777928562071999459487700611801002296132345882945584409524966111583428049086438608807964455776369185774375402589685592725251456340438521782589059955395462745138545445291676104296926797089358005623450191857148903041849576740081935997321871195749635709596782517109626475206889080640765144589313287076745416960710793169270428516893413311046353506242209810363216771910420786162184213763938194625697286781413636389620123976910465418956806197323148414224550716172158513213020306841760872158927020988791089380810459033972765473264169168454456276007595613671035845756490944306924525328500309106878315756151984756756919128478465469255866511155791346127242533608363513134218395177154511228464455136016013513228948543271504768393075561009878609666387061227869027483181933160670148495716300470526222823840626681844878837454813199438038761383012885988526420199228618820849958864088852135250145761539648264745102590253074317295689963649961570755185583716593536712544851508936290456773663003556245737477910098799249914696722404148160128953094401548894261378314008780431143174185807182618514951138744831358439067228949482582860216502889272283874264327861686903819605315589445945188735197246008221529343980828254126128257157209359853828007385604729194118460844852353778335033068619777245018863647034497336647310060218128792886991861824418453968994777259482169137133647474531729798092458443611296189975956962409718455642051143258959184472492094293030165148871379802123790655365251547802980594075294405131458755153779486163587991158192019808879694967187448224156836463534326162426329347616344581638901638051238941845239734218414968892623984896486420934981668149477115517709562669029850101513537599801272501241971119871526593747484778935488777815192931171431167444773882941064615028751327709474504763922874890662989841540259358340351420351361688192482389980277666691634213342431205450735938861668769118818577611813577133248396520988208598239129860638682280475436248956522921410859852037330544625953261340234864689275060526893755148403298542869912210525970056285767077256769530097897004648920009852106980295419699802138053295798159478289934443245491565327845223840551240445208226435420656313310702947223715527705426348207398445488958924886139765779145414427653584572951329719091947694411910966797474262675590953832039169673494261360032263077428684105400613510521944137781580950571452684600981035219249042795850736436961021241137739717164869525493114805040126568351268829598413983222676377804500626572417317573952197968907548251993292596498162706866565830178877405615167159731927320479376247375505855052839662945669925221736008740812121420907104193759857172143133801742514158249182471090508471597724941704932025416523932323325885158889333797136310892571531417761978326033751090262840664158013713593565292780884563059517708144399411467429185036074885236665474486992808323051681571160291183637414795849210086052898146954775081233889694315286102120273674704990393417035171342126923486700566627506229058636911882228903170510305406882969708755453293694346398129769647803182545164217834734771647158423238594581830527562139101869976043058440686657123468696794560441557421039179758348979935882751881524675930878928159243492197545387668305684668420775409821781247533545231947973989533201759886402810588255576980439712538312459428957377696001857497335249965013509368925958021863811725906506436882127156815751217129765992750370228283963962915973251173418586721023497317765969454283625519371556009143680329311962842546628403142444370648432390374906410811300792848955767243481200090398884572709077508736388732996425555047381252897596293482287891761992725138309388288292514168376227582408191893360365387528411678570372098971883298692192781662967584458017491180911966304818743415506779086394883148924150430047674527971283482211522228370628573142441078237925136450866775666228049772113971406216641163247567842166129614771090188269467737768640617672148429389497667138012278894139026553511096118347012565197540807953840609168639369066737866272094294342642604029215831734500372746258899262204987712117845563348492490326003585690993823927772974984135656148307882623633223683807098223460122742413790364734517359252157547571609342709351929017239549214264906911152715233381912404281210289373848816735895393450893069771552298919969890388588327540904430032198683400347027122002015969937169065033054757709539874858067002449104550489006172718916803139452803616563394157133463722255047754746075605502410876438212168884891694037125890194849068537972224456200948381949153272450227621858916950745794983759821660448199651936011026157694717620257170248684914616894068404140833587562118319210838005632144562018941505945780025318747471911604840677997765414830622179069338538751292989830095827755414543505876898494417913653589162009872522249055183554603706533183176716110738009786625247488691476077664470147193074476302411660335671765564874440577990531996271632972910944924921645603061882777294775764777446452586328919159107444252320082918209518210837353881330983215894686801279542247520719241346483349639150948130975414332442092999307514810779192346128122331617994299306188005334145506339321393396468616164169552202164479954172431711657444713641977332048993650747678441499295480730258564429423817876415064928783617679786771585107842357026402133880188756019892340568684232155856285864552525837710620532224244987990625263484010774322488172558622333020763999338541520153438477254429178951306370503204449177977523787195827797679968611362653229111862963116468515993466069346055754595663155830033697634000276685151293843638886908283761411577320035275651587459065670254394379311048385713132944906492658236310894953509008267315449722639664808861804157397788847289217461897418972177700098624496537590127270152276345108749694801221068495206302519011655963580552429180205586904259685261047412834518466736938580027700252965356366721619883672428226933950325930390994583168665542234654857020875504617520521853721567282679903418135520629998953664701065579532129541336924472492212436324523428951884617791223386967423398069488727058750338922839509513520912319258159006960395156367736067109050566299635718764232479207528361608055976977787564767672152122232718482148444663126148758422609260887576433173102326376886482259469121103236773755812213347055680595800831012748167396201958359802396741448986727684586981937678375716793672321308158619104599505897099106468691946344803857414382962954713137217366983618455814455748676124322451519943362182916191468026091121793001864788050061351603144350761892134416024880917410512322903571792054979279709245024799408426961588184426161637800447594782122408732041244211691998055726491182436619218357147628914258057718717436880003241130087048193739622950171430900984769272374988759386399425305953316078916188108635598244457894279934651491595288486975748802582335357167786482682805114885429732788197765736966005727700162592404301688659946862983717270595809808730901821209313430058796552694788498092548430546761134654748067296743997636125924346377199958438628123919854702024148800768808188480878923915913694632931132768493297772016466417275872591223547844808134333280500877588552646861195769621722393086937957571658218524162043419723839899327348034292623472233815510229101262949249742423271698842023297303260161790575673111235465890298298313115123607667739689981538122869996420146098525797936912460163460887623212862056342159014791886321946596374834825642916162785329482393132294402310432772887681395502133482663886874532592815878545038909915619496324788550350902893997371898800399902613201587267863787309567810962531100805448941885798356590206368069964316533912029944327726770869305240718416592070961392864019667257508701221814973313369580960036975176495135040285926249203398111149532275336218445007443315624345324842179861083462613458975912348399707518542232816771872159568272432459108290198863936978454262256691254274705697567984857136623679238784781612014779829390805131502581745237735295101652969345627861222411507835877553733483727644398380826672147400344663227769189369676128789834889420946881023084273645285450496675969731883604449670285319063739691635798928865719935397723495486787180416414152814894437850362910715178052858575839877111454742401564164771941163913549354667555935926088492005463846854030280809364172505836533680934072253108208447235702268098269514261624512040407115014487478561999228146645658939384880286438223138498523284523606670458051136796637510392481633361732745472757756368109773445392758275605974251607546868965779453052162315939865780974801515414987097778787053570580084723768924221897503127585271401731176212798987449584061998439133656802977212875193498850449971391428515803232482302134063031258607262454163776523450552251086318285359658520708173392709566445011404055165790550374177803933516583690454347721422281816832539613634982525215232257690920254216409657452618066051777901592902884240599998882753691957540116954696152270401280857579766154722192925655963991820948894642657512288766330302133746367449217449351637147257329808328127264681877593565842183835947027920136639076897417389622525757826639908097926470114075803678505993818871845600946958332707751261812820153910417739509182441375619999378192403624695582359241714787277944844310875190187414112903707060520851629757983617542510416422448675773507563380188953792631833898559559565278572279261555244947393636655339452865621546428834316228292112329045184221253288810141588406161993919504223059898349966569463580186816717074818823215848647734386789115646607551753855522244285240494680336922999893007839206912151774069642857393196910500988278523053797637940257968953295112436166778910585557213381789089945453947915927374958626823784448687203724348883461685629009785053249703693336194243980288236432355380828003875741710969289725499878566253488670330951551845212694498925159639207942145266508516052325614861938282489838000815085351564642761700832096483117944401971780149213345335903336672376719229722069970766055482452247416927774637522135201716231722137632445699154022395494158227418930589911746931773776518735850032318014432883916374243795854695691221774098948611515564046609565094538115520921863711518684562543275478705300069984231401801694211091059254935961167194576396232883127126832850176032177168042496576741869271132155732749935709942324416387089242427584476512155726763792476534180898431267694111031316595142947937767069888124964342193328740439485538222160837088907598277390184241381978110258545370885867014506235785139601099874760525354501439353062072439709976445146790993381448994644609780957731953649387349500268605645556932242296918156302939224876064708734311663842054424896287602136502469918934011251310383508562190806027086660487358584900174200923929789193938125116798421788115209259130435572321635660895603514383883939018953166274355609970015699780289236362349895374653428746875

[toc] | [prev] | [next] | [standalone]


#30554

Fromjonas.thornvall@gmail.com
Date2016-05-26 01:47 -0700
Message-ID<f3bad0e5-56d7-43d4-bb76-5b6a56c9c033@googlegroups.com>
In reply to#30553
Den torsdag 26 maj 2016 kl. 08:24:11 UTC+2 skrev jonas.t...@gmail.com:
> Den torsdag 26 maj 2016 kl. 08:10:29 UTC+2 skrev jonas.t...@gmail.com:
> > Den torsdag 26 maj 2016 kl. 08:07:54 UTC+2 skrev jonas.t...@gmail.com:
> > > Den torsdag 26 maj 2016 kl. 07:57:04 UTC+2 skrev jonas.t...@gmail.com:
> > > > Den torsdag 26 maj 2016 kl. 02:22:46 UTC+2 skrev Michael Haufe (TNO):
> > > > > On Tuesday, May 24, 2016 at 7:38:51 AM UTC-5, jonas.t...@gmail.com wrote:
> > > > > >
> > > > > > I am not sure what all the prescriptions is all about but i sure find them annoying.
> > > > > 
> > > > > Prescription drugs? That would explain a bit...
> > > > 
> > > > The nonsense ads, i find them annoying. For some reason there usually comes a dozen or so as soon i post some code.
> > > > 
> > > > If there is no speed gain i think i keep the simpleton / naive approach. I think beginners in programming will favour understanding that code. When i look at recursive code it look so entangled. 
> > > > 
> > > > The operations seems snared into the execution part, with c=a; a=b; b=c; there is really no doubt about what is happening wheter you use a for or a while loop.
> > > > 
> > > > Regarding my code, it may not be beautiful but it certainly does what it is meant to do in a miracuous way. Finding Fib nr 100000 and printing it in 5 seconds.
> > > > 
> > > > That is a 21033 digit number... so my approach to programming may not be so bad afterall...
> > > > 
> > > > And ***I*** did calculate and wrote it out using 2k of code in javascript, a feat you and the other simpletons of this group ;) would not dream of without the help from my code.
> > > 
> > > By the way Wolfram Alpha is way off, it seem it cannot handle numbers of that size without doing some dysfunctional approximations.
> > 
> > You see my bignumber approach actually work weither it is 20000, 200 0000 or 2 million digits.
> > 
> > I'm just a tad better.
> > 
> > And it works in anybase.
> > https://www.youtube.com/watch?v=5NJZre-2QBE
> The 100 000 Fib
> 20552 characters in base 10,000000 ends with a 5
> 
> 25974069347221724166155034021275915414880485386517696584724770703952534543511273686265556772836716744754637587223074432111638399473875091309656973821883044935228763853133492135326792789567015127657827163560807350532224323311438398651613782723812477745377833729991621463450054669860398627509966393664092118901252719601721050630035058689402855810367511765825136837743868493641345733883436515877542537191241050332195991330062204363035213756525421823998690848556374080179251761629391754963458558616300762819916081109836526352995440694284206571460449380564713634633000520852277707554446794723709039790191486043284681985796115951018506082649192345873133991513391993236312301864172536477136266475081339824312317343145296418179005118795731676683497990168201184990775668645684506628739248560391404760519955006628882634587718941068037009187936500173301171002831047394745625691444932821374855573864080579813028266640270354294412104919995803131876805899186513425175959911525631553377039969410355182752749199598022575079023779813089922984996304496255814045517000250299764322193462165366210841876745428298261398234478366581588408190330738293950082132093747154851312722081730543226486694963098791471436292555425262404399961532697987687510646819068792118299167964409178271868561702918102212679267413626549978496884368097525470013145741864064482994858725517447466956518791269169932445648176733222571493149677633458466238303338223970243685947828764187578857291071013370300094229333597292779191409212804915459762627915705524815888405177941819295216769576608748815567860128818354354292373978115478570132843861272862017665395344499300198006295389369855007232866513171811358866135374726845854325489811371766051946169379168844253425947812631388952479565943807153019112539648471126389007133628569101551453423329441284357220996286746119420951661023097470996553190058158669911445442647882872642845017253320486483194578920399848938236367456182203750973485668474338872490493370316338265717607297788917989136673251962324711803728017392157239082276922807729245666275053833750069260772159361942126892030256744356537800831830637593334523502569729065152853271943677560156660399164048825639676930792905029514886934137991251748566670747175149389790386533381395346848378086126737554383821108448976538368483182588363399173104558509056638462025014631311831087429077292622159430242915947403061018398168550669502619737615857176119947587572212987205312060791864983615969233959410411863516885488391191851790615115627529361584900087215019222651178531508925102752804515123860379218469212153382928713692432152733271415747882959026015719548531644479454675285840236000238344795203451080332820138038807089807348326201227952633606773669875783326254859449602191736886778624112056210983698519729017715781120404586491539351157834995461006366357454485082418882790675313599505192062229760153765297973085881648731173082370598284894044874039320535929359764541655607954724778620299692329561389719894679422187273605123365595211331087787582288795975803204596084790245063851941743126163775104599211248687949634170686209290889306852523480569259983337751039010131661781230511457193276629167125446512151746802548190358351688971707576778656188008220346836321018130262329960275994035799977740462449521145315883703579044832931500072461734173558055678321534543411700202585608916629419863740151456957227283692196322951118776253075340259478144820465746028848556280693481139827601685558407954216205754355729151064153759293902288435612079264375560062367986544382464373946972471945996555795505838034825597839682776084731530251788951718630722761103630509367426226171736305861329154424695432904616258691774630578507674937487992329181750163484068813465534370997589353607405172909412697657593295156818624747127636468836551757018353417274662607306510451195762866349922848678780591085118985653555434958761664016447588286336297040462890976773625658430235314749461233912068632146637087844699214275415694109122465685712047172411333784898167649692498163342117685715031167104006817530319211541561195804257065869312727621371069747222602965552461105371555453249975843275200199214301915053629960070429632978051036665063878626815765877268374512897685079636637105938091122542883583919412115477375998130192165095214013330607098731373292651816922684506344395405672981203154639232498179378046910379342216949522917930299492375072993250630594281390279308413447306141164335561476409310442591848136393054236937897652052645634764831827263337151211203062923388928648794920973784786188486826804647319539284039830800880386904955741975621929392211082576639768136104449002472948340326796768837621396744757138872928630798218493143438797780887379588968409461434159271317578365114578289355818599292353438888884658745213083813777944363611976283903689459576012031650227985790154534474735270697285145459986142290273729113146378204551622544753535677362279364854503571020864454120898423503890877223039849380214734809687433336225449150117411751570704561050895274000206380497967964026178186644812485472696308234733772455433905198413087697812765659167642290229481817630757102557933650081522863836344931380899717858707086363220586901893837776606300606675773242727292924742129526500076646722730009956124191409138984675224955790729398495608750456694217771551107346630456603944136235888443676215273928597722879373559667239246138274687032178584599482575147454064364609970593161205968415604732343966524572316503177928338605938836041769142873273570398680334264670071717363573091122981306903286137122597937096605775172964528263757434075792282180744352908669606854021718597891166333863858589736209114248432178645039479195424208191626088571069110433994801473013100869848866430721216762473119618190737820766582968280796079482259549036328266578006994856825353643667482253460375134503603152154296943991866236857638062351209884448741138600171173647632126299614856192559970756682786677873237741944446227539990929104469771647615111867232723867928133367306181944849396607123345271856520253643621964198782752978813068031314181706931446822118927578497828109436775154071016350553798003842219045508482239386993296926659221112742698133062300073465628498093636693049446801628553712633412620378491919498600097200836727876650786886306933418995225768314390832484886340318941941613697984383334660867670943164365353843091215781554351285207772085809892099586449602479491970687237656871092343807195098248144731578137800863935841875665509850132188285284018498140769073850736953537771188038852893534760093338598691608289335421147722936561972762646037262723932099118782040767412272258127667294007192423793330972132364184093956102995971291799828299539147382437802779051112309545825328887211461701334403859396540478061993332245473178034073409251213217279595753863158148810392952475410943885550983826276331276067181261710220113561818007754002275167341441692164249731756213631285882819780578883245453458152243493726813343399771051253208147834567139835038332901313945986481820272322043341930929011907832896569222878337497354301561722829115627329468814853281922107523736268276431526857354932230280181014496490091552924863833888566489300225097434360120081436515362536919944670971112695196672578061891215440222487564601554632812091945824653557432047644212650790655282083379760714651275832048716527157747232588727576112835759213255393444628943325815028633583669291828566894736223508250294964065798630809614341696830467595174355313224362664207197608459024263017473392225291248366316428006552870975051997504913985946807101360233644016441791886108532307649917143720544678235972117604651532001630853363193515896458906817223728123103202718979179512727996565369403211124284659099455638021546131610626752163380566439431888126819949400553706869762185523185892110096344101293353573391845966819753983428469682288946007635203168892200202193131836975755696206111577430582630553586201563789124631220672933992617378379625150999935403648731423288739779689089083699962929953919772177965334212492919783837514600620549673416628334873410110977705358980664981360113955715843283087139405825352740560810115039079416880791972129331483030726386786314110384431282159949368243429981887197686376044963425975242568861886889789808883158650762626048564650043228968561492550639688114044004295038942458723822335431010786915173283336047792627277656860761777056168740525774374998377583014385613542727383858977413352694916548392972151955479357892386676250274537010466090938244962662693532130374453889247921616118888970207791044856319951482663080287954954645358386630734442375331971227915886177289652090149848305435983207713266534072906620167757064096901837712013068232453334779666652532549087361961483782415660712716503835822572892157820936951099589013285949072430618332575521208097175220229497428018234454137119162984499147222541965946822214682606449618392542496709031040075814888579716722463228870164384039084638567311643081695373267903311458368057521119639905615169154708510459700542098571797318015564741406172334145847111268547929892443013914682891036791792169786165824897322033591376706527676521371439853027609884780562169946596554613791749856597392273794167264953778019929835542786617912312669937473077773569324430166839333011554515542656864937492128687491217542459678311329692484924667442619993397282567487346020115044222878046612432018301618232183908654771042398228531316559685688052265714744288233175394565438819286244326625033453881995900851521138312449186180262443219554043398572284134125440941177172215686708629174212405311062052284298619927362940620883475485364512812327960909721395377536002307676569420821994303464878334854449271353945022459133437466493770165560576338469706291872574542655879414630176639760457474311081556747091652708748125267159913793240527304613693961169892589808311906322510777928562071999459487700611801002296132345882945584409524966111583428049086438608807964455776369185774375402589685592725251456340438521782589059955395462745138545445291676104296926797089358005623450191857148903041849576740081935997321871195749635709596782517109626475206889080640765144589313287076745416960710793169270428516893413311046353506242209810363216771910420786162184213763938194625697286781413636389620123976910465418956806197323148414224550716172158513213020306841760872158927020988791089380810459033972765473264169168454456276007595613671035845756490944306924525328500309106878315756151984756756919128478465469255866511155791346127242533608363513134218395177154511228464455136016013513228948543271504768393075561009878609666387061227869027483181933160670148495716300470526222823840626681844878837454813199438038761383012885988526420199228618820849958864088852135250145761539648264745102590253074317295689963649961570755185583716593536712544851508936290456773663003556245737477910098799249914696722404148160128953094401548894261378314008780431143174185807182618514951138744831358439067228949482582860216502889272283874264327861686903819605315589445945188735197246008221529343980828254126128257157209359853828007385604729194118460844852353778335033068619777245018863647034497336647310060218128792886991861824418453968994777259482169137133647474531729798092458443611296189975956962409718455642051143258959184472492094293030165148871379802123790655365251547802980594075294405131458755153779486163587991158192019808879694967187448224156836463534326162426329347616344581638901638051238941845239734218414968892623984896486420934981668149477115517709562669029850101513537599801272501241971119871526593747484778935488777815192931171431167444773882941064615028751327709474504763922874890662989841540259358340351420351361688192482389980277666691634213342431205450735938861668769118818577611813577133248396520988208598239129860638682280475436248956522921410859852037330544625953261340234864689275060526893755148403298542869912210525970056285767077256769530097897004648920009852106980295419699802138053295798159478289934443245491565327845223840551240445208226435420656313310702947223715527705426348207398445488958924886139765779145414427653584572951329719091947694411910966797474262675590953832039169673494261360032263077428684105400613510521944137781580950571452684600981035219249042795850736436961021241137739717164869525493114805040126568351268829598413983222676377804500626572417317573952197968907548251993292596498162706866565830178877405615167159731927320479376247375505855052839662945669925221736008740812121420907104193759857172143133801742514158249182471090508471597724941704932025416523932323325885158889333797136310892571531417761978326033751090262840664158013713593565292780884563059517708144399411467429185036074885236665474486992808323051681571160291183637414795849210086052898146954775081233889694315286102120273674704990393417035171342126923486700566627506229058636911882228903170510305406882969708755453293694346398129769647803182545164217834734771647158423238594581830527562139101869976043058440686657123468696794560441557421039179758348979935882751881524675930878928159243492197545387668305684668420775409821781247533545231947973989533201759886402810588255576980439712538312459428957377696001857497335249965013509368925958021863811725906506436882127156815751217129765992750370228283963962915973251173418586721023497317765969454283625519371556009143680329311962842546628403142444370648432390374906410811300792848955767243481200090398884572709077508736388732996425555047381252897596293482287891761992725138309388288292514168376227582408191893360365387528411678570372098971883298692192781662967584458017491180911966304818743415506779086394883148924150430047674527971283482211522228370628573142441078237925136450866775666228049772113971406216641163247567842166129614771090188269467737768640617672148429389497667138012278894139026553511096118347012565197540807953840609168639369066737866272094294342642604029215831734500372746258899262204987712117845563348492490326003585690993823927772974984135656148307882623633223683807098223460122742413790364734517359252157547571609342709351929017239549214264906911152715233381912404281210289373848816735895393450893069771552298919969890388588327540904430032198683400347027122002015969937169065033054757709539874858067002449104550489006172718916803139452803616563394157133463722255047754746075605502410876438212168884891694037125890194849068537972224456200948381949153272450227621858916950745794983759821660448199651936011026157694717620257170248684914616894068404140833587562118319210838005632144562018941505945780025318747471911604840677997765414830622179069338538751292989830095827755414543505876898494417913653589162009872522249055183554603706533183176716110738009786625247488691476077664470147193074476302411660335671765564874440577990531996271632972910944924921645603061882777294775764777446452586328919159107444252320082918209518210837353881330983215894686801279542247520719241346483349639150948130975414332442092999307514810779192346128122331617994299306188005334145506339321393396468616164169552202164479954172431711657444713641977332048993650747678441499295480730258564429423817876415064928783617679786771585107842357026402133880188756019892340568684232155856285864552525837710620532224244987990625263484010774322488172558622333020763999338541520153438477254429178951306370503204449177977523787195827797679968611362653229111862963116468515993466069346055754595663155830033697634000276685151293843638886908283761411577320035275651587459065670254394379311048385713132944906492658236310894953509008267315449722639664808861804157397788847289217461897418972177700098624496537590127270152276345108749694801221068495206302519011655963580552429180205586904259685261047412834518466736938580027700252965356366721619883672428226933950325930390994583168665542234654857020875504617520521853721567282679903418135520629998953664701065579532129541336924472492212436324523428951884617791223386967423398069488727058750338922839509513520912319258159006960395156367736067109050566299635718764232479207528361608055976977787564767672152122232718482148444663126148758422609260887576433173102326376886482259469121103236773755812213347055680595800831012748167396201958359802396741448986727684586981937678375716793672321308158619104599505897099106468691946344803857414382962954713137217366983618455814455748676124322451519943362182916191468026091121793001864788050061351603144350761892134416024880917410512322903571792054979279709245024799408426961588184426161637800447594782122408732041244211691998055726491182436619218357147628914258057718717436880003241130087048193739622950171430900984769272374988759386399425305953316078916188108635598244457894279934651491595288486975748802582335357167786482682805114885429732788197765736966005727700162592404301688659946862983717270595809808730901821209313430058796552694788498092548430546761134654748067296743997636125924346377199958438628123919854702024148800768808188480878923915913694632931132768493297772016466417275872591223547844808134333280500877588552646861195769621722393086937957571658218524162043419723839899327348034292623472233815510229101262949249742423271698842023297303260161790575673111235465890298298313115123607667739689981538122869996420146098525797936912460163460887623212862056342159014791886321946596374834825642916162785329482393132294402310432772887681395502133482663886874532592815878545038909915619496324788550350902893997371898800399902613201587267863787309567810962531100805448941885798356590206368069964316533912029944327726770869305240718416592070961392864019667257508701221814973313369580960036975176495135040285926249203398111149532275336218445007443315624345324842179861083462613458975912348399707518542232816771872159568272432459108290198863936978454262256691254274705697567984857136623679238784781612014779829390805131502581745237735295101652969345627861222411507835877553733483727644398380826672147400344663227769189369676128789834889420946881023084273645285450496675969731883604449670285319063739691635798928865719935397723495486787180416414152814894437850362910715178052858575839877111454742401564164771941163913549354667555935926088492005463846854030280809364172505836533680934072253108208447235702268098269514261624512040407115014487478561999228146645658939384880286438223138498523284523606670458051136796637510392481633361732745472757756368109773445392758275605974251607546868965779453052162315939865780974801515414987097778787053570580084723768924221897503127585271401731176212798987449584061998439133656802977212875193498850449971391428515803232482302134063031258607262454163776523450552251086318285359658520708173392709566445011404055165790550374177803933516583690454347721422281816832539613634982525215232257690920254216409657452618066051777901592902884240599998882753691957540116954696152270401280857579766154722192925655963991820948894642657512288766330302133746367449217449351637147257329808328127264681877593565842183835947027920136639076897417389622525757826639908097926470114075803678505993818871845600946958332707751261812820153910417739509182441375619999378192403624695582359241714787277944844310875190187414112903707060520851629757983617542510416422448675773507563380188953792631833898559559565278572279261555244947393636655339452865621546428834316228292112329045184221253288810141588406161993919504223059898349966569463580186816717074818823215848647734386789115646607551753855522244285240494680336922999893007839206912151774069642857393196910500988278523053797637940257968953295112436166778910585557213381789089945453947915927374958626823784448687203724348883461685629009785053249703693336194243980288236432355380828003875741710969289725499878566253488670330951551845212694498925159639207942145266508516052325614861938282489838000815085351564642761700832096483117944401971780149213345335903336672376719229722069970766055482452247416927774637522135201716231722137632445699154022395494158227418930589911746931773776518735850032318014432883916374243795854695691221774098948611515564046609565094538115520921863711518684562543275478705300069984231401801694211091059254935961167194576396232883127126832850176032177168042496576741869271132155732749935709942324416387089242427584476512155726763792476534180898431267694111031316595142947937767069888124964342193328740439485538222160837088907598277390184241381978110258545370885867014506235785139601099874760525354501439353062072439709976445146790993381448994644609780957731953649387349500268605645556932242296918156302939224876064708734311663842054424896287602136502469918934011251310383508562190806027086660487358584900174200923929789193938125116798421788115209259130435572321635660895603514383883939018953166274355609970015699780289236362349895374653428746875

If someon ask really nice ;), i may write code that do the calculation exceeding the +/- 9007199254740991. And then the calculation is done in no time at all truly linear.

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | comp.lang.javascript


csiph-web