Just starting to do floating point stuff. Where do I find printf stuff for that?
What's the difference between "printf" and "crt_printf"?
Quote from: deeR44 on April 28, 2022, 04:36:00 PM
Just starting to do floating point stuff. Where do I find printf stuff for that?
On the web, all over the place
QuoteWhat's the difference between "printf" and "crt_printf"?
printf(...) is a macro
invoke crt_printf, ... behaves identically
QuoteOn the web, all over the place
Well then, I'll keep looking.
The C function "printf" is part of the C runtime library and as such, the reference you are looking for is with C documentation from a variety of sources, Microsoft, universities and online publications etc ....
It is by no means the only choice for displaying floating point to a console but as you have made that choice to use "printf", its C documentation you are looking for.
Quoteyou have made that choice to use "printf", its C documentation you are looking for.
Thank you, Hutch.
Writing a float number without using external libs, masm, fasm and nasm version
http://abreojosensamblador.epizy.com/?Tarea=1&SubTarea=20&Lang=1#EscribeFloat
Quote from: caballero on April 29, 2022, 05:35:54 PM
Writing a float number without using external libs, masm, fasm and nasm version
http://abreojosensamblador.epizy.com/?Tarea=1&SubTarea=20&Lang=1#EscribeFloat
Looks good but is a bit difficult to find, therefore I attach your source :thumbsup:
is that your site caballero?
I attempted to write my own multi-precision floating-point math routines in FreeBasic and some of the more painfully difficult routines to implement were the conversion functions
it's easy if the number base is a power of 10 but it's a different story if the number base is a power of 2
what I wound up doing is to multiply or divide the mp-float by powers of 10 until you can start extracting decimal digits, it's rather slow but I am not motivated to pursue this any further
> is that your site caballero?
Yes, it is. I made it on my own with php, including the forum, an example of using linked lists.
I like your site, I think it's well done :smiley:
:thumbsup: Thank you. Just to learn Php a bit
Caballero,
your site is well done and the content is also good.
:thumbsup:
Is there a Win32 function that'll format floating-point values? I use wsprintf() all the time*, but it only handles integer values.
When I need printable representations of FP values, I use Raymond's library (specifically, FpFLtoA() ).
* I probably shouldn't be using this function, as it's not "safe" (can be used to hack code via buffer overruns), but since I'm not creating "production" code that anyone else is gonna use, it's not much of a problem ...
You may have a look at StringCchPrintf (https://docs.microsoft.com/en-us/windows/win32/api/strsafe/nf-strsafe-stringcchprintfw) or one of the function that it replaces.