Created
April 11, 2018 13:20
-
-
Save PoslavskySV/bab53af9066a44b44c68f9a658305866 to your computer and use it in GitHub Desktop.
factorize from form file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.io.Source | |
val exprStr = Source.fromFile("expression.txt").mkString | |
val polyStr = exprStr.replace("L num = ", "").replace("\\","").replace("\n","").replace(";","") | |
implicit val ring = MultivariateRing(Z, Array("s", "t", "m", "e", "c")) | |
val poly = ring(polyStr) | |
val factors = Factor(poly) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment