| version 1.1, Tue Feb 13 11:12:16 1996 UTC | version 1.2, Mon Feb 26 16:52:45 1996 UTC | ||
|---|---|---|---|
|
|
||
| DCell mmul (Cell a, Cell b) /* signed multiply, mixed precision */ | DCell mmul (Cell a, Cell b) /* signed multiply, mixed precision */ | ||
| { | { | ||
| DCell res; | DCell res; | ||
| Cell sign = a^b; | |||
| res = UD2D(ummul (a, b)); | |||
| if (a < 0) | if (a < 0) | ||
| a = -a; | res.hi -= b; | ||
| if (b < 0) | if (b < 0) | ||
| b = -b; | res.hi -= a; | ||
| res = UD2D(ummul (a, b)); | |||
| if (sign < 0) | |||
| return dnegate (res); | |||
| else | |||
| return res; | return res; | ||
| } | } | ||
|
||||||||
|
CVS Admin Powered by ViewCVS 1.0-dev |
ViewCVS and CVS Help |