1. Help!!!!!
- Posted by CAMPOS ARRIBAS- LUIS RAUL <95203695 at XAEE.UB.ES> Apr 17, 1998
- 636 views
Hi guys!!! Can someone tell me what the hell i have to do to transform a large number ( 2000000000000 ) in to a string?I use the sprintf() function but the string it returns is in the 'e' format! ( something like "2.0e7" ) thanks. ( is the 1st time that i participate in the mailing list and i hope that there'll be fun ;) Hi Daniel Bernstein!!! I'm using your Menu_eng.e and it's great! no mouse support yet? ( caramba con el Marcelo Rios!!! es una fiera! ) Regards, Ra=FAl Campos.
2. Re: Help!!!!!
- Posted by Daniel Berstein <daber at PAIR.COM> Apr 18, 1998
- 620 views
- Last edited Apr 19, 1998
Hi Raul, I just tried with puts(1,sprintf("%d",2000000000000)) and got the right output. Read the manual to understand what the diferent %x do. Tell me if you need help. > Can someone tell me what the hell i have to do to transform > a large number ( 2000000000000 ) in to a string?I use the > sprintf() function but the string it returns is in the 'e' > format! ( something like "2.0e7" ) >Hi Daniel Bernstein!!! I'm using your Menu_eng.e and it's great! >no mouse support yet? My lastname is Berstein (without the N) actually... I'm glad you like (and use) menu_eng. It was my first contribution (1 years ago? maybe more= ). I don't plan to enhance it, mainly because David has provided us with he's excelent text GUI. If you (or anyone else) need help you can contact me at danielberstein at usa.net or daber at pair.com. [SPANISH START] >( caramba con el Marcelo Rios!!! es una fiera! ) Grande el Chino! Lastima que este lesionado y no pueda ir a defender el titulo en Montecarlo, y de paso perder el N=BA1 :( ... por el momento. Disculpa que te haya contestado en ingles, pero como no se tu email tuve que contestar en el listserver... y aqui no es "elegante" escribir en idiomas que solo unos pocos (de los participantes) pueden enteder. Mexicano no? Si ese es el caso, lastima por el rendimiento de la seleccion (Catolica les dio 5-1! y otros tantos de Boca), ojala mejore an= tes del mundial. [SPANISH END] Regards, Daniel Berstein.
3. Re: Help!!!!!
- Posted by "Carl R. White" <C.R.White at SCM.BRAD.AC.UK> Apr 20, 1998
- 625 views
On Fri, 17 Apr 1998, CAMPOS ARRIBAS- LUIS RAUL wrote: > Hi guys!!! > > Can someone tell me what the hell i have to do to transform > a large number ( 2000000000000 ) in to a string?I use the > sprintf() function but the string it returns is in the 'e' > format! ( something like "2.0e7" ) Provided sprintf(" -- Carl R White - "FBIbait: The President will be castrated in his sleep." E-mail...: cyrek- at -bigfoot.com / Remove the hyphens before Finger...: crwhite- at -dcsun1.comp.brad.ac.uk \ mailing or fingering... Url......: http://www.bigfoot.com/~cyrek/
4. Re: Help!!!!!
- Posted by "Carl R. White" <C.R.White at SCM.BRAD.AC.UK> Apr 20, 1998
- 701 views
Oops! I accidentally posted a mid-edited message. Sorry folks. I'll try again. < On Fri, 17 Apr 1998, CAMPOS ARRIBAS- LUIS RAUL wrote: > Hi guys!!! > > Can someone tell me what the hell i have to do to transform > a large number ( 2000000000000 ) in to a string?I use the > sprintf() function but the string it returns is in the 'e' > format! ( something like "2.0e7" ) Provided sprintf("%f", 2000000000000) doesn't work either, you'll have to code a solution. I have a whole set of routines that do things like this, called basebag.e, but I haven't got them on this server yet (aargh!). They're of the form (off the top of my head): function seq2atom(sequence seq, numbase base) -- convert the "seq" string of a number in base "base", into a real -- floating point atom. end function function atom2seq(atom number, numbase base) -- convert "number" into a string representation of itself in base -- "base" with floating point handling. end function function baseconv(sequence seq, numbase from, numbase to_) return atom2seq(seq2atom(seq, from), to_) end function So, baseconv("3.14159265359", 10, 16) returns something like "3.243F6A88" and baseconv("3.14159265359", 10, 2) returns: "11.00100100001111110110101010001000001" (!!!) I'll put basebag.e on my site sometime around the end of this week... -- Carl R White - "FBIbait: The President will be castrated in his sleep." E-mail...: cyrek- at -bigfoot.com / Remove the hyphens before Finger...: crwhite- at -dcsun1.comp.brad.ac.uk \ mailing or fingering... Url......: http://www.bigfoot.com/~cyrek/
5. Re: Help!!!!!
- Posted by Irv Mullins <irv at ELLIJAY.COM> Apr 20, 1998
- 628 views
At 03:43 PM 4/20/98 +0100, you wrote: >> >> Can someone tell me what the hell i have to do to transform >> a large number ( 2000000000000 ) in to a string?I use the >> sprintf() function but the string it returns is in the 'e' >> format! ( something like "2.0e7" ) > >Provided sprintf("%f", 2000000000000) doesn't work either, you'll have to >code a solution. > Of course, %f will give results in scientific notation. Why not just use %d ? Yes, I tried it, it works. Irv ---------------------------------------------------------- --Visit my Euphoria programming web site:-- --http://www.mindspring.com/~mountains -- ----------------------------------------------------------
6. Re: Help!!!!!
- Posted by "Carl R. White" <C.R.White at SCM.BRAD.AC.UK> Apr 22, 1998
- 635 views
On Mon, 20 Apr 1998, Irv Mullins wrote: > At 03:43 PM 4/20/98 +0100, you wrote: > >> > >> Can someone tell me what the hell i have to do to transform > >> a large number ( 2000000000000 ) in to a string?I use the > >> sprintf() function but the string it returns is in the 'e' > >> format! ( something like "2.0e7" ) > > > >Provided sprintf("%f", 2000000000000) doesn't work either, you'll have t= o > >code a solution. > > > Of course, %f will give results in scientific notation. > Why not just use %d ? > Yes, I tried it, it works. Yeah, I know, sorry. I guess I just assumed that Ra=FAl had already tried %d. :( Anyways, basebag should be on my site Friday. I'll post to the mailing list again if it is. I wouldn't want anybody looking for something that isn't on my site. Basebag goes one better than sprintf, by being able to cope with any base you throw at it [2 <=3D base <=3D 36 that is :) ] IIRC, sprintf can only do decimal and "hex" [or can it do octal too?=20 No docs where I am :( ] Carl PS For those who can't read iso8859-1, the =FA character is a "u'" combination i.e. an accented "u". --=20 Carl R White - "FBIbait: The President will be castrated in his sleep." E-mail...: cyrek- at -bigfoot.com / Remove the hyphens before Finger...: crwhite- at -dcsun1.comp.brad.ac.uk \ mailing or fingering... Url......: http://www.bigfoot.com/~cyrek/