E
E
Evgeny Zubkov2018-12-09 14:52:25
Mathematics
Evgeny Zubkov, 2018-12-09 14:52:25

How to convert a real number to a format with a fixed number of digits?

Good day. You need to convert a real number to fixed-width binary. It seems to need to be divided by 2^B, but I'm not entirely sure. Thanks in advance for advice and replies.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Skusnov, 2018-12-09
@AlexSku

What exactly do you need to get? Can you give an example? What does the binary form have to do with it, if inside the computer the numbers are always in this form?
If you mean a fractional number with a fixed point (point), then multiply by 10 to the power of N (eg 2) and convert to an integer type.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question