Opened 12 years ago

Closed 11 years ago

# comparision of rational numbers no longer works in parameter rings

Reported by: Owned by: gorzel seelisch major 3-1-4 and higher singular-kernel 3-1-4

### Description

Suppose the basering contains a parameter c, and variable x, characteritic 0.

In Singular 3-1-1, comparision of numbers involving parameters

like c/3 <c/2 or c2/2 < c always evaluated to 1.

In late Singular 3-1-2 this has changed to be evaluated to 0, with the effect

that a comparsion 1/3 < 1/2 give 0, too.

These computations should work again.

Note that comparsion for variables still give the expected result.

[An imitation for the number expressions is still restricted

since pardeg only considers the numerator.]

```> system ("--version");
Singular for ix86-Linux version 3-1-2 (3120- 14066 )  Mar 25 2011 04:05:02

> system("--version");
Singular for ix86-Linux version 3-1-2 (3120- 13552 )  Oct 22 2010 04:04:05
```
```> ring rc = (0,c),(x,y),ds;

> 1/2>0;    // OK
1
> 1/2<0;    // OK
0
> 1/3<1/2;  // wrong
0
> 1/3-1/2<0;  // wrong
0
> 1/3-1/2;
-1/6
> -1/2<0;     // wrong
0

> 1/3 < 1/2;   // wrong
0
> 1/3 > 1/2;
0
> 1/3 == 1/2;
0
> 1/3 != 1/2;
1

> c/3 < c/2;
0
> c/3 > c/2;
0
> c/3 == c/2;
0
> c/3 != c/2;
1

> x2/3 < x2/2;
1
> x2/3 > x2/2;
0
> x2/3 == x2/2;
0
> x2/3 != x2/2;
1
```

In 3-1-1 it did work as follows:

```>  system("--version");
Singular for ix86-Linux version 3-1-1 (3110-2010030911)  Mar  9 2010 11:22:36
with

>  ring rc = (0,c),(x,y),dp;
> 1/3<1/2;   // OK
1
> 1/3>1/2;   // OK
0
> 1/3==1/2;
0
> 1/3!=1/2;
1
> c/2 > c/3;  // OK
1
> c/2 < c/3;  // wrong
1
> c/2 == c/3;
0
> c/2 != c/3;
1
> x2/3 < x2/2;  // OK
1
> x2/3 > x2/2;  // OK
0
> x2/3 == x2/2;
0
> x2/3 != x2/2;
1

> c2/3 <c;   // Wrong
1
> x2/3 <x;  // OK
0

```

### comment:1 Changed 12 years ago by seelisch

Owner: changed from somebody to seelisch

### comment:2 Changed 12 years ago by seelisch

Resolution: → fixed new → closed

fixed by git commit 5b80583e0b5f470170ff83463359d005cd23ee23 (The behaviour need not be 100% as in 3-1-1 but re-establishes the simple cases like 1/3 < 1/2 and 1/3 * c < 1/ 2 * c...)

### comment:3 Changed 11 years ago by gorzel

Cc: hannes removed 3-1-3 and higher → 3-1-4 and higher fixed closed → reopened 3-1-2 → 3-1-4

Since, again, basic comparison of rational numbers no longer work in rings with parameters, I've reopened this ticket.

```gorzelc@RAEUBER40:/tmp/SING/Singular/3-1-4/x86_64-Linux\$ ./Singular -v
Singular for x86_64-Linux version 3-1-4 (3144- exported )  Jun 20 2012 08:04:22
with
factory(@(#) factoryVersion = 3.1.4),libfac(3.1.3,March 2011),
dynamic modules,OM_CHECK=0,OM_TRACK=0,random=1340208250

> ring rt =(0,t),x,dp;
> 1/2>1/3;  // wrong
0
> 1/3<1/2;  // wrong
0
```

### comment:4 Changed 11 years ago by hannes

Resolution: → fixed reopened → closed

fixed

Note: See TracTickets for help on using tickets.