Jump to content

2Tessa

Resident
  • Posts

    516
  • Joined

  • Last visited

Reputation

1,859 Excellent

4 Followers

Retained

  • Member Title
    πŸ‘½ Sandbox Resident :)

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. You are right. I subscribed the Plus, not the Basic. Which gives 150L$ per week stipend. Basic has no stipend. πŸ˜‹
  2. After i got ejected by the sandbox where i was renting, I canceled my Basic membership, that had the only purpose to pay the rent. Now, they closed my shop and suspended my account. So the Basic subscription have been a very bad idea... πŸ€” PS: I mean Plus membership
  3. Guest of CHONK sandbox 😁 🐺🦊😹
  4. Banned in Shiromani sandbox πŸ€” Because of scripting or because i don't reply to unknown guys? πŸ˜‚
  5. PRIM_PROJECTOR is working ONLY if the projected texture is in the object inventory. The wiki should mention about this requirement.
  6. int_value = fui(fl_value); int_value += 127 << 23; int_value = int_value >> 1; fl_result = iuf(int_value); this simple code works as SQRT for large float values: llSqrt( 3.40282346e38 ) gives: 1.84467429e19 bitwiseSqrt( 3.40282346e38 ) gives: -1.84467429e19 only the sign is wrong but lose precision for small values: llSqrt( 2 ) gives: 1.41421353 bitwiseSqrt( 2 ) gives: 1.5 πŸ˜†
  7. Very interesting to know that float can be stored into integer πŸ˜€ //================================================================= // Float Union Integer (see LSL wiki) integer fui(float input) { if((input) != 0.0){ integer sign = (input < 0) << 31; if((input = llFabs(input)) < 2.3509887016445750159374730744445e-38) return sign | (integer)(input / 1.4012984643248170709237295832899e-45); integer exp = llFloor((llLog(input) / 0.69314718055994530941723212145818)); return (0x7FFFFF & (integer)(input * (0x1000000 >> sign))) | (((exp + 126 + (sign = ((integer)input - (3 <= (input /= (float)("0x1p"+(string)(exp -= ((exp >> 31) | 1)))))))) << 23 ) | sign); } return ((string)input == (string)(-0.0)) << 31; } float iuf(integer input) { return llPow(2.0, (input | !input) - 150) * (((!!(input = (0xff & (input >> 23)))) << 23) | ((input & 0x7fffff))) * (1 | (input >> 31)); } //----------------------------------------------------------------- float e = 2.71828182845904523536028747135266249; integer inte; float floe; default { touch_start(integer tot_num) { llOwnerSay("Float Union Integer (float stored into integer and way back)"); llOwnerSay("e: "+Float2Sci(e)); // does not truncate the decimals inte = fui(e); llOwnerSay("inte = fui(e): "+(string)inte); floe = iuf(inte); llOwnerSay("floe = iuf(inte): "+Float2Sci(floe)); // does not truncate the decimals llOwnerSay("floe = iuf(inte): "+(string)floe+" (typecasted)"); } }
  8. As alternatives of: llSqrt( llFrand(1) ) I tried: llPow( e , 0.5 * llLog( llFrand(1) ) ) llPow( 10 , 0.5 * llLog10( llFrand(1) ) ) llPow( llFrand(1) , 0.5 ) but even the single call of them [ llPow(), llLog(), llLog10() ] is 50-100% slower than llSqrt() πŸ˜†
×
×
  • Create New...