Top "Numeric-conversion" questions

SQL Server CONVERT(NUMERIC(18,0), '') fails but CONVERT(INT, '') succeeds?

PRINT CONVERT(NUMERIC(18,0), '') produces Error converting data type varchar to numeric. However, PRINT CONVERT(INT, '') produces 0 without error... …

sql sql-server numeric-conversion
How does testing if a string is 'greater' than another work in Bash?

In Bash I can write the following test [[ "f" > "a" ]] which results in returning 0, i.e. true. How does …

bash numeric-conversion
Why is 0 < -0x80000000?

I have below a simple program: #include <stdio.h> #define INT32_MIN (-0x80000000) int main(void) { long …

c signed numeric-limits numeric-conversion
Best practice in C++ for casting between number types

What is the best practice for casting between the different number types? Types float, double, int are the ones I …

c++ casting numeric-conversion
XSLT Compare Numbers as Strings

Background I was recently surprised to notice that XSL was able to intelligently handle numbers; i.e. knowing to treat …

xslt comparison string-comparison numeric-conversion