Jump to content

lisp-help needed


Recommended Posts

thanx, but i see my idea don't work with that...

concrete: i want to split 2/20 into exactly '(2 20) 

 

function with numerator/denominator it will be '(1 10) - not what i need

 

also with (explode '2/20) => (1 / 1 0)

 

is there any solution?

Link to comment
Share on other sites

i know, but only mathematically!! -> you remember the problem with gen-stacc? => we discussed that with rangarajan?

for some functions it's necessary that 2/20 will not be "reduced" to 1/20

 

=> https://opusmodus.com/forums/topic/528-gen-stacc-question/#comment-1446

 

Quote

Yes, I have also experienced this difficulty, for example, can't distinguish between 4/4 and 2/2 because both reduce to 1! As JP points out, this is a Lisp issue, nothing to do with OM. If we are adventurous, we could implement our own "data type", for example keeping numerator and denominator separately as a cons pair (numerator . denominator) or something similar. We can write a set of functions that operate on this, and then apply reduction when actually needed. More work, of course, but Lisp gives you control.

 

Regards,

Rangarajan

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Terms of Use Privacy Policy