Run this on the command line using python, takes the a, b and c values of the quadratic as arguments:
python quad.py 1 1 0
The above would solve for:
x^2 + x = 0
| # coding=UTF-8 | |
| import math | |
| inv = 1 | |
| pc = 0 | |
| lmt = 1000000 | |
| while(inv < lmt): | |
| pp = (6*inv) - 1 |
| // Child filters - TBD | |
| var filters = { | |
| "nth-child": function(ctx, val){ | |
| var found = [], | |
| val = val-1; | |
| for(var j = 0; j < ctx.length; j++){ | |
| if(ctx[j][val]) | |
| found.push(ctx[j][val]); |
| var render = require("./renderer"); | |
| // The output of parser.js | |
| var t = [ | |
| { | |
| data: 'Xyz ', type: 'text' | |
| }, | |
| { | |
| type: 'script', |
| /* | |
| * Copyright (c) 2011, Chris Dickinson | |
| * All rights reserved. | |
| * | |
| * Redistribution and use in source and binary forms, with or without | |
| * modification, are permitted provided that the following conditions are met: | |
| * * Redistributions of source code must retain the above copyright | |
| * notice, this list of conditions and the following disclaimer. | |
| * * Redistributions in binary form must reproduce the above copyright | |
| * notice, this list of conditions and the following disclaimer in the |
| CC = gcc | |
| CFLAGS = -I. | |
| test: main.o | |
| $(CC) -o $@ $(CFLAGS) main.o | |
| main.o: main.c | |
| $(CC) -c main.c $(CFLAGS) |