Author Topic: Skinning Cats . . .  (Read 1949 times)

0 Members and 1 Guest are viewing this topic.

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2121
  • class keyThumper<T>:ILazy<T>
Skinning Cats . . .
« on: April 17, 2023, 04:41:53 AM »
Some options :
Code - C#: [Select]
  1.  
  2.          Console.WriteLine(long.MaxValue.ToString("0,0.0", CultureInfo.InvariantCulture));
  3.          Console.WriteLine(String.Format(CultureInfo.InvariantCulture,"{0:#,0}", ulong.MaxValue));
  4.  
  5.          Console.WriteLine($":#,0 : {int.MaxValue :#,0}");
  6.          Console.WriteLine($":n4  : {int.MaxValue :n4}");
  7.          Console.WriteLine($":n   : {int.MaxValue :n}");
  8.          Console.WriteLine($":n0  : {int.MaxValue :n0}");
  9.  

Results

9,223,372,036,854,775,807.0
18,446,744,073,709,551,615
:#,0 : 2,147,483,647
:n4  : 2,147,483,647.0000
:n   : 2,147,483,647.00
:n0  : 2,147,483,647


a bit of a rabbit hole.
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2121
  • class keyThumper<T>:ILazy<T>
Re: Skinning Cats . . .
« Reply #1 on: April 17, 2023, 04:48:12 AM »

for giggles :
Quote
18446744073709551615 can be written as
Eighteen quintillion,
four hundred forty-six quadrillion,
seven hundred forty-four trillion,
seventy-three billion,
seven hundred nine million,
five hundred fifty-one thousand,
six hundred fifteen.

or as
Quote

2^64 - 1

Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.