besitzt hier jemand einen ARM mit M4F, z.B. einen Teensy 3.5 oder 3.6?
Der M4F von Adafruit scheint bei fp_double keinen Gebrauch von der fpu zumachen, sondern nur bei 32bit-float!
Zitat Zitat von westfw
And for grins, a SAMD51:

Code:
...
2     24482  double_op
2      2772  float_op
...
(I'm not convinced that the double floating point library "properly" utilizes single point hardware. Sigh.)
Code:
#define PI  M_PI

//--------------------------------------------
double test_fp_math() { // 2,500,000 fp (double) mult, transcend.
  volatile double s=(double)PI;
  unsigned long y;

  for(y=0;y<500000UL;y++) {
     s*=sqrt(s);
     s=sin(s);
     s=exp(s);
     s*=s;
  }
  return s;  // debug
}

//--------------------------------------------
float test_fp_math32() { // 2,500,000 32bit float mult, transcend.
  volatile float s=(float)PI;
  unsigned long y;

  for(y=0;y<500000UL;y++) {
     s*=sqrtf(s);
     s=sinf(s);
     s=expf(s);
     s*=s;
  }
  return s;  // debug
}