Neg sets d to -x.
(d, x *Decimal)
| 192 | |
| 193 | // Neg sets d to -x. |
| 194 | func (c *Context) Neg(d, x *Decimal) (Condition, error) { |
| 195 | if c.shouldSetAsNaN(x, nil) { |
| 196 | return c.setAsNaN(d, x, nil) |
| 197 | } |
| 198 | d.Neg(x) |
| 199 | res := c.round(d, d) |
| 200 | return c.goError(res) |
| 201 | } |
| 202 | |
| 203 | // Mul sets d to the product x*y. |
| 204 | func (c *Context) Mul(d, x, y *Decimal) (Condition, error) { |
no test coverage detected