double tag

15 questions


1 answers
134 views
0
I want to change it to a string without any unnecessary parts such as zero below the decimal point when I print out the real number, what should I do?

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...


1 answers
142 views
0
How do I make a variable have a float value in Ruby?

total_a = 10total_b = 5ratio = total_b/total_aprint ratioIf you do this, the ratio becomes 0. It seems to be processed automatically in an integer type, so how do I make the ratio have a value of 0.5?

2 years ago

1 answers
84 views
0
I don't know exactly why I use %lf when I input real numbers in the scanf function.

I heard that if you receive a real data value from the scanf function, the data type of the factor value is automatically changed from float type to double type, so in that way, the int type data valu...

2 years ago

1 answers
74 views
0
While solving the problem of using double pointer variables, I had a question!!

#include<stdio.h>void MaxAndMin(int * arr,int size,int **mxptr,int **mnptr){ int * max,* min; int i; *max=*min=arr[0]; for(i=0;i<size;i++) { if(*max<arr[i]) *max=arr[i]; if(*min>arr[...


1 answers
142 views
0
Is there a way to calculate between long double types in C language?

#include <stdio.h>#include <math.h>int main(void){ double x,y; printf(Please enter x and y : ); scanf(%lf %lf, &x, &y); long double z = ((x + sqrt(x*x+y*y))/2.0); printf(The value ...

2 years ago

1 answers
86 views
0
[Java] Float and double

I basically used double to store real numbers in Java.However, there are float and double variable types that store real numbers. You can enter double as soon as you initialize it.double a = 1.5;Like ...

2 years ago

1 answers
87 views
0
Please check if the Java programming example is correct.

I'm studying after looking at the example question, but I don't understand the question well.The result value and type of the next equationShould I write down the value and type separately?Number 1 - ...

2 years ago

1 answers
94 views
0
I would like to ask you a question in C language.

int main(void){ double x; x = (1.0e17 + 5.0) - 1.0e17; printf(%lf \n, x); return 0;}int main(void){ double x; x = (1.0e16 + 5.0) - 1.0e16; printf(%lf \n, x); return 0;}int main(void){ double x; x = (1...

2 years ago

2 answers
88 views
0
Is there a way not to send it in duplicate when sending it to the server through Ajax?

Is there a way to prevent duplicate sending of user-written information to the server via asynchronous communication after clicking the button?


1 answers
90 views
0
Question about epsilone()!

I'm reading the code that someone wrote epsilone()epsilon() appears in the associated document as double type minus 1 from the smallest number greater than 1.So epsilone() is the smallest number great...

2 years ago
- 1 - »

© 2024 OneMinuteCode. All rights reserved.