Questions tagged as 'coma-flotante'

1
answer

Can you operate with decimals in Bash?

Is there any way to work with decimals in Bash? Do operations, obviously. I've tried with let , but it always throws me an error with the decimal part. Thank you very much.     
asked by 05.09.2018 / 08:50
0
answers

Print a floating point in an assembler NASM

I'm doing a small program for a University course, they asked us to calculate the Golden number and then print it on the screen, we already have the calculation, now the drawback is that we do not know how to get that number from the FPU...
asked by 13.04.2017 / 18:30
1
answer

Why do you round my decimals? Problem with two-dimensional arrangement C

I am starting in the art of programming, and I am working on an exercise to show the inverse of a matrix. The inverse matrix is defined as a double array, and I am using the algorithm for cofactors. The problem is when I show the matrix on the...
asked by 30.07.2018 / 00:24
12
answers

Why can not my programs do arithmetic calculations correctly?

Sometimes the calculations work correctly, but sometimes not: > 0.1 + 0.1 0.2 // correcto > 0.1 + 0.2 0.30000000000000004 // ¿qué? > 10 * 0.67 6.7 // correcto > 10 * 0.68 6.800000000000001 // demasiado grande > 10 * 0.69 6.89999...
asked by 02.12.2015 / 07:15
1
answer

0,1 + 0,2 === 0,3 - FALSE [duplicated]

0.1 + 0.2 == 0.3 -> false 0.1 + 0.2 -> 0.30000000000000004 How can it be resolved so that 0.1 + 0.2 results in 0.3?     
asked by 30.08.2017 / 11:17
12
answers

Why can not my programs do arithmetic calculations correctly?

Sometimes the calculations work correctly, but sometimes not: > 0.1 + 0.1 0.2 // correcto > 0.1 + 0.2 0.30000000000000004 // ¿qué? > 10 * 0.67 6.7 // correcto > 10 * 0.68 6.800000000000001 // demasiado grande > 10 * 0.69 6.89999...
asked by 02.12.2015 / 07:15
1
answer

How to convert a String type to Float or Int?

In Python, how can I convert a string "123.456" to a decimal number 123.456 ? And how a chain "32" to an integer 32 ?     
asked by 13.02.2017 / 14:40
12
answers

Why can not my programs do arithmetic calculations correctly?

Sometimes the calculations work correctly, but sometimes not: > 0.1 + 0.1 0.2 // correcto > 0.1 + 0.2 0.30000000000000004 // ¿qué? > 10 * 0.67 6.7 // correcto > 10 * 0.68 6.800000000000001 // demasiado grande > 10 * 0.69 6.89999...
asked by 02.12.2015 / 07:15
12
answers

Why can not my programs do arithmetic calculations correctly?

Sometimes the calculations work correctly, but sometimes not: > 0.1 + 0.1 0.2 // correcto > 0.1 + 0.2 0.30000000000000004 // ¿qué? > 10 * 0.67 6.7 // correcto > 10 * 0.68 6.800000000000001 // demasiado grande > 10 * 0.69 6.89999...
asked by 02.12.2015 / 07:15