File: adv_dichotomy.tr

package info (click to toggle)
turing 0.11-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 10,340 kB
  • sloc: python: 106,582; xml: 101; makefile: 53; sh: 29
file content (1 line) | stat: -rw-r--r-- 1,143 bytes parent folder | download | duplicates (4)
1
BlockStmt([CommentStmt('Solves Func(x)=0 on the interval [a, b]'), AssignStmt(IdentifierNode('Func'), LambdaNode(['x'], BinOpNode(BinOpNode(IdentifierNode('x'), NumberNode(1), '-'), BinOpNode(NumberNode(1), IdentifierNode('x'), '/'), '-'))), AssignStmt(IdentifierNode('prec'), NumberNode(1e-08)), InputStmt(IdentifierNode('a'), None), InputStmt(IdentifierNode('b'), None), WhileStmt(BinOpNode(BinOpNode(IdentifierNode('b'), IdentifierNode('a'), '-'), IdentifierNode('prec'), '>'), [AssignStmt(IdentifierNode('m'), BinOpNode(BinOpNode(IdentifierNode('a'), IdentifierNode('b'), '+'), NumberNode(2), '/')), IfStmt(BinOpNode(BinOpNode(CallNode(IdentifierNode('Func'), [IdentifierNode('m')]), CallNode(IdentifierNode('Func'), [IdentifierNode('b')]), '*'), NumberNode(0), '>'), [AssignStmt(IdentifierNode('b'), IdentifierNode('m'))]), ElseStmt([AssignStmt(IdentifierNode('a'), IdentifierNode('m'))])]), DisplayStmt(CallNode(IdentifierNode('round'), [IdentifierNode('a'), IdentifierNode('prec')]), False), DisplayStmt(StringNode(' < x < '), False), DisplayStmt(CallNode(IdentifierNode('round'), [IdentifierNode('b'), IdentifierNode('prec')]), True)])