14 questions
From Python30.33333 to float 30.333330 like int 30What should I do to change my brother?
If you use isdigit(), only the integer is true, and the real type shows FalseI don't think there's anything like isfloat() what should I do?
When I ran it on Visual Studio 2010 SP1,Source Code 1 operates about 10 times faster than Source Code 2.There are only two lines that change. I don't think there's much differenceWhy is the performanc...
I thought 0.5 would come out if I said 1/2, but 0 came outIf you divide two integers, you just cut off the decimal pointWhen a and b are int c = a/bHow do we get c to float as a result?a = 1b = 2print...
On 64-bit operating systems, double represents up to +-253. Until 53I'm using double because I think the size of the number I'm expressing is about unsigned 32-bit Integer. The problem is that even if...
Can I increase from 0 to 1 by 0.1 by using range()?Since you write range(0,1,0.1), the step can only receive an integer.for i in range(0, 1, 0.1): print ifor i in range(0,1,0.1):TypeError: range() int...
As far as I know, the compiler optimizes power(a,2) to a*apow(a,6) does not optimize, but calls the library function pow().The C++ Intel Compiler optimizes you to 6Why does the GCC C compiler optimize...
float a=8.61f; int b; b=(int)a;This is how you change float to int. It's not accurate. The value of b is 8, but it's supposed to be 9.And when the value of a is -7.65f, the result is -7, not -8 What s...
In C language, float type such as 37.7777779 37.777779 -> How do I round to the second decimal place, such as 37.78?
I was told not to use double or float when marking money. Why is that?I think there must be a good reason, but I don't know why.
- 1 - | » |
© 2024 OneMinuteCode. All rights reserved.