/* Copyright (C) 2014-2020, Dirk Krause SPDX-License-Identifier: BSD-3-Clause */ /* WARNING: This file was generated by the dkct program (see http://dktools.sourceforge.net/ for details). Changes you make here will be lost if dkct is run again! You should modify the original source and run dkct on it. Original source: f2lpara.ctr */ /** @file f2lpara.c The f2lpara module. */ #line 54 "f2lpara.ctr" #include "dk3ma.h" #include "f2lpara.h" #include "dk3unused.h" #line 63 "f2lpara.ctr" double f2lpara_derived_left(double yneg, double y0, double ypos, int *ec) { double back = 0.0; int myec = 0; /* back = 2 * y0 - 0.5 * ypos - 1.5 * yneg */ back = dk3ma_d_sub_ok( dk3ma_d_mul_ok(2.0, y0, &myec), dk3ma_d_add_ok( (0.5 * ypos), dk3ma_d_mul_ok(1.5, yneg, &myec), &myec ), &myec ); if (myec) { if (ec) { *ec = myec; } } return back; } double f2lpara_derived_center( double yneg, double DK3_SILENCE_ARG_UNUSED(y0), double ypos, int *ec ) { double back = 0.0; int myec = 0; /* back = 0.5 * (ypos - yneg) */ DK3_UNUSED_ARG(y0) back = 0.5 * dk3ma_d_sub_ok(ypos, yneg, &myec); if (myec) { if (ec) { *ec = myec; } } return back; } double f2lpara_derived_right(double yneg, double y0, double ypos, int *ec) { double back = 0.0; int myec = 0; /* back = 1.5 * ypos + 0.5 * yneg - 2 * y0 */ back = dk3ma_d_sub_ok( dk3ma_d_add_ok( dk3ma_d_mul_ok(1.5, ypos, &myec), (0.5 * yneg), &myec ), dk3ma_d_mul_ok(2.0, y0, &myec), &myec ); if (myec) { if (ec) { *ec = myec; } } return back; }