0

I need to check if there is floating point unit in android device

In every device, Logic is different by if there is floating point unit

because floating point calculation takes too much resource without floating point unit..

Is there any API to check it?? or some way.. thanks!!

Neitsa
  • 7,693
  • 1
  • 28
  • 45
koseonjae
  • 3
  • 4

1 Answers1

0

Have not any API for checking value is floating point or not but you can apply your own login for finding value is integer or float for example

if(value == Math.round(value)){
 // integer value
} else {
 // flotting point value
}

if(value == (int)value){
// integer value
} else {
// floating point value
}
Kishan Donga
  • 2,851
  • 2
  • 23
  • 35