question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

positive and negative numbers are sent as unsigned or signed numbers

See original GitHub issue

@grs ,

I am trying to write a receiver using AmqpNetLite. It works fine for string, bool values. However it is giving me trouble with numbers.

When I am sending positive numbers, they are marked as uint

{ test: 1}

When I am sending negative numbers, they are marked as int

{ test: -1.1 }

Special case, when I am sending 1.0, it is being converted to either uint or int depending on above cases but in either case, it is sent as 1 instead of 1.0

{ test: 1.0 }

Is this intended or is there any other generic way to send all the values as signed variables? and not convert double to int?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
grscommented, May 24, 2019

No. I would argue neither is more correct than the other. However it has to choose one and I chose to go to unit where possible by default.

0reactions
GaikwadPratikcommented, May 24, 2019

😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

2.5 Signed and Unsigned Numbers - Introduction to Digital ...
Unsigned binary numbers are, by definition, positive numbers and thus do not require an arithmetic sign. An m-bit unsigned number represents all numbers...
Read more >
Signed Binary Numbers and Two's Complement Numbers
In mathematics, positive numbers (including zero) are represented as unsigned numbers. That is we do not put the +ve sign in front of...
Read more >
Signed vs Unsigned - Scaler Topics
An unsigned number contains just zero or positive values, whereas a signed number has both positive and negative numbers along with the value ......
Read more >
Signed and Unsigned Binary Numbers in Digital Electronics
The positive numbers are represented in both ways- signed and unsigned, but the negative numbers can only be described in a signed way....
Read more >
Signed versus Unsigned Integers - Stack Overflow
Unsigned can hold a larger positive value and no negative value. · Unsigned uses the leading bit as a part of the value,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found