PHP Indonesia - Facebook | PHP Indonesia is a community for everyone that loves PHP. Our focus is in the PHP world but our topics encompass the entire LAMP stack. Topics include PHP coding, to memcached handling, db optimizations, server stack, web server tuning, code deploying, hosting options and much much more. Youtube Channel : http://www.youtube.com/user/OurPHPIndonesia Twitter : @php_indonesia NOTE: Rules for Wall posting: https://www.facebook.com/groups/35688476100/doc/10151597056316101/ Daftar Keanggotaan : http://www.facebook.com/groups/35688476100/doc/10150671770741101/ | |
 | LSAT prep from HLS-educated instructors
LSATMax includes video lessons, unlimited personal attention & support, and over 6,000 real questions from previous LSAT's. Enroll for just $299.  | From our sponsors | | |
[help]gan, ane mau buat kondisi berhenti jika seli... Sep 30th 2013, 01:28, by Rere Saputra | [help]gan, ane mau buat kondisi berhenti jika selisih antara iterasi sekarang - iterasi sebelumnya (-0.5 < selisih && selisih < 0.5) misal:
Iterasi 1:
Array ( [0] => 2.2833750178913 [1] => -5.5330430128209 [2] => 1 ) iterasi 2: Array ( [0] => 1.3516058348271 [1] => -1.0537765826253 [2] => 1 ) iterasi 3: Array ( [0] => 1 [1] => -0.84529541177875 [2] => 1.3752366637024 ) kondisi akan berhenti pada iterasi ke 3 karena selisih antara iterasi 3 dengan iterasi 2 (-0.5 < selisih && selisih < 0.5) [0] => 1 - [0] => 1.3516058348271 (-0.5 < selisih && selisih < 0.5) [1] => -0.84529541177875 - [1] => -1.0537765826253 (-0.5 < selisih && selisih < 0.5) [2] => 1.3752366637024 - [2] => 1 (-0.5 < selisih && selisih < 0.5)
kemudian simpan/return iterasi 3 iterasi 3: Array ( [0] => 1 [1] => -0.84529541177875 [2] => 1.3752366637024 )
gimana cara menambahkan kondisi seprti diatas gan? berikut functionnya gan :3 mohon bantuan gan bingung gimana cara mengurangi iterasi dan temporarinya :3
http://pastebin.com/WsTj8rdX | | |
|
Tidak ada komentar:
Posting Komentar