Most voted "float" questions
Float is a type of primitive data that represents a floating point of simple precision at 32 bits. Use this tag for questions that directly involve a given float (such as rounding, converting, formatting, etc.), DO NOT USE simply because it contains a float in your code.
Learn more…128 questions
Sort by count of
-
0
votes1
answer59
viewsCounter with float number
I’m new to C programming. My problem is that I’m not able to add float numbers with an i counter, which would be integer, which is the best solution? #include <stdio.h>…
-
0
votes1
answer23
viewsDoubt between performing clearfix using an element in the DOM or a pseudo-element
I have to wear one float: left in my logo and float: right on my menu, however background-color disappears and need to correct with clear: both. My question is, what’s the difference between using…
-
0
votes1
answer69
viewsPython Type Error a float is required
When I print C1.getTotalDesconts() and C1.getSalarioLike() for some reason python is requiring a conversion to float, these methods always return int or float, I can’t imagine the reason for this…
-
0
votes0
answers55
viewsC++: calculated float does not enter if
Hi, I need help. I’m not getting into the "if" parole with a floating number obtained after an operation. In the code below when I declare the value 0.05 enters the "if", but when I get the 0.05 by…
-
0
votes1
answer182
viewsRounding of decimal places float python
Hello, I am starting now to learn programming and I made a calculator that makes the calculation of the formula Bhaskara and it has interface, I used the Tkinter. My doubt is the following I wanted…
-
0
votes0
answers84
viewsHow to convert numbers in 64-bit float format to 32-bit float in php?
In Javascript I could do so: let settings = { valorFloat : file.getFloat64(38, false), //Le o dado da posição 38 no formato float 64 bits }; newFile.setFloat32(38, file.settings.valorFloat, true);…
-
0
votes0
answers18
viewsDoes the true value of a number change when I change its float type.?
Change my data set to float32 or float16, is changing the "true" value of my data? If I have the value 3.6, using python and reading in float64 he remains 3.6, but it changes when I put in float32,…
-
0
votes1
answer84
viewsHow to work with super accurate Python values?
I’m creating an algorithm and I’m encountering a strange problem, I have a set of precise values and an unknown goal, basically a neural network. I used several tactics to optimize weights and now…
-
0
votes0
answers162
viewsWhat is the input(). split(" ") for in python?
I’m solving some exercises in python and when I put the code this way: A = float(input("")) B = float(input("")) C = float(input("")) triangulo = float((A*C)/2) circulo = float(3.14159*(C**2))…
-
0
votes2
answers46
viewsWhy can’t I reverse aside my aside and Section:
I’m trying to make the box2 get float:left and box1 with float:right but even setting the options HTML does not play what I need. This needs to happen without using grid or flexbox or anything other…
-
-1
votes3
answers264
viewsSource code does not compile
#include <iostream> /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int main() { float parede,…
-
-1
votes1
answer126
viewsList float number formatting
I have a dataframe with Latitude and Longitude columns, in string format Atibaia['LATITUDE'].head() 140 -231,124,852,387,647 245 -231,159,749,902,692 254 -23,116,747,205 512 -231,560,912,572,211…
-
-1
votes2
answers92
viewsZeroes only appear in the division
The result of division is only zero, which is wrong? #include <stdio.h> void main() { double Nota1, Nota2, MediaPond; printf("Escreva a nota 1: "); scanf("%f", &Nota1); printf("\nEscreva a…
-
-1
votes1
answer2531
viewsinvalid operands to Binary % (have ' float' and ' int')
When I compile the code I get the error in the question title for the line res100=notas%100; How to solve ? Code: float…
-
-1
votes1
answer71
viewsCannot multiply the sequence by a non-int of type 'float', even when transformed into 'map'
level: beginner I need to multiply that [list] * [float]: eta = [random.random () - 0,5] * eps but when I try to make a float or a map, it still doesn’t work (because of unsupported operand types).…
-
-1
votes1
answer94
viewsPython with float variable problems
Galera wrote a program where I decrease a variable in 0.01 and from the third decrease, python simply recognizes the value 0.01 as 0.009999999999988617 and ends up giving problems in my code. In the…
-
-1
votes3
answers208
viewsHow to format decimals in Javascript?
Guys, with the following code here, I wanted to know how to round the decimal places of the floating values: from now on I thank those who can help :) num1 = parseFloat (prompt ("digite o primeiro…
-
-1
votes3
answers64
viewsPython checking if the number is Float
I am very beginner in python programming, my doubt is the following, I need the user to type only float number, how do I do this check and report the error if it is not? I could only do if the…
-
-1
votes1
answer31
viewsError request for Member 'salario' in Something not a Structure or Union
Guys, I need help with the sum of variables in a struct. the program does not compile and displays this error [Error] request for Member 'salario' in Something not a Structure or Union. The…
-
-1
votes2
answers105
viewsHow can I turn a string into a float?
I am doing a job and I came across the following situation: I have a list with decimal numbers. But the list is like a string. For example: h = ["3,5","4,3","8,9"] Now my problem appears, I need the…
-
-2
votes3
answers3860
viewsWhat is the python float
I have the following code in Python but I don’t know what the float someone could help me? peso = float(input('Digite seu peso (kg): '))
-
-2
votes1
answer603
viewsError: "can’t Multiply Sequence by non-int of type 'float'"
I’m making this simple unit converter. I need him to do: Calculation of average speed in Km/h; Print this result. Then, in another function, I need to convert it to m/s and print the result again.…
-
-2
votes1
answer42
viewsWhy does the code return error dumped core?
I came across the following errors: floating point Exception and dumped core for the same code. I did not understand very well why this error occurred. I put the code in a Bugger and from what I saw…
-
-3
votes1
answer1220
viewsFloat rounding up in python 3
How do I round up python 3 ? For example, the 4000/18 calculation always results in 223.
-
-3
votes1
answer172
viewsHow to transform a monetary value into Reals in a number 7743;ero float?
I need to turn a number that is in the format 20.000,00 (with points in each thousand) for a type number float, how do I do that? var value = $('#money').val() var currency = value.replace(",00",…
-
-3
votes2
answers98
viewshow to leave the result 93.1
When rotating the following code: package Aula_4; import java.util.Scanner; public class Exercício_3 { public static void main(String[] args) { Scanner entrada = new Scanner(System.in); float…
-
-3
votes1
answer36
viewsHow to keep all html within a 100% div height?
Hello How do I keep my html inside the background image without creating that white background and so that the Divs - yellow and black - also respect the 50% height within that height of the…
-
-4
votes2
answers594
viewsI’m not able to put my text on the right side of the site
I have a problem trying to put my text on the right side of the site, the text is on the left side, I want to leave on the right side of the page…