File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,13 +58,18 @@ type SymbolicExpression(expression:Expression) =
5858 | Approximation ( Approximation.Real fp) -> fp
5959 | Constant Pi -> Constants.Pi
6060 | Constant E -> Constants.E
61- | _ -> failwith " Not a rational number"
61+ | Number n -> float n
62+ | _ -> failwith " Not a real number"
6263
6364 member this.ComplexNumberValue =
6465 match expression with
6566 | Approximation ( Approximation.Complex fp) -> fp
67+ | Approximation ( Approximation.Real fp) -> complex fp 0.0
6668 | Constant I -> Complex.ImaginaryOne
67- | _ -> failwith " Not a rational number"
69+ | Constant Pi -> complex Constants.Pi 0.0
70+ | Constant E -> complex Constants.E 0.0
71+ | Number n -> complex ( float n) 0.0
72+ | _ -> failwith " Not a complex number"
6873
6974 member this.VariableName =
7075 match expression with
You can’t perform that action at this time.
0 commit comments