File: 90regression.t

package info (click to toggle)
libmath-symbolic-perl 0.613-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,268 kB
  • sloc: perl: 12,638; makefile: 9
file content (27 lines) | stat: -rw-r--r-- 471 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use strict;
use warnings;
use Test::More tests => 2;

use Math::Symbolic qw/parse_from_string/;

{
  my $f = parse_from_string('x + (-5)*y');
  my $fs = $f->simplify;

  #diag("Before simplification: $f");
  #diag("After simplification:  $fs");

  ok($f->test_num_equiv($fs));
}

{
  my $f = parse_from_string("(3*7)+(3*m)+(n*m)");
  my $fs = $f->simplify;

  #diag("Before simplification: $f");
  #diag("After simplification:  $fs");

  ok($f->test_num_equiv($fs));
}