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

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

Subroutines contained in this interface:

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

This routine solves a cubic equation using the | |

This routine solves a cubic equation using the |

This routine solves a cubic equation using the explicit solution formula of Cardano. The equation must only have REAL roots. If complex roots are found, the routine returns info = ppm_error_error and exits.

Note | |
---|---|

Two roots that are closer together than ppm_eps are considered equal and returned as exact bit-copy in order to allow comparisons outside this routine. |

Note | |
---|---|

For ppm_debug .GT. 1 the routine checks its own result. Maybe - after some time - this can be removed. |

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

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

real array | (3) | (OUT) | Contains the three real roots | ||

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

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

real array, `(4)`

, (IN)

Coefficients. The equation being solved is:

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

real array, `(3)`

, (OUT)

Contains the three real roots

real, , (OUT)

Numerical tolerance (estimated) of result.

integer, , (OUT)

Return status, ppm_error_error if it has complex roots

ppm_module_data, ppm_module_error, ppm_module_write, ppm_module_substop, ppm_module_substart

This routine solves a cubic equation using the explicit solution formula of Cardano. The equation must only have REAL roots. If complex roots are found, the routine returns info = ppm_error_error and exits.

Note | |
---|---|

Two roots that are closer together than ppm_eps are considered equal and returned as exact bit-copy in order to allow comparisons outside this routine. |

Note | |
---|---|

For ppm_debug .GT. 1 the routine checks its own result. Maybe - after some time - this can be removed. |

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

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

real array | (3) | (OUT) | Contains the three real roots | ||

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

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

real array, `(4)`

, (IN)

Coefficients. The equation being solved is:

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

real array, `(3)`

, (OUT)

Contains the three real roots

real, , (OUT)

Numerical tolerance (estimated) of result.

integer, , (OUT)

Return status, ppm_error_error if it has complex roots

ppm_module_data, ppm_module_error, ppm_module_write, ppm_module_substop, ppm_module_substart