• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 20:10
CEST 02:10
KST 09:10
  • 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
Maestros of the Game: Week 1/Play-in Preview2[ASL20] Ro24 Preview Pt2: Take-Off7[ASL20] Ro24 Preview Pt1: Runway132v2 & SC: Evo Complete: Weekend Double Feature4Team Liquid Map Contest #21 - Presented by Monster Energy9
Community News
Weekly Cups (Aug 18-24): herO dethrones MaxPax6Maestros of The Game—$20k event w/ live finals in Paris34Weekly Cups (Aug 11-17): MaxPax triples again!13Weekly Cups (Aug 4-10): MaxPax wins a triple6SC2's Safe House 2 - October 18 & 195
StarCraft 2
General
Greatest Players of All Time: 2025 Update Maestros of the Game: Week 1/Play-in Preview BoxeR's Wings Episode 2 - Fan Translation A Eulogy for the Six Pool #1: Maru - Greatest Players of All Time
Tourneys
LiuLi Cup - August 2025 Tournaments $5,000 WardiTV Summer Championship 2025 Maestros of The Game—$20k event w/ live finals in Paris $5,100+ SEL Season 2 Championship (SC: Evo) Esports World Cup 2025
Strategy
Custom Maps
External Content
Mutation # 488 What Goes Around Mutation # 487 Think Fast Mutation # 486 Watch the Skies Mutation # 485 Death from Below
Brood War
General
Easiest luckies way to get out of Asl groups Post ASL20 Ro24 discussion. BGH Auto Balance -> http://bghmmr.eu/ BW General Discussion No Rain in ASL20?
Tourneys
[IPSL] CSLAN Review and CSLPRO Reimagined! [ASL20] Ro24 Group F [ASL20] Ro24 Group E [ASL20] Ro24 Group D
Strategy
Muta micro map competition Simple Questions, Simple Answers Fighting Spirit mining rates [G] Mineral Boosting
Other Games
General Games
Stormgate/Frost Giant Megathread Mechabellum Path of Exile General RTS Discussion Thread Nintendo Switch Thread
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Canadian Politics Mega-thread Russo-Ukrainian War Thread The year 2050
Fan Clubs
INnoVation Fan Club SKT1 Classic Fan Club!
Media & Entertainment
Anime Discussion Thread Movie Discussion! [Manga] One Piece [\m/] Heavy Metal Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread High temperatures on bridge(s) Gtx660 graphics card replacement
TL Community
The Automated Ban List TeamLiquid Team Shirt On Sale
Blogs
Lemme tell you a thing o…
JoinTheRain
How Culture and Conflict Imp…
TrAiDoS
RTS Design in Hypercoven
a11
Evil Gacha Games and the…
ffswowsucks
INDEPENDIENTE LA CTM
XenOsky
Customize Sidebar...

Website Feedback

Closed Threads



Active: 835 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
Code For Giants Cup
22:30
#25
CosmosSc2 74
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
PiGStarcraft409
Nathanias 99
CosmosSc2 74
NeuroSwarm 33
StarCraft: Brood War
Shuttle 639
NaDa 38
Super Smash Bros
C9.Mang0394
hungrybox388
Other Games
tarik_tv23013
gofns19778
summit1g5773
FrodaN1914
Grubby1525
WinterStarcraft231
KnowMe208
RotterdaM152
ViBE70
PPMD27
JuggernautJason11
Organizations
Other Games
gamesdonequick1373
BasetradeTV289
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 16 non-featured ]
StarCraft 2
• Berry_CruncH87
• davetesta46
• poizon28 9
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• iopq 3
• Azhi_Dahaki1
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Other Games
• imaqtpie796
Upcoming Events
SC Evo League
11h 50m
TaeJa vs Cure
Rogue vs threepoint
ByuN vs Creator
MaNa vs Classic
Maestros of the Game
15h 50m
ShoWTimE vs Cham
GuMiho vs Ryung
Zoun vs Spirit
Rogue vs MaNa
[BSL 2025] Weekly
17h 50m
SC Evo League
1d 11h
Maestros of the Game
1d 15h
SHIN vs Creator
Astrea vs Lambo
Bunny vs SKillous
HeRoMaRinE vs TriGGeR
BSL Team Wars
1d 18h
Team Bonyth vs Team Sziky
BSL Team Wars
1d 18h
Team Dewalt vs Team Sziky
Monday Night Weeklies
2 days
Replay Cast
2 days
Sparkling Tuna Cup
3 days
[ Show More ]
PiGosaur Monday
3 days
LiuLi Cup
4 days
Replay Cast
4 days
The PondCast
5 days
RSL Revival
5 days
Maru vs SHIN
MaNa vs MaxPax
RSL Revival
6 days
Reynor vs Astrea
Classic vs sOs
BSL Team Wars
6 days
Team Bonyth vs Team Dewalt
Liquipedia Results

Completed

Acropolis #4 - TS1
WardiTV Summer 2025
HCC Europe

Ongoing

Copa Latinoamericana 4
BSL 20 Team Wars
KCM Race Survival 2025 Season 3
BSL 21 Qualifiers
ASL Season 20
CSL Season 18: Qualifier 2
SEL Season 2 Championship
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
BLAST.tv Austin Major 2025

Upcoming

CSL 2025 AUTUMN (S18)
LASL Season 20
BSL Season 21
BSL 21 Team A
Chzzk MurlocKing SC1 vs SC2 Cup #2
Maestros of the Game
EC S1
Sisters' Call Cup
Skyesports Masters 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
MESA Nomadic Masters Fall
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 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.