float

  1. behnam_tr

    B4J Question Random Float Numbers ??

    I didn't find any method to generate Random Float numbers between 0 and 1 Is there such a method? i need simulate this java script code Math.floor((Math.random() * 10000000)+1); Math.random() in java script >>> 0.1142937586695465 , 0.9373901332670653 , 0.7550847537693961
  2. carlos7000

    Android Question The smallest number

    ¿Which is the smallest number that can be used in a variable of type float, and Which is the smallest number that can be used in a variable of type double? Please do not give the answer with a number expressed in scientific notation
  3. carlos7000

    Android Question Floating point error

    I am writing a simple program that must add the number 0.000000000000001 a given number of times. something like that Do While Cycles > 0 Cycles = Cycles - 1 Total = Total + 0.000000000000001 Loop Strangely, the answer does not match what was expected. I was reducing the requirement...
  4. A

    B4J Question Issue with Double format

    Hi Guys, When using a float to display a sales total I am using this to round the amount. StoreTotal=Round(StoreTotal * 100) / 100 It seems to work fine until I get a 0 in the last decimal place so 99.99 works fine, however 99.90 will display as 99.9 When I was using a float also with this...
Top