我想循環通過整數1:1000比較我創建函數的結果與R函數。具體來說,我有: floor.log2 = function(n) {
x = 1
i = 0
while (x <= n) {
x = 2*x
i = i + 1
}
print(i-1)
}
而且我想用比較: floor(log(n, base = 2))
我有如下表: public function up()
{
Schema::create('locations', function (Blueprint $table) {
$table->increments('id');
$table->string('location_name',50);
$table->integer('location_