-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
26 lines (19 loc) · 6.66 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<script src="index_files/js/numbers_to_words.js">/*include this*/</script>
<script>document.write('<br><br><h1><b>Test with random numbers: </b></h1><br>');
test(); /*test included script with random numbers*/</script>
<script>
//custom usage:
var static_whole_integer = '8619845578269313465329327426569179091929452994292565592722089791257204023385623489523491501715116931980733163392737242661927387068243123862318748152240527307085892469555472603299456407430690774633253907236952378454138519786214403423735481634182242119822819922207698895230875316598738768154715215281267298204262317604032064322680896249275927586678653196209445356677296402087684454377215969171262887538621217947823844708648847806486214865520088111281588565813785276439822352360678387621942071007694238194739037513650243499914747198502569461730934263401884735848848109671950874835182255710492554919275468196516029361083506647025850065347920618397343933347299048302135711197017178756698408464151457529389487316083947476624608900464116298965907853952278607767287432652343845105481731188278895038670437579481930181198199563964598511685843301230343982936001309168874129372128209737459284008541201974626006311020020389404717944653631014174261627166953847333108693654654550008404519926041378862370476856002847487049752429813524903154181863011363814491720330087424826137070037212032058421698218508012943972358515979882660401850850510115991358849723884841870017737314425470102343821903525378989537021469165914060304809680772801979757388381357388622489700201232087252529353968133845639093877398353560612325114536332796075847882312720906111437538568361364805553390355030812601210800758905658598789116406327315667611246971632359834577629953886208844251364970066485370798463116579740072957414515939427805047065186969740324434845414978059567697033334101295663524632737036435651397597870340664919713111816807605094830424630041305429686163645328554291832362116030641080880304173586095089731151248536062697183249195190324175374031388702920251352119856883977071987216462737642350978696285591065628048065694555626200491758311141429010781025027262552484803302350463684764883778928519439712946974317957875069569367723814785513714017221474919489396486742981210851665573625013198214314438697889877115009245752862568198763530617511276959174597029930430160659370148453093173869143884391864160995626796349974943419689591468089471490434637741308163044080091952528943828961750517454218777594288478198220455483780356943553499712609874477532711884264926692090501262927058657445828521080632958495173510023965919709518262234237577376721032480217275615495911541697085622322340892357575715446819234026038207816488418050888089500930734601446800908849165338354519685202873722969089658048460997097975022390636075038678999575795746245110049355955267814688426362722207645934025739699652612732014937684697061814385749732889378037277920956349420023299924904751708781088124584709280843856356450506124096573074896097608880310227193737814058347231795880435183055543076984916734836309848515494138759573001900438594567790087110348998294151568859545498478416306640611089830706858747189466446250233991871675148500201273840226295382288131503809853825972807859999692640633390967370268880090917872830198132049857890554551257517962639031881558049936790149349';
//3003 digits
document.write(
'<br><br><h1><b>static whole integer 3003 digits:</b></h1> <br>', static_whole_integer,
'<br>', float_to_words(static_whole_integer, '.')
); //display static whole integer and words.
var static_float_integer = '-655638988617651489980962540626599404647376732230337538052892828741171060625576633139683196369293517227203368964432536292343869862243155528713821497911138703485836759294311866764613601471817961679481997904021853229155357967977868736475808790204407095704643827818855198651271050138668307737674148005159934874898086783687823891780002655165533760780792346311770290048913667512754661180863289018329849529833879903219546554257229533798838494049523751049470446479750062720577780481470780295528041099838736058768459428907844419842948860925478610452528849053689328727201520138678201476400178142588595296114854641868745340626304578779771975045706237301422519565984689403118985733277270856252783668951500743300738204940842826882162052645207344173298778035762722675928092637241291697350704472090276961737066109926696367774558404474477738104277769368737906513153574481900788980355738238458761183608782838296563917933749071941087654106948778460840800888432790397375634803287004024490304791830287634270441661000419659846371795159641887819165224342127185053476028823044892729690958069818738179197069026107683181114963936150804960482808599525751205684648286521053538351837232650815059784184780421885267572598180212704656264882065686654755531345281192654208873481377523237218770449900203727632703538232170549239329911934445892685353820550094905735608211358484957213188805623331656874684049570218350021996194969831712301167206416032268796655471300664254986202445941741781550305893355101939330216494883904365756878721850958881169196762118472326089312673175971460842972508742612699733397565340343869659900680012771727144269526157186528763644464949908262342961684961675740886736590224372082754138884970416250047715605866399188071279047836642013221017909952292158801373616168774008610379354966398248882513170220545864169720379846325073059209819907864934964553940769641170493340799435540705135425337039777882045905396293979553208440383564416082357677904391562585232419997514210307581973443268467230640496525817898804606557883535224512966653056367238813495484379835570474920368635983061356018752853797310023556289807321063577437369526653479253680989784361804511975687125790105576367339809381708018163573312725920198463686662456870074727204911163415285066140371928731775308466415022278558676083390289901714395057106443240105603947323776124223077294495324688412716217537805098612451729940381479418503755394731156719346363866198783312981840165838544016862217593846578615242720244456839741268772997738027512322598409575070748919465569813061171440988753934208753410979302.979580875565703998358203265447806557577521752217632734298760457431048767038878975474301632766637620790078742645459135280723678321231382329650777368134686479576828327066448334602269423907453050667462180213921031582890667930298979187803670136478400746245378128442555782461635494385748087496129252126139498043129640934426532027039833497415932855406598398874617043479258671947711683028606892334072078834432297162566880405900148939192017445146238462758976326197360968';
//3003 digits
document.write(
'<br><br><h1><b>static float integer 3003 digits: </b></h1><br>', static_float_integer,
'<br>', float_to_words(static_float_integer, '.')
); //display static whole integer and words.
alert('153.68413 = '+float_to_words('153.68413', '.'))
</script>