solver first part
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
#include <errno.h> // for errno
|
||||
#include <string.h> // for strerror
|
||||
|
||||
#include <math.h> // tmp
|
||||
|
||||
/** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* MAIN.C
|
||||
*/
|
||||
@@ -117,13 +119,13 @@ typedef struct
|
||||
{
|
||||
e_delta_sign delta_sign; // DELTA_PLUS or DELTA_MINUS or DELTA_ZERO
|
||||
double delta_absolute; // |Δ| == |b² - 4ac|
|
||||
int first_term_pgcd; // pgcd(b, 2a)
|
||||
int first_term_numerator; // -b / pgcd
|
||||
int first_term_denominator; // 2a / pgcd
|
||||
int first_term_gcd; // gcd(b, 2a)
|
||||
int first_term_numerator; // -b / gcd
|
||||
int first_term_denominator; // 2a / gcd
|
||||
double first_term; // double (-b / 2a)
|
||||
int second_term_pgcd; // pgcd(√|Δ|, 2a)
|
||||
int second_term_numerator; // √|Δ| / pgcd
|
||||
int second_term_denominator; // 2a / pgcd
|
||||
int second_term_gcd; // gcd(√|Δ|, 2a)
|
||||
int second_term_numerator; // √|Δ| / gcd
|
||||
int second_term_denominator; // 2a / gcd
|
||||
double second_term; // double (√|Δ| / 2a)
|
||||
double solution1; // first_term + second_term
|
||||
double solution2; // first_term - second_term
|
||||
|
||||
Reference in New Issue
Block a user