
// supersonic_table generated by DK/circ_table_gen.py -- do not modify manually

 // variables in use
 // max_sig = 2.000000
 // step operator = 0.500000
 // divider = 10.587246

struct tablesupersonic { // 1-dimensional function table
    float low;
    float high;
    float istep;
    int size;
    float data[];
};

template <int tab_size>
struct tablesupersonic_imp {
    float low;
    float high;
    float istep;
    int size;
    float data[tab_size];
    operator tablesupersonic&() const { return *(tablesupersonic*)this; }
};

 static tablesupersonic_imp<200> supersonic_table __rt_data = {
	0,0.671463,99.5,200, {
	0.000000000000,0.004150347698,0.008300840550,0.012450607413,0.016600456409,
	0.020750150945,0.024899641790,0.029048933775,0.033197996699,0.037346834934,
	0.041495418522,0.045643751078,0.049791802830,0.053939577369,0.058087044481,
	0.062234207427,0.066381035840,0.070527532601,0.074673667211,0.078819442026,
	0.082964826356,0.087109822067,0.091254398138,0.095398555864,0.099542264133,
	0.103685523430,0.107828302351,0.111970600709,0.116112386738,0.120253659465,
	0.124394386699,0.128534566796,0.132674166859,0.136813184475,0.140951586302,
	0.145089368884,0.149226498322,0.153362970091,0.157498749603,0.161633831289,
	0.165768179744,0.169901788325,0.174034620744,0.178166669102,0.182297896120,
	0.186428292543,0.190557820055,0.194686467987,0.198814196848,0.202940994367,
	0.207066819844,0.211191659234,0.215315470402,0.219438237496,0.223559916954,
	0.227680490841,0.231799913707,0.235918165757,0.240035199511,0.244150992764,
	0.248265496095,0.252378684810,0.256490506929,0.260600935345,0.264709915280,
	0.268817416650,0.272923382086,0.277027778199,0.281130544192,0.285231643417,
	0.289331011868,0.293428608648,0.297524366189,0.301618238982,0.305710155634,
	0.309800066105,0.313887894252,0.317973584534,0.322057055956,0.326138247685,
	0.330217072406,0.334293463742,0.338367327649,0.342438590549,0.346507152084,
	0.350572930864,0.354635818354,0.358695725301,0.362752534508,0.366806146584,
	0.370856435292,0.374903290409,0.378946575807,0.382986168382,0.387021919719,
	0.391053695788,0.395081332806,0.399104682195,0.403123565923,0.407137817719,
	0.411147244986,0.415151660944,0.419150853079,0.423144615255,0.427132712799,
	0.431114919928,0.435090972439,0.439060618268,0.443023569109,0.446979541356,
	0.450928215651,0.454869274847,0.458802364096,0.462727128337,0.466643172553,
	0.470550098572,0.474447465897,0.478334827572,0.482211691413,0.486077555243,
	0.489931868285,0.493774065776,0.497603530659,0.501419627355,0.505221663907,
	0.509008924900,0.512780633880,0.516535985682,0.520274109252,0.523994098756,
	0.527694977567,0.531375620384,0.535035140583,0.538672294954,0.542285864750,
	0.545874580942,0.549437074072,0.552971933839,0.556477654763,0.559952671889,
	0.563395332694,0.566803915137,0.570176625253,0.573511591372,0.576806896402,
	0.580060544342,0.583270460038,0.586434574734,0.589550783300,0.592616879865,
	0.595631079154,0.598590571242,0.601493578720,0.604338047817,0.607121983310,
	0.609843508627,0.612500889802,0.615092489144,0.617616910636,0.620072927324,
	0.622459527074,0.624775944651,0.627021655284,0.629196403470,0.631300189331,
	0.633333283220,0.635296207980,0.637189742371,0.639014891726,0.640772884451,
	0.642465139020,0.644093251863,0.645658962586,0.647164139031,0.648610740568,
	0.650000810008,0.651336431185,0.652619727202,0.653852824129,0.655037845771,
	0.656176892561,0.657272032064,0.658325283647,0.659338615904,0.660313933074,
	0.661253077706,0.662157816271,0.663029851595,0.663870804109,0.664682226472,
	0.665465594283,0.666222313420,0.666953716302,0.667661069033,0.668345568370,
	0.669008349557,0.669650484366,0.670272986910,0.670876813965,0.671462871661
	}
};

double always_inline supersonicclip(double x) {
    double f = fabs(x);
    f = f * supersonic_table.istep;
    int i = static_cast<int>(f);
    if (i < 0) {
        f = supersonic_table.data[0];
    } else if (i >= supersonic_table.size-1) {
        f = supersonic_table.data[supersonic_table.size-1];
    } else {
    f -= i;
    f = supersonic_table.data[i]*(1-f) + supersonic_table.data[i+1]*f;
    }
    return copysign(f, x);
}

