double

Converting a double from one number system to another

I wrote this code: import java.util.Scanner; public class Main { public static void main(String[] args) { Scann ... Double.toString and parseDouble only work with one parameter and do not allow you to convert numbers to other number systems)

How to convert centimeters to meters in SWIFT

I ran into a problem with SWIFT. You need to create variables with certain types of data and take the values in the variables ... to enter the height in meters, and this will be 1.76, but the type I have is Int. Help me figure it out. I'm terribly stupid.

Double output in java

I have: double s1 = 2.0; double s2 = 2.3; double s3 = 2.33, double s4 = 2.333; It is required that when displaying the resu ... ts on the screen: s1 = 2 s2 = 2.3 s3 = 2.33 s4 = 2.333 The problem is that you need to use one function to all the numbers.

Java. How are the ranges of values calculated for the float and double fractional types?

It is known that the float and double data types occupy 4 and 8 bytes in memory, respectively. The value range for the float ... range of values for the double type: 1.7 e-308 - 1.7 e+308. It remains a mystery to me how these thresholds are calculated.

Explain how the decimal(n,n2) data type works)

What do the parameters n and n2 mean ? I need to store the cash balance in the db

XOR double encryption

Hello, there is a task using xor to encrypt and decrypt an array of double with a single-byte key. The difficulty arose in how to correctly apply bitwise xor for the double type ? I will be very grateful for your help)

The range of the double and float values in Java

In the table of variable ranges (Java), Double and Float correspond to values from 1.7 e-308 to 1.7 e+308 and from 3.4 e-038 ... ge starts with a negative number, that is, with -2.147... I would like to know why, if both Double and Float can be negative.

The difference between float and double in SQL

What is the difference between float and double? It is written everywhere that double is similar to float, but with a larger ... inside and float and double will be equally stored as mantises, etc., only that one will take 4 байта and the other - 8 байт.

Display number 9223372036854775807

Why do different languages display the number 9223372036854775807 differently, even though they all use the same 8-byte doubl ... ://jsfiddle.net/5ugL4rqh/9223372036854776000 - Java http://ideone.com/QtXRWi9223372036854780000 - C# http://ideone.com/36Lzzi

Selecting the fractional part from double

I did the clumsy, double d= Double.valueOf("5.0596"); int i= (int) d; double d2= d- i; // дробная часть How can I do it differently?

How to limit the decimal places of reading (scanf) of a double variable?

The exercise asks that the readings of the variables double be limited to only one decimal place each. I tried putting "%.1lf ... ); }while(B<0 || B>10); MEDIA=(A+B)/2; printf("MEDIA = %.5lf\n", MEDIA); return (EXIT_SUCCESS); }

How to set a TextView with a DOUBLE variable?

I am trying to set the variable txtMedia1 with the value of the variable media1. I did this way, but the Android Studio indic ... txtMedia1 = (TextView) getText(R.id.media2) ; } } Performing what the Android Studio asks still Yes of the error.

Convert String to Double keeping content

I need in Java to convert a String that has a binary value (Ex: "0111010") to a double. Test: String teste = "101010101"; d ... String. The double can even put dot somewhere, without problems, but it needs to keep the same binary and in the same order.

How not to lose decimal places when doing " longProperty1.divide (longProperty2)"?

What I want to do is pretty simple, I just don't know how to "do it right" in JavaFX: I have two LongProperty (num1 and nu ... something that should be very simple and already provided for in JavaFX. So how do you do it the "right way" in the JavaFX?

What is the correct way to use float, double and decimal types?

Since college times I can't understand the real difference between the type DOUBLE and FLOAT, I ended up finding the type DEC ... ? Could you explain to me why the decimal type is ideal when you have money involved? What is the difference between the two?

Double Click Android

I am developing an application that has a list in a RecyclerView and the idea is that the person chooses one or more products ... the onclick function in another class, or if there is already a class I can use. Any information can be useful. Thank youooo

decimal Division result

I searched here on the forum and saw similar questions but couldn't solve the problem. Exercise: "implement a calculator. Th ... s... Sorry if this question is very recurring, but I really couldn't, and I've looked at all the answers that could help me.

What kind of data (double, float) should I use when representing a temperature?

My doubt is regarding the use of Double and Float in Java exercises when having to declare a temperature (Celsius scale). Whi ... esent, but what I have not yet been able to understand is when each of them, and for what purposes Double and Float are used.

SQL gets Double with separator "comma" instead of " period"

I am developing an application ASP.NET where I need to take a DOBULE typed by the user and move to the bank. However there i ... straints: table => { table.PrimaryKey("PK_Friend", x => x.Id); }); Prints:

I need to initialize the variable with the value 0, why?

import java.util.Scanner; public class Main { public static void main(String[] args) { int codigo, quantidade; ... or: Unresolved compilation problem: The local variable preco may not have been initialized at Main.main(Main.java:29)