Skip to content

習題 3 : 請寫程式求解三次多項式的根 (加分題) #3

Description

@ccckmit

三次多項式

$$ f(x) = a x^3 + b x^2 + c x + d $$

請用 python 寫一個函數 root3(a,b,c,d) 求出該多項式個根

根的公式

參考維基百科

要求:沒有實根,也要傳回複數根

提示:cmath.sqrt(z) 會傳回複數平方根

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions