fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. inline int FISTToInt (float f) {
  5. int i;
  6. asm("flds %1;"
  7. "fistl %0;"
  8. :"=m" ( i )
  9. :"m" ( f )
  10. :
  11. );
  12. return i;
  13. }
  14.  
  15. int main() {
  16. // your code goes here
  17. std::cout << FISTToInt(27.0f) << std::endl;
  18. return 0;
  19. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
27