'15억승'에 해당되는 글 1건

  1. 2011.04.20 2의 15억(1504780000)승 계산한게 자랑 (3)

며칠 전에 2의 10억승을 구했다는 소식 듣고, 나도 만들이 봤음.

"직접만든 프로그램으로 2의 1000000000 (10억)승 계산한게 자랑"
http://gall.dcinside.com/list.php?id=hit&no=10262&page=1&bbs=


apfloat for java 라이브러리(http://www.apfloat.org/apfloat_java/) 이용해서 만든 건 안 자랑.

대신 금방 짰음.



Apint twoPow = ApintMath.pow(new Apint(2), 10000); 를 10억으로 고치면 결과가 나옴.

100억으로 고치면 int 범위 넘는다고 에러.

Apint twoPow = ApintMath.pow(new Apint(2), new Long("10000000000"));

Long 으로 고치면,

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at org.apfloat.internal.IntMemoryDataStorage.implCopyFrom(IntMemoryDataStorage.java:63)
at org.apfloat.spi.DataStorage.copyFrom(DataStorage.java:611)
at org.apfloat.internal.Int3NTTConvolutionStrategy.autoConvoluteOne(Int3NTTConvolutionStrategy.java:196)
at org.apfloat.internal.Int3NTTConvolutionStrategy.autoConvolute(Int3NTTConvolutionStrategy.java:178)
at org.apfloat.internal.Int3NTTConvolutionStrategy.convolute(Int3NTTConvolutionStrategy.java:117)
at org.apfloat.internal.IntApfloatImpl.multiply(IntApfloatImpl.java:1156)
at org.apfloat.Apfloat.multiply(Apfloat.java:733)
at org.apfloat.Apint.multiply(Apint.java:313)
at org.apfloat.ApintMath.pow(ApintMath.java:66)
at twopow.main(twopow.java:13)

이런 에러가 남.

64bit 자바로 하니 다른 에러가 났음.

Exception in thread "main" org.apfloat.internal.TransformLengthExceededException: Maximum transform length exceeded: 100663296 > 50331648
at org.apfloat.internal.IntFactor3SixStepNTTStrategy.transform(IntFactor3SixStepNTTStrategy.java:132)
at org.apfloat.internal.Int3NTTConvolutionStrategy.autoConvoluteOne(Int3NTTConvolutionStrategy.java:197)
at org.apfloat.internal.Int3NTTConvolutionStrategy.autoConvolute(Int3NTTConvolutionStrategy.java:178)
at org.apfloat.internal.Int3NTTConvolutionStrategy.convolute(Int3NTTConvolutionStrategy.java:117)
at org.apfloat.internal.IntApfloatImpl.multiply(IntApfloatImpl.java:1156)
at org.apfloat.Apfloat.multiply(Apfloat.java:733)
at org.apfloat.Apint.multiply(Apint.java:313)
at org.apfloat.ApintMath.pow(ApintMath.java:66)
at twopow.main(twopow.java:13)

그래서 크기를 줄이니까 2의 15억(1504780000)승 정도까지 가능.

크기는 431메가 나오고, AMD Athlon II X3 440 에서 1분 45초 걸렸음.




 

근데 내가 이걸 왜 하고 있는 걸까? ㅠㅠ

 

Posted by aaidee 아아이디
TAG

댓글을 달아 주세요

  1. Dr Dre Beats 2012.01.06 14:16 신고  댓글주소  수정/삭제  댓글쓰기

    하지만 꼭 그렇지 않아 너무 내 맘을 아프게 했지
    서로 말없이 걷기도 했지만 좋은 기억이었어
    너무 아쉬웠어.......

  2. Mujer Timberland 2012.12.25 15:43 신고  댓글주소  수정/삭제  댓글쓰기

    Flying supersonic jet was never cheap, http://www.timberlandbaratas.com Timberland shops. The Concorde jet was costly to run and maintain that led to high ticket prices, http://www.timberlandbaratas.com botas timberland. MiG jet flights in Russian MiG jets are even more expensive. A MiG 29 flight costs more than USD 15000 for the MiG flight only. And the cost to travel to Russia is not included in that basic price for Russian MiG flights. Advanced MiG flights like stratospheric Edge of Space flights cost even more for the MiG flight only, http://www.timberlandbaratas.com outlet timberland.Aviation freaks go crazy for this MiG flights, and many expect that this MiG jet flights will be over soon because the political situation has changed much in Russia, http://www.timberlandbaratas.com zapatos timberland. Rising nationalism and xenophobia surely do not help business bringing foreigners to Russian airbases for MiG flights, http://www.timberlandbaratas.com timberland. It might help that the financial situation for the Russian state worsened after falling oil and gas prices during the crisis in 2008/2009. It even seems that gaz prices might remain low thanks to shale gaz and LNG, http://www.timberlandbaratas.com Timberland, which hits the state-owned Russian gaz monopolist, Gazprom, quite hard.Related articles:


    http://sensechef.com/148 Buying cheap flights online is a good way to save money and even efforts that anyone can do

    http://dubai2u.tistory.com/25 Un homme de 85 ans et son fils de 55 ans ont péri dans la nuit de mercredi à jeudi dans l'incendie

  3. cheap oakley sunglasses 2013.07.16 10:39 신고  댓글주소  수정/삭제  댓글쓰기

    당신 매력있어, 자기가 얼마나 매력있는지 모르는게 당신매력이야