Questions tagged as 'double'

1
answer

Error adding the array with double data

The code below works as it should, in case anyone wants to use it, I thank all those who commented Giving linear algebra are teaching me operations with vectors and to simplify my life I wanted to make a code for this, I am not very profi...
asked by 31.05.2018 / 11:03
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

help shared preferences

I want to save a location with shared preferences as I can not save objects I only save the latitude and longitude, I transform it into string I save them and then I take them out and transform them into double back to load them to th...
asked by 04.07.2018 / 00:57
1
answer

Enter fractions textbox C #

I have to make a program that solves the determinant of a matrix, n11 = double.Parse(b11.Text); and works well with integers. But I also want it to work if I enter numbers like 1/4, 3/16 and so on. How can I have him read the fraction to...
asked by 16.03.2018 / 05:25
1
answer

C ++ error: can not convert '' :: Vectordouble 'to' double 'in assignment sum_aux = A [f] [j] * xk [j];

Good! I am having problems with the exposed error when I try to multiply the matrix A with the vector xk. The matrix A lame from an external input file. Would anyone know how to fix it ?. Thank you very much in advance! I attach the interesting...
asked by 23.01.2017 / 20:20
2
answers

how do I set the number of decimals I want to show from a double in c #

My problem is that I am using Math.Round and it is rounding, what I need is that it only shows me a single decimal without being rounded This is my normal result double rap = 0; rap = (11300 - 8508.54)* 0.015); That this gives me...
asked by 12.11.2018 / 21:45
1
answer

Convert a string to a signed number

I need to convert a string with the following format -0.0092 to a number type with which I can operate later, I have tried with Val, or CdBl and both lose the sign or truncate the final result ...     
asked by 04.10.2018 / 11:16
1
answer

NumberFormatException String to Double to String

I have a question related to the JVM of java. We have a double in the form of String and we want to parse it to double , so we wanted to check if the ',' parsea to '.' correctly. If you execute this piece of code:...
asked by 24.08.2018 / 10:38
4
answers

Checking a float through a String

I'm trying, without using try-catch (I'm not allowed in this case), to know if a String is susceptible to being parsed to double, but it does not accept values, such as 1.80. This is the method: private boolean alturaCorrecta() { boolean c...
asked by 28.11.2016 / 12:56