• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 16:47
CEST 22:47
KST 05:47
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
[ASL20] Finals Preview: Arrival6TL.net Map Contest #21: Voting10[ASL20] Ro4 Preview: Descent11Team TLMC #5: Winners Announced!3[ASL20] Ro8 Preview Pt2: Holding On9
Community News
Merivale 8 Open - LAN - Stellar Fest0Chinese SC2 server to reopen; live all-star event in Hangzhou21Weekly Cups (Oct 13-19): Clem Goes for Four3BSL Team A vs Koreans - Sat-Sun 16:00 CET10Weekly Cups (Oct 6-12): Four star herO8
StarCraft 2
General
RotterdaM "Serral is the GOAT, and it's not close" Chinese SC2 server to reopen; live all-star event in Hangzhou The New Patch Killed Mech! Weekly Cups (Oct 13-19): Clem Goes for Four 5.0.15 Patch Balance Hotfix (2025-10-8)
Tourneys
Merivale 8 Open - LAN - Stellar Fest Tenacious Turtle Tussle RSL Season 3 Qualifier Links and Dates $1,200 WardiTV October (Oct 21st-31st) SC2's Safe House 2 - October 18 & 19
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 496 Endless Infection Mutation # 495 Rest In Peace Mutation # 494 Unstable Environment Mutation # 493 Quick Killers
Brood War
General
Is there anyway to get a private coach? BGH Auto Balance -> http://bghmmr.eu/ [ASL20] Finals Preview: Arrival BSL Team A vs Koreans - Sat-Sun 16:00 CET OGN to release AI-upscaled StarLeague from Feb 24
Tourneys
[ASL20] Grand Finals ASL final tickets help Small VOD Thread 2.0 [Megathread] Daily Proleagues
Strategy
Roaring Currents ASL final Simple Questions, Simple Answers Relatively freeroll strategies BW - ajfirecracker Strategy & Training
Other Games
General Games
General RTS Discussion Thread Stormgate/Frost Giant Megathread Nintendo Switch Thread Path of Exile Dawn of War IV
Dota 2
Official 'what is Dota anymore' discussion LiquidDota to reintegrate into TL.net
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread SPIRED by.ASL Mafia {211640}
Community
General
Russo-Ukrainian War Thread US Politics Mega-thread Things Aren’t Peaceful in Palestine YouTube Thread The Chess Thread
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
Anime Discussion Thread [Manga] One Piece Korean Music Discussion Series you have seen recently... Movie Discussion!
Sports
2024 - 2026 Football Thread MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023 Formula 1 Discussion NBA General Discussion
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Recent Gifted Posts
Blogs
The Benefits Of Limited Comm…
TrAiDoS
Sabrina was soooo lame on S…
Peanutsc
Our Last Hope in th…
KrillinFromwales
Certified Crazy
Hildegard
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1717 users

Pi approximation - Page 2

Blogs > Vin{MBL}
Post a Reply
Prev 1 2 All
Insane
Profile Blog Joined November 2003
United States4991 Posts
Last Edited: 2008-04-06 03:35:21
April 06 2008 03:33 GMT
#21
On April 06 2008 12:30 Vin{MBL} wrote:
hahaha nice!

Why did you use 1.0 and 3.0 instead of just 3 and 1 though?

Because 1 / 3 = 0 (due to integer <strike>rounding</strike> truncation)
I guess I could have just used 1 / n and had n be 3.0 or used 1.0 / n and just had n be an integer, but if you have both n = 3 and 1 / n, then the parens part will turn out to be 0 each iteration.
Edit: changed rounding to truncation to be more accurate about what the comp does.
Vin{MBL}
Profile Blog Joined September 2006
5185 Posts
April 06 2008 03:36 GMT
#22
ahh so putting that .0 there is just telling it not to round off right?
Insane
Profile Blog Joined November 2003
United States4991 Posts
April 06 2008 03:37 GMT
#23
On April 06 2008 12:36 Vin{MBL} wrote:
ahh so putting that .0 there is just telling it not to round off right?


Hm yeah basically.
In operations involving integers, the result will be an int (so if there is some remainder, it just gets cut off). If you make one of them not an int, then the result won't be an int.
drop
Profile Blog Joined August 2007
Romania306 Posts
April 06 2008 03:38 GMT
#24
On April 06 2008 12:08 HnR)Insane wrote:
Show nested quote +
On April 06 2008 12:05 drop wrote:
atkins diet :D

Vin - I advise you to use the Excel VBA btw (I know it's not the best, but you will probably use it at work one day - so start getting used to it)

anyway, does any of you have any examples of more complicated VBA macros? I mean I can make the algorythms, but I dont know the syntax too well (e.g. it took me some time to figure out the:
Worksheets("1").Cells(1, 1) = Pi in Excel)


This sounds like a terrible way to learn programming, and I've never had to know VBA anywhere -0-
It depends upon what sort of job you are going into, I guess.


Well, I would expect to find MS Excel nearly everywhere (actually not that obvious, sometimes they cut the costs..), while in order to use any other language you need some sort of compilator. If you work on any important data, you probably cant access the internet, nor use a pendrive too - so you wont be able to download it.

perhaps you are a programmer

after I've seen an insurance company working on an acesss database I lost all faith anyway..
Insane
Profile Blog Joined November 2003
United States4991 Posts
Last Edited: 2008-04-06 03:50:35
April 06 2008 03:50 GMT
#25
On April 06 2008 12:38 drop wrote:
Show nested quote +
On April 06 2008 12:08 HnR)Insane wrote:
On April 06 2008 12:05 drop wrote:
atkins diet :D

Vin - I advise you to use the Excel VBA btw (I know it's not the best, but you will probably use it at work one day - so start getting used to it)

anyway, does any of you have any examples of more complicated VBA macros? I mean I can make the algorythms, but I dont know the syntax too well (e.g. it took me some time to figure out the:
Worksheets("1").Cells(1, 1) = Pi in Excel)


This sounds like a terrible way to learn programming, and I've never had to know VBA anywhere -0-
It depends upon what sort of job you are going into, I guess.


perhaps you are a programmer

Yeah basically.
Vin{MBL}
Profile Blog Joined September 2006
5185 Posts
April 06 2008 04:39 GMT
#26
What book(s) do you guys recommend for Python and Java?
Insane
Profile Blog Joined November 2003
United States4991 Posts
Last Edited: 2008-04-06 05:43:06
April 06 2008 05:40 GMT
#27
No idea, as I've never learned Python, and I never used a textbook when learning Java.
One of the lecturers who teaches intro to programming at my university wrote a book, I can't say anything about the quality of it not having read it, however.
http://www.cs.washington.edu/education/courses/cse142/06sp/chapters/bookchapters.html
[those are the pre-release chapters, if you want the latest version you have to shell out money, I think]
edit: shit, just noticed the links are dead on that page, lol
http://www.cs.washington.edu/education/courses/cse142/06wi/chapters/bookchapters.html
this one works, though
Insane
Profile Blog Joined November 2003
United States4991 Posts
April 06 2008 05:45 GMT
#28
Also if you're looking to have fun with programming, try solving the problems here
http://projecteuler.net/
[click on the problems link near the top of the page if you just scrolled down and got lost ]
Prev 1 2 All
Please log in or register to reply.
Live Events Refresh
Next event in 11h 13m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
White-Ra 151
SpeCial 143
ProTech88
Railgan 68
JuggernautJason5
StarCraft: Brood War
Britney 20452
Artosis 892
ZZZero.O 161
Dewaltoss 125
NaDa 8
Dota 2
syndereN357
capcasts77
LuMiX1
Counter-Strike
fl0m1633
Super Smash Bros
Mew2King51
Heroes of the Storm
Liquid`Hasu431
Khaldor290
Other Games
FrodaN2867
Grubby2305
Mlord525
Beastyqt523
summit1g413
shahzam300
Skadoodle202
KnowMe151
ViBE2
Organizations
Other Games
gamesdonequick885
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 15 non-featured ]
StarCraft 2
• printf 53
• HeavenSC 38
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• masondota21046
Other Games
• imaqtpie1340
• Shiphtur209
Upcoming Events
Afreeca Starleague
11h 13m
Snow vs Soma
Sparkling Tuna Cup
13h 13m
WardiTV Invitational
15h 13m
CrankTV Team League
16h 13m
BASILISK vs Streamerzone
Team Liquid vs Shopify Rebellion
Team Vitality vs Team Falcon
BSL Team A[vengers]
18h 13m
Gypsy vs nOOB
JDConan vs Scan
RSL Revival
20h 13m
Wardi Open
1d 15h
CrankTV Team League
1d 16h
Replay Cast
2 days
WardiTV Invitational
2 days
[ Show More ]
CrankTV Team League
2 days
Replay Cast
3 days
CrankTV Team League
3 days
Replay Cast
4 days
The PondCast
4 days
CrankTV Team League
4 days
Replay Cast
5 days
WardiTV Invitational
5 days
CrankTV Team League
5 days
Replay Cast
6 days
Liquipedia Results

Completed

Acropolis #4 - TS2
WardiTV TLMC #15
HCC Europe

Ongoing

BSL 21 Points
ASL Season 20
CSL 2025 AUTUMN (S18)
C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
EC S1
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025

Upcoming

SC4ALL: Brood War
BSL Season 21
BSL 21 Team A
BSL 21 Non-Korean Championship
RSL Offline Finals
RSL Revival: Season 3
Stellar Fest
SC4ALL: StarCraft II
CranK Gathers Season 2: SC II Pro Teams
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.