From 1f8bdb001e04d6d55673d293b4b6a1b1aeb7e7ba Mon Sep 17 00:00:00 2001 From: Alberto Bertogli Date: Mon, 3 Oct 2005 07:29:54 +0000 Subject: [PATCH] Acomodar el split(). --- src/number.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/number.h b/src/number.h index 522fc96..28e853e 100644 --- a/src/number.h +++ b/src/number.h @@ -271,14 +271,16 @@ std::pair< number< N, E >, number< N, E > > number< N, E >::split() const std::pair< num_type, num_type > par; // la primera mitad va al pedazo inferior - for (i = 0; i < halves_size; i++) + par.first.chunk[0] = chunk[0]; + for (i = 1; i < halves_size; i++) { par.first.chunk.push_back(chunk[i]); } // la segunda mitad (si full_size es impar es 1 más que la primera // mitad) va al pedazo superior - for ( ; i < full_size; i++) + par.second.chunk[0] = chunk[i]; + for (i++ ; i < full_size; i++) { par.second.chunk.push_back(chunk[i]); } -- 2.43.0