Modulo for Float



  • The modulo setting of the Calculator actor only appears to work with integers.

    Be nice if it worked for floats too!


  • it does if you send the value through a float to integer first ;)



  • does this do what you want - is it possible to add attatchments?



  • emailed you file as i cant see how to attach file



  • I don't think that works but I could be misreading the patch.

    Here are my solutions:
    http://dl.dropbox.com/u/3202702/float%20mod.izz

  • Tech Staff

    Hello Nick

    I can see that the "Attach a file" function is dissabled for Members. Don't know why Mark didn't activate it yet. Hopefully he does it soon.

    Best,
    Michel



  • I believe I've enabled attachments for members. Please give it a try and let me know.

    But on to the topic of modulo arithmetic, from the wiki on the subject:
    "In mathematics, modular arithmetic (sometimes called clock arithmetic) is a system of arithmetic for **_integers_**"
    In other words, the notion of modulo is not defined for floating point (real) numbers.
    However, one solution is to multiply your floating point number by some value, e.g., 1000\. The do the modulo, and divide the result by 1000\. Does that give you what you want?
    Best Wishes,
    Mark


  • I can see it now - but it fails as uploading - file type is not allowed - for a file of type .izz


  • Tech Staff

    I think you will have to zip izz files


  • Tech Staff

    Hello Nick

    you have to .zip your file that have extensions other than the common .jpg .tiff .pdf etc.

    @Mark: To allow more extensions to be uploaded especially .izz, you will find in the folder where you have installed the forum the file conf-->config.php. In config.php add the following line (all should be in one line) and add or delete the extensions you want to allow
    $Configuration['Garden']['Upload']['AllowedFileExtensions'] = array('txt','jpg','jpeg','gif','png','bmp','tiff','ico','zip','gz','tar.gz','tgz','psd','pdf','doc','xls','ppt','docx','xlsx','log','rar','7z','izz');

    place the line above after this one
    $Configuration['Garden']['Update']['Count'] = 1;

    Best,
    Michel



  • Mark, integers, ah ok and multiplying by a large number, yes that's what I did (see patch).

    In the spirit of this thread I am attaching the file again, for no reason other than to test the attachment feature!
    Isadora forum won't let you upload .izz files! Love it!

    665bd0-float-mod.izz.zip



  • Dear Gavin,

    Thanks for the patch... I'll follow Michel's instructions to add the other file types.
    Best WIshes,
    Mark


  • This is a test to see if I can upload an isadora file... 92a4a3-isadora-test-upload.izz


Log in to reply
 

Looks like your connection to TroikaTronix Community Forum was lost, please wait while we try to reconnect.