News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Ling Long Kai Fang Bignum to ASCII

Started by dedndave, June 06, 2012, 03:43:10 AM

Previous topic - Next topic

dedndave

these are my Ling Long Kai Fang routines from the old forum

LLKF9_1a:
3 routines for converting arbitrary integers to ASCII decimal strings
1) unsigned
2) signed
3) unsigned/signed mode-selectable

IntExp_1:
arbitrary integer exponential routine demo

EDIT: May 2, 2013
added Evr1 - real number evaluation utility

jj2007

Dave,
My math is not advanced enough for such stuff, but if you decide to open a startup together with Rui (Calcula), Ray (FpuLib) and qWord (SimpleMath), then I volunteer for the publicity part :biggrin:

dedndave

#2
those guys are whizzes - lol
i got these done by brute force effort and a bunch of time   :P

RuiLoureiro

Dave,
I like "Ling Long Kai Fang" !
Where did you see those names ?
Are you taking too much beers, Dave? :badgrin:

hutch--

Rui, I think it has some to do with the guys who designed the algo.

dedndave

 :biggrin:

i couldn't wait for someone to ask that question - lol

it's mentioned here
http://en.wikipedia.org/wiki/Zhu_Shijie

this is the guy that named it
http://en.wikipedia.org/wiki/Qin_Jiushao

it means something like "polynomial ladder solution"

it is an earlier name for Horner's Rule
http://en.wikipedia.org/wiki/Horner%27s_method

and - yes - too many beers   :badgrin:

RuiLoureiro

Hi Hutch,  :t
         
Dave,
       i was only kidding.
       In any way, now i know what it mean.
       yes, i need some beers too !  :badgrin:

dedndave

time to open another ling long beer, eh   :t

i have learned some things since i wrote those routines
i may take  look at them to see if they could be improved upon

i might mention - they use no FPU/MMX or SSE registers
i know they could be faster if those instruction sets were used

hutch--

haha, pisspots. REAL asm prgrammers drink Pure Malt[tm].  :P

dedndave

Pure ????
that would probably taste like caca - lol

hutch--

I guess that is what you would expect from a beer drinker  :P.  Pure Malt[tm] is what you get when you distill malted barley rather than brew it. I would not wash my socks in most beers, full of chemicals and other crap, at least Pure malt distilled in Scotland is free of the crap in beer.

I have a number of Malts that are 100 proof (50% alcohol by volume) which should never be drunk in volume unless you intend to end up in the horizontal position (floorboarded).  :biggrin:

dedndave

back in the day, we could get Foster's here that was just as it was sold in Australia
now days, you can only get the import variety which is 6% or something   :(

dedndave

i have added a new attachment to the first post of the thread
happy ling long kai fang !   :biggrin:

C:\ > Evr
Evr: Ling Long Kai Fang Real Number Evaluation Utility
DednDave  5-2013  Ver 1.0

  This program evaluates hexadecimal Intel real numbers from the command line.
     The characters 0-9, A-F, P, X, and S are read, all others are ignored.
  This allows the use of spaces, underscores, etc, to separate the hex digits.
If the number of hex digits doesn't total 8, 16, or 20, this message is shown.
           The P switch may be used to show values at full Precision.
   The X switch may be used to show values with 3 eXtra digits of precision.
                      The X switch overrides the P switch.
      The S switch may be used to Step the LSB, showing 3 adjacent values.
               (d) = Denormal               (p) = Pseudo-Denormal

                    Example: Evr 4000 C90F DAA2 2168 C235 xs

                         Press any key to continue ...

C:\ > Evr 4000 C90F DAA2 2168 C235 xs

4000_C90FDAA2_2168C234: +3.14159265358979323829597

4000_C90FDAA2_2168C235: +3.14159265358979323851281

4000_C90FDAA2_2168C236: +3.14159265358979323872965

C:\ > Evr 4000C90FDAA22168C235p

4000_C90FDAA2_2168C235: +3.14159265358979323851280895940618620443274267017841339111328125

C:\ > Evr 0000_80000000:00000000 s

0000_7FFFFFFF_FFFFFFFF: +3.3621031431120935059e-4932 (d)

0000_80000000_00000000: +3.36210314311209350626e-4932 (p)

0000_80000000_00000001: +3.36210314311209350663e-4932 (p)

C:\ > Evr 00000000 00000000 s

80000000_00000001: -4.9406564584124654e-324 (d)

00000000_00000000: +0

00000000_00000001: +4.9406564584124654e-324 (d)

C:\ > Evr FF800000 s

FF7FFFFE: -3.40282326e+38

FF7FFFFF: -3.40282347e+38

FF800000: -∞

anunitu

yeh Hutch real malts are the sipping kind not the shoot it down kind. In tiny little glasses to boot. and of course with your pinkie turned up like a real gent.... :t

Magnum

Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org