QB64 Phoenix Edition
How to display a float number in scientific? - Printable Version

+- QB64 Phoenix Edition (https://qb64phoenix.com/forum)
+-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1)
+--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3)
+---- Forum: Help Me! (https://qb64phoenix.com/forum/forumdisplay.php?fid=10)
+---- Thread: How to display a float number in scientific? (/showthread.php?tid=2903)

Pages: 1 2


RE: How to display a float number in scientific? - Kernelpanic - 08-04-2024

Absolutely right, Pete! But in the end, all that matters is the result . . . and the price one had to pay for it.


RE: How to display a float number in scientific? - Pete - 08-04-2024

Ah, but there is more than one result. There's the program, and then there's the programmer. One can find his socks, but the other can knit them. I'm really pissed now. Not at you, at that being the first analogy that popped into my head. Maybe you're right, next time ask ChatGBT to make all my analogies, so I don't need to make my apologies.

Pete


RE: How to display a float number in scientific? - desA - 08-05-2024

(08-04-2024, 02:25 PM)Kernelpanic Wrote: For example:
Code: (Select All)

Print Using "##.##^^^^"; 12345.6

Print Using
Perfect. Thanks very much.   Smile

It completely slipped my mind to adjust at Print Using level, even though I have formatting statements everywhere in the code.


RE: How to display a float number in scientific? - Pete - 08-05-2024

+1 to the Kernel for PRINT USING example.

+1 to Jack for alternative c lib example. (That one was new to me!)

Pete


RE: How to display a float number in scientific? - bplus - 08-05-2024

yes +1 to KP for QUICK simple solution, I learned sometyhing too, start wearing tin foil hat.

ehhh I think jack cheated resorting to outside QB64 Smile


RE: How to display a float number in scientific? - Pete - 08-05-2024

Jack can do whatever he wants. He honestly blew me away with his decfloat routine, and QB64 translates to C, anyway. Oh the irony!

Pete Smile


RE: How to display a float number in scientific? - bplus - 08-05-2024

(08-05-2024, 04:25 PM)Pete Wrote: Jack can do whatever he wants. He honestly blew me away with his decfloat routine, and QB64 translates to C, anyway. Oh the irony!

Pete Smile

OK then Jack can give himself a point, I would like to C that!


RE: How to display a float number in scientific? - Pete - 08-05-2024

Easy. Jack would just have to register with some BS alias like norbybot. Dodgy 

Pete


RE: How to display a float number in scientific? - bplus - 08-05-2024

Angry

who was that masked alien?


RE: How to display a float number in scientific? - Jack - 08-05-2024

the deleted post was an emoji that you get by pressing the Windows key and the . key, it doesn't work on this forum