Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Crazy way of getting a float's sign
SiPlus
Jan 13th, 2014
102
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
C
0.16 KB
| None
|
0
0
raw
download
clone
embed
print
report
float
f
=
-
0.0f
;
unsigned
int
b
=
*
(
(
unsigned
int
*
)
(
&
f
)
)
;
int
em
=
b
&
0x7fffffff
;
int
sign
=
(
(
(
(
b
>>
31
)
^
1
)
<<
1
)
-
1
)
*
(
(
unsigned
int
)
(
em
^
-
em
)
>>
31
)
;
Advertisement
Add Comment
Please,
Sign In
to add comment
Public Pastes
Crypto Exchange Profits
8 min ago | 0.20 KB
Free money using older build [1.3]
21 min ago | 0.20 KB
✅ This month smells like money
CSS | 34 min ago | 0.20 KB
I earned $9,000 with this method
48 min ago | 0.20 KB
biplas v37 - fixes
10 hours ago | 4.14 KB
Black Friday aanbiedingen bij Ai Linkbuilders
10 hours ago | 1.93 KB
Black Friday aanbod voor linkbuilding en SEO
11 hours ago | 1.92 KB
platynator settings
15 hours ago | 2.13 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!