Tham khảo tài liệu 'it-programing help part 94', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Related Exp Example x Log 1000 returns y Log10 1000 returns 3 user-defined function for common log Func Log10 x Return Log x Log 10 10 is the base EndFunc Function Reference Mod chia lấy phần dư. Mod valuel value2 Parameters valuel số bị chia value2 số chia Return Value Success trả lại số Failure trả lại -1. nếu lỗi chia cho 0. Remarks ham co the lam viec voi ca so thuc Related None. Example n 18 If mod n 2 0 Then MsgBox 0 n is an even number. Else MsgBox 0 n is an odd number. EndIf x mod 4 7 x 4 because the divisor dividend y mod 1 3 4 y because the divisor is a float Function Reference Random tra lai mot so ngau nhien. Random Min Max Flag Parameters Min gioi han gia tri nhd nhat co the dat de mac dinh 0 Max gioi han gia tri lon nhat co the dat de mac dinh 1. Flag 0 lay so thuc mac dinh 1 chi lay so nguyen Return Value Success so Failure tra lai 0 va set @error 1 neu tham so ko hop le Remarks By default the Random function works with decimal floating point numbers. If you want to only have integer whole number results then set the Flag to 1. If only one argument is provided then it is interpreted to be the Max. The result will be in the range of Min to Max INCLUSIVE when using integers just short of Max when using floats . When using integers Max-Min must be less than 2A31. Comments based on the original source This function uses the Mersenne Twister random number generator MT19937 written by Takuji Nishimura Makoto Matsumoto Shawn Cokus Matthe Bellew and Isaku Wada. The Mersenne Twister is an algorithm for generating random numbers. It was designed with consideration of the flaws in various other generators. The period 219937-1 and the order of equidistribution 623 dimensions are far greater. The generator is also fast it avoids multiplication and division and it benefits from caches and pipelines. For more information see the inventors web page at http m-mat MT .