Mercurial > octave-nkf
comparison liboctave/oct-inttypes.cc @ 9013:3b1908b58662
fixes in mixed int64-double multiply emulation
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Wed, 25 Mar 2009 14:29:50 +0100 |
parents | 0631d397fbe0 |
children | 3c1762c7e787 |
comparison
equal
deleted
inserted
replaced
9012:9f5e095555fc | 9013:3b1908b58662 |
---|---|
405 } | 405 } |
406 else if (y == 0.5) | 406 else if (y == 0.5) |
407 { | 407 { |
408 return x / octave_uint64 (static_cast<uint64_t> (2)); | 408 return x / octave_uint64 (static_cast<uint64_t> (2)); |
409 } | 409 } |
410 else if (y < 0 || xisnan (x) || xisinf (x)) | 410 else if (y < 0 || xisnan (y) || xisinf (y)) |
411 { | 411 { |
412 return octave_uint64 (x.value () * y); | 412 return octave_uint64 (x.value () * y); |
413 } | 413 } |
414 else | 414 else |
415 { | 415 { |
440 } | 440 } |
441 else if (fabs (y) == 0.5) | 441 else if (fabs (y) == 0.5) |
442 { | 442 { |
443 return x / octave_int64 (static_cast<uint64_t> (4*y)); | 443 return x / octave_int64 (static_cast<uint64_t> (4*y)); |
444 } | 444 } |
445 else if (xisnan (x) || xisinf (x)) | 445 else if (xisnan (y) || xisinf (y)) |
446 { | 446 { |
447 return octave_int64 (x.value () * y); | 447 return octave_int64 (x.value () * y); |
448 } | 448 } |
449 else | 449 else |
450 { | 450 { |