This is how you put them into PROGMEM:
float PROGMEM SL_multipliers[SL_coeffs+1]={
0.9287892, 35999.1376958, 35999.4089666, 35998.7287385, 71998.20261,
// ... etc.
};
To get them out you can use pgm_read_float etc. but I thought it would be nice to use templates. I've written a small library to do that:
http://www.gammon.com.au/Arduino/PROGMEMAnything.zip
This is what is in it:
// Written by Nick Gammon
// May 2012
#include <Arduino.h>
// returns into item in PROGMEM pointed to by ptr into value
// returns incremented pointer
template <typename T> T * PROGMEMAnything(T * ptr, T& value)
{
memcpy_P (&value, ptr, sizeof value);
return ptr + 1;
} // end of PROGMEMAnything
// returns value of item in PROGMEM pointed to by ptr
template <typename T> T PROGMEMAnything(T * ptr)
{
T result;
memcpy_P (&result, ptr, sizeof result);
return result;
} // end of PROGMEMAnything
With that this simple sketch shows how you can pull floats out of PROGMEM:
#include <PROGMEMAnything.h>
const int SL_coeffs = 49 - 1;
float PROGMEM SL_multipliers[SL_coeffs+1]={
0.9287892, 35999.1376958, 35999.4089666, 35998.7287385,
71998.20261, 71998.4403, 36000.35726, 71997.4812,
32964.4678, -19.441, 445267.1117, 45036.884, 3.1008,
22518.4434, -19.9739, 65928.9345, 9038.0293, 3034.7684,
33718.148, 3034.448, -2280.773, 29929.992, 31556.493, 149.588,
9037.75, 107997.405, -4444.176, 151.771, 67555.316, 31556.08,
-4561.54, 107996.706, 1221.655, 62894.167, 31437.369, 14578.298,
-31931.757, 34777.243, 1221.999, 62894.511, -4442.039, 107997.909,
119.066, 16859.071, -4.578, 26895.292, -39.127, 12297.536, 90073.778};
void setup ()
{
Serial.begin (115200);
Serial.println ();
for (int i = 0; i < SL_coeffs; i++)
Serial.println (PROGMEMAnything (&SL_multipliers [i]));
} // end of setup
void loop () {}
Output:
0.93
35999.14
35999.41
35998.73
71998.21
71998.44
36000.35
71997.49
32964.47
-19.44
445267.12
45036.88
3.10
22518.44
-19.97
65928.94
9038.03
3034.77
33718.15
3034.45
-2280.77
29929.99
31556.49
149.59
9037.75
107997.41
-4444.18
151.77
67555.32
31556.08
-4561.54
107996.71
1221.66
62894.17
31437.37
14578.30
-31931.76
34777.24
1222.00
62894.51
-4442.04
107997.91
119.07
16859.07
-4.58
26895.29
-39.13
12297.54