Thread (10 messages) 10 messages, 3 authors, 2016-11-23

IEEE-754 Float to int

From: Anupam Kapoor <hidden>
Date: 2016-11-22 16:19:22

On Tue, Nov 22, 2016 at 9:35 PM, Lucas Tanure [off-list ref] wrote:
So, value has a 32bit float now, and I would like to print just the
integer part, like :
Read 26.92387 --> Print 26.
?how about just typecasting to int ? so :

    int x = (int)(some-float-value)

that should be it right ??


?--
kind regards
anupam?


In the beginning was the lambda, and the lambda was with Emacs, and Emacs
was the lambda.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20161122/9d72dfc7/attachment.html 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help