[system] / trunk / pg / lib / Value / Real.pm Repository:
ViewVC logotype

Diff of /trunk/pg/lib/Value/Real.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 3991 Revision 3992
128sub div { 128sub div {
129 my ($l,$r,$flag) = @_; 129 my ($l,$r,$flag) = @_;
130 if ($l->promotePrecedence($r)) {return $r->div($l,!$flag)} 130 if ($l->promotePrecedence($r)) {return $r->div($l,!$flag)}
131 $r = promote($r); 131 $r = promote($r);
132 if ($flag) {my $tmp = $l; $l = $r; $r = $tmp} 132 if ($flag) {my $tmp = $l; $l = $r; $r = $tmp}
133 Value::Error("Division by zero") if $r == 0; 133 Value::Error("Division by zero") if $r->{data}[0] == 0;
134 return $pkg->make($l->{data}[0]/$r->{data}[0]); 134 return $pkg->make($l->{data}[0]/$r->{data}[0]);
135} 135}
136 136
137sub power { 137sub power {
138 my ($l,$r,$flag) = @_; 138 my ($l,$r,$flag) = @_;

Legend:
Removed from v.3991  
changed lines
  Added in v.3992

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9