Questions tagged as 'float'

1
answer

Read binary files in C (fread Matlab)

In Matlab I have a binary file read like this: fid = fopen('nombrearcihvo', 'r', 'ieee-le') the contents are short floating, or 32 bits (4 bytes) and to read the first element I use the following: fread(fid, 1, 'float32') And throws me...
asked by 06.11.2017 / 18:34
1
answer

0,1 + 0,2 === 0,3 - FALSE [duplicated]

0.1 + 0.2 == 0.3 -> false 0.1 + 0.2 -> 0.30000000000000004 How can it be resolved so that 0.1 + 0.2 results in 0.3?     
asked by 30.08.2017 / 11:17
2
answers

Problem with float numbers in php

How about? I know it's a very talked about topic but I can not find a solution if you can lend me a hand. I have an application in which I calculate the VAT and as the products I offer have different VAT I have decided to add the amount and assi...
asked by 15.11.2018 / 21:41
2
answers

How to update a float or int field of an entry? - Django

Hello friends, sorry for the inconvenience, but I want to update a Float field in my database but I get errors that can not. My model is as follows: models.py class Model1(models.Model): user = models.ForeignKey(User, on_delete=mod...
asked by 25.08.2018 / 05:48
1
answer

Float the contents of a boostrap column

Very good, I have been involved with something for some time and I come to you to see if you can help me. I have a boostrap column and I would like to be able to align the content of this one side or the other, I have read that it is float bu...
asked by 26.10.2017 / 09:38
3
answers

Select integer floats in a list,

From a file with numbers in the list I must select the floating ones of the integers, for that I must transform them from strings to floating and integers, having to differentiate which ones are floating and which integers, for this I have desig...
asked by 01.01.2019 / 22:44
1
answer

how does it convert from str to float?

I have the following code: #!/usr/bin/env python from suds.client import Client import time import json class ClassName(object): fecha = time.strftime('%Y-%m-%d') def trm(self, fecha): try: wsdl_url = 'https://...
asked by 23.09.2018 / 04:04
0
answers

Convert float to hexadecimal arduino

I would like to know how to convert a float variable into hexadecimal. I know that an int integer is done in the following way: Serial.println(numeroEntero, HEX); But for numbers with decimals and floating no idea, since I tried it and roun...
asked by 12.04.2018 / 10:57
2
answers

Doubt with average in java [duplicated]

Good to everyone, I have a little doubt, when making the average age (in this case are 5 people who enter their ages) and the operation is done: promedio de edad = suma total de edades / 5 I want to go 'at least' with a decimal, I mean:...
asked by 03.02.2018 / 21:59
1
answer

Go from String to Float (Read well) [closed]

Good friends, I need to pass a string string to float in JAVA . The problem is that in the end, each string ends with units (volt,%, cm, m .. etc) example: Convert the String "0.22V" to float : 0.22 Thank you very much! PS: All the...
asked by 13.08.2017 / 18:53