This module provides the routines that solve quadratic equations with real roots.

name | description |
---|---|

Subroutines contained in this interface:

name | description |
---|---|

This routine solves a quadratic equation using the | |

This routine solves a quadratic equation using the |

This routine solves a quadratic equation using the
well-known explicit solution formula. The equation
must only have REAL roots. If complex roots are
found, the routine returns `info = ppm_error_error`

and exits.

Note | |
---|---|

If the discriminant is |

Tip | |
---|---|

For |

name | type | dimension | intent | optional | description |
---|---|---|---|---|---|

real array | (3) | (IN) | Coefficients. The equation being solved is: | ||

real array | (2) | (OUT) | Contains the two real roots | ||

real | (OUT) | Numerical tolerance (estimated) of result. | |||

integer | (OUT) | Return status, ppm_error_error if roots are complex |

real array, `(3)`

, (IN)

Coefficients. The equation being solved is:

coef(3)*x^2+coef(2)*x+coef(1) = 0

real array, `(2)`

, (OUT)

Contains the two real roots

real, , (OUT)

Numerical tolerance (estimated) of result.

integer, , (OUT)

Return status, ppm_error_error if roots are complex

ppm_module_data, ppm_module_error, ppm_module_write, ppm_module_substop, ppm_module_substart

This routine solves a quadratic equation using the
well-known explicit solution formula. The equation
must only have REAL roots. If complex roots are
found, the routine returns `info = ppm_error_error`

and exits.

Note | |
---|---|

If the discriminant is |

Tip | |
---|---|

For |

name | type | dimension | intent | optional | description |
---|---|---|---|---|---|

real array | (3) | (IN) | Coefficients. The equation being solved is: | ||

real array | (2) | (OUT) | Contains the two real roots | ||

real | (OUT) | Numerical tolerance (estimated) of result. | |||

integer | (OUT) | Return status, ppm_error_error if roots are complex |

real array, `(3)`

, (IN)

Coefficients. The equation being solved is:

coef(3)*x^2+coef(2)*x+coef(1) = 0

real array, `(2)`

, (OUT)

Contains the two real roots

real, , (OUT)

Numerical tolerance (estimated) of result.

integer, , (OUT)

Return status, ppm_error_error if roots are complex

ppm_module_data, ppm_module_error, ppm_module_write, ppm_module_substop, ppm_module_substart