Questions tagged as 'redondeo'

2
answers

I would like to see a value of a decimal without C ++ being rounded

I need help with a code in C ++, the exercise asks me to do a calculation, if the result is, for example 1.57, in the output it should show 1.5, (the variable can be float or double) without making the rounding. #include <iostream> #incl...
asked by 07.08.2017 / 19:31
2
answers

AmCharts - Decimal Rounding of the Mean

I am working with AmCharts. My chart is fully functional, and I want the median value to show. Here I put my code: "graphs": [ { "title": "Total Open Ratio %", "valueField": "def", "type": "line", "fillAlphas": 0.2,...
asked by 25.01.2016 / 13:08
3
answers

Even using BigDecimal I have problems with rounding

Why should I use BigDecimal in this case, I do not get the expected result? double value1 = 5.68; double value2 = 2.45; System.out.println(BigDecimal.valueOf(value1 + value2)); DEPARTURE: 8.129999999999999 EXPECTED: 8.13     
asked by 16.12.2015 / 16:20
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
1
answer

Java - Round a float and place it in a jTextField

I have a project in Netbeans based on MVC. In the part of the "ABMProduct" view, I have the following code: private void txtGananciaActionPerformed(java.awt.event.ActionEvent evt) { float pv = 0,...
asked by 16.03.2017 / 15:13
2
answers

Rounding Decimals PHP

Greetings to the entire stack overflow community, could you help me with decimals rounding in PHP? <?php $bs = 10215251; $formatbs = number_format($bs, 2, ',', '.'); $reconver = $bs / 1000; $redondeo = round($reconver, 3,...
asked by 21.05.2018 / 21:49