Changeset 0f4db3 in git


Ignore:
Timestamp:
Jan 18, 2005, 9:53:45 AM (19 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
9bc0b8b754d053a75aebcc3d0ab6ffa38cd67cf1
Parents:
42e096a4ab8101cf7f5f6ccfbedfba7c6cb27efc
Message:
*hannes: fixed memory leak: ngcNeg


git-svn-id: file:///usr/local/Singular/svn/trunk@7670 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/gnumpc.cc

    r42e096 r0f4db3  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: gnumpc.cc,v 1.1.1.1 2003-10-06 12:15:53 Singular Exp $ */
     4/* $Id: gnumpc.cc,v 1.2 2005-01-18 08:53:45 Singular Exp $ */
    55/*
    66* ABSTRACT: computations with GMP complex floating-point numbers
     
    164164* za:= - za
    165165*/
     166gmp_complex ngc_m1(-1);
     167
    166168number ngcNeg (number a)
    167169{
    168170  if ( a == NULL ) return NULL;
    169   number m1=nInit(-1);
    170   a=ngcMult(m1,a);
     171  gmp_complex* r=(gmp_complex*)a;
     172  (*r) *= ngc_m1;
    171173  return (number)a;
    172174}
Note: See TracChangeset for help on using the changeset viewer.