double simoverx(const double x, int prec1, int prec2) { if (fabs(x) < DSMALL) return HALF; else return i1e(x,prec1,prec2)/(i0e(x,prec1,prec2)*x); }
void TestDataStructuresChild::Test8() { Actors i1e(42); InfallibleTArray<int> i2a; i2a.AppendElement(1); i2a.AppendElement(2); i2a.AppendElement(3); InfallibleTArray<Actors> i1; i1.AppendElement(i1e); i1.AppendElement(i2a); i1.AppendElement(mKids); InfallibleTArray<Actors> o1; if (!SendTest8(i1, &o1)) fail("can't send Test8"); test_assert(3 == o1.Length(), "wrong length"); test_assert(42 == o1[0].get_int(), "wrong value"); assert_arrays_equal(i2a, o1[1].get_ArrayOfint()); assert_arrays_equal(mKids, o1[2].get_ArrayOfPTestDataStructuresSubChild()); printf(" passed %s\n", __FUNCTION__); }
double sim(const double x, int prec1, int prec2) { return i1e(x,prec1,prec2)/i0e(x,prec1,prec2); }