divyang4481 / mipt-hw

Automatically exported from code.google.com/p/mipt-hw
0 stars 0 forks source link

task_02 biguint #270

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
/baldin_dima/task02_biguint/
вроде сделал, но график не построил, так как 
считает подозрительно быстро, хотя вроде 
все правильно

Original issue reported on code.google.com by dmitryba...@gmail.com on 26 May 2013 at 10:08

GoogleCodeExporter commented 9 years ago
Ваша программа выдает следующее:
55555
58023
70077626
46
n = 10^1
Generation time: 0
N = 10
Karatsuba: 0
Usual 0
true
n = 10^2
Generation time: 0
N = 100
Karatsuba: 0
Usual 0
true
n = 10^3
Generation time: 0.001
N = 1000
Karatsuba: 0
Usual 0
true
n = 10^4
Generation time: 0.008
N = 10000
Karatsuba: 0
Usual 0
true
n = 10^5
Generation time: 0.086
N = 100000
Karatsuba: 0
Usual 0
true

Что-то не то. По крайней мере генерация 
данных рандомных не может мгновенно 
отрабатывать. Ищите ошибку.

Решение не принято.

Original comment by aivyu...@gmail.com on 26 May 2013 at 10:17

GoogleCodeExporter commented 9 years ago
Генерация данных быстро не происходит, на 
моей компьютере 10^5 сгенерировать 
требуется секунд 10;

Original comment by dmitryba...@gmail.com on 26 May 2013 at 11:03

GoogleCodeExporter commented 9 years ago
Нашел ошибку, исправил, теперь всё 
правильно и медленно)

Original comment by dmitryba...@gmail.com on 26 May 2013 at 11:56

GoogleCodeExporter commented 9 years ago
Теперь не собирается:
TBigUInt.cpp: In constructor 'TBigUInt::TBigUInt(const string&)':
TBigUInt.cpp:69:23: error: conversion from 'size_t {aka long unsigned int}' to 
'const TBigUInt' is ambiguous
TBigUInt.cpp:65:15: note: candidates are:
TBigUInt.cpp:55:14: note: TBigUInt::TBigUInt(const char*) <near match>
TBigUInt.cpp:55:14: note:   no known conversion for argument 1 from 'size_t 
{aka long unsigned int}' to 'const char*'
TBigUInt.cpp:50:5: note: TBigUInt::TBigUInt(unsigned int)
TBigUInt.cpp:45:5: note: TBigUInt::TBigUInt(ulong)
TBigUInt.cpp:184:11: error:   initializing argument 1 of 'TBigUInt 
TBigUInt::operator*(const TBigUInt&) const'
TBigUInt.cpp: In member function 'TBigUInt TBigUInt::operator+(const 
TBigUInt&)':
TBigUInt.cpp:129:11: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]

Original comment by aivyu...@gmail.com on 27 May 2013 at 7:47