<?xml version="1.0" encoding="UTF-8"?>
	<rss version="2.0"
		xmlns:content="http://purl.org/rss/1.0/modules/content/"
		xmlns:wfw="http://wellformedweb.org/CommentAPI/"
		xmlns:dc="http://purl.org/dc/elements/1.1/"
		xmlns:atom="http://www.w3.org/2005/Atom"

			>

	<channel>
		<title>Cycling 74  &#187;  Topic: expr %($f1)</title>
		<atom:link href="http://cycling74.com/forums/topic/expr-f1/feed" rel="self" type="application/rss+xml" />
		<link>http://cycling74.com/forums/topic/expr-f1/feed</link>
		<description></description>
		<pubDate>Wed, 19 Jun 2013 21:40:02 +0000</pubDate>
		<generator>http://bbpress.org/?v=2.2.4</generator>
		<language></language>

		
														
					
				<item>
					<guid>http://cycling74.com/forums/topic/expr-f1/#post-44904</guid>
					<title><![CDATA[expr %($f1)]]></title>
					<link>http://cycling74.com/forums/topic/expr-f1/#post-44904</link>
					<pubDate>Mon, 27 Jul 2009 06:36:24 +0000</pubDate>
					<dc:creator>Roman Thilenius</dc:creator>

					<description>
						<![CDATA[
						<p>i understand and accept that and why expr %($f1) cannot work<br />
but please how else could i write it?</p>
<p>maybe its just too simple for me, but i dont find a working<br />
expression on my own.</p>
<p>-110</p>
<p>
 </p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/expr-f1/#post-161676</guid>
					<title><![CDATA[Re: expr %($f1)]]></title>
					<link>http://cycling74.com/forums/topic/expr-f1/#post-161676</link>
					<pubDate>Mon, 27 Jul 2009 09:04:03 +0000</pubDate>
					<dc:creator>Ch</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Roman,</p>
<p>Is that what you trying to achieve ? :</p>
<p>[ expr $f1-int($f1/$f2)*$f2 ]</p>
<p>charles</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/expr-f1/#post-161677</guid>
					<title><![CDATA[Re: expr %($f1)]]></title>
					<link>http://cycling74.com/forums/topic/expr-f1/#post-161677</link>
					<pubDate>Mon, 27 Jul 2009 19:26:33 +0000</pubDate>
					<dc:creator>Peter Castine</dc:creator>

					<description>
						<![CDATA[
						<p>Since fmod() is the standard C math function for floating-point modulo, one might expect [expr fmod($f1, $f2)] to work.</p>
<p>Of course, it doesn&#8217;t.</p>
<p>One could file a feature request for expr to support fmod() (or, better still, a % float-operator).</p>
<p>In the meantime, there&#8217;s Ch&#8217;s suggestion.</p>
<p>And, of course, the % object, which started supporting floats in an early Max 4 release.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/expr-f1/#post-161678</guid>
					<title><![CDATA[Re: expr %($f1)]]></title>
					<link>http://cycling74.com/forums/topic/expr-f1/#post-161678</link>
					<pubDate>Mon, 27 Jul 2009 19:48:19 +0000</pubDate>
					<dc:creator>Roman Thilenius</dc:creator>

					<description>
						<![CDATA[
						<p>
thanks Ch, well hopefully you dont think i was just to lazy to<br />
do it myself but yesterday i wasnt able to make it myself.</p>
<p>i have never made a float % abstraction myself (back in OS9 <br />
when % did not support floats) because i simply never needed <br />
it to do floats, that is why i did not knew it offhand.</p>
<p>maybe i make one now.</p>
<p>but in this case i need stuff to work inside expr as this <br />
saves patchcords and improves timing.</p>
<p>
actually it is suprising that [expr] does not support &#8220;fmod&#8221; <br />
or &#8220;%&#8221;, which is probably a less excotic function than natural <br />
log (which noone ever uses) isnt it?</p>
<p>well, there will be a reason for it, we discussed the nature <br />
of calling expr´s function earlier.</p>
<p>
-110</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/expr-f1/#post-161679</guid>
					<title><![CDATA[Re: expr %($f1)]]></title>
					<link>http://cycling74.com/forums/topic/expr-f1/#post-161679</link>
					<pubDate>Tue, 28 Jul 2009 19:01:04 +0000</pubDate>
					<dc:creator>Peter Castine</dc:creator>

					<description>
						<![CDATA[
						<p>
<table border="0" align="center" width="90%" cellpadding="3" cellspacing="1">
<tr>
<td class="SmallText"><b>Roman Thilenius wrote on Mon, 27 July 2009 21:48</b></td>
</tr>
<tr>
<td class="quote">which is probably a less excotic function than natural <br />
log (which noone ever uses) isnt it?</td>
</tr>
</table>
</p><p>Claiming &#8220;no one ever uses&#8221; any given function is just begging, pleading to be contradicted, isn&#8217;t it?</p>
<p>Frankly, I use natural log as often as any of the trig/log functions. </p>
<p>But more to the point is the rather idiosyncratic choices made by expr of which functions from the C math library to support and which to ignore. fmod() would definitely be useful.</p>
<p>Ideally, expr should support all the functions in ISO/IEC 9899:1999 that simply return a value. (ie, functions like frexp(double, int *) with a secondary return value as a pointer argument won&#8217;t fit into the expr paradigm).</p>
<p>Does Cycling 74 need an &#8216;official&#8217; bug report to do anything about this?</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/expr-f1/#post-161680</guid>
					<title><![CDATA[Re: expr %($f1)]]></title>
					<link>http://cycling74.com/forums/topic/expr-f1/#post-161680</link>
					<pubDate>Fri, 31 Jul 2009 01:12:39 +0000</pubDate>
					<dc:creator>Roman Thilenius</dc:creator>

					<description>
						<![CDATA[
						<p>peter, ch,</p>
<p>i just found out that</p>
<p>[expr $f1 % $f2]</p>
<p>is how it actually works!</p>
<p>
thats already the second new thing i learned about expr/if<br />
this week. the whole thing seems to be more inconsistent than<br />
in your most wet dream.</p>
<p>
-110</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/expr-f1/#post-161681</guid>
					<title><![CDATA[Re: expr %($f1)]]></title>
					<link>http://cycling74.com/forums/topic/expr-f1/#post-161681</link>
					<pubDate>Fri, 31 Jul 2009 06:49:56 +0000</pubDate>
					<dc:creator>Ch</dc:creator>

					<description>
						<![CDATA[
						<p>
What do you mean Roman?</p>
<p>[expr $f1 % $f2] outputs the same result as [expr $i1 % $i2],<br />
which is not what i expect.<br />
the only difference is that if $f2 is between 0. and 1., then max crashes (the divide by 0 isn&#8217;t detected).</p>
<p>by the way, a nice thing about expr that is stated in the reference :<br />
&#8220;Additional functions can be added by means of external code resources placed in Max&#8217;s startup folder.&#8221;<br />
Have you ever tried that?</p>
<p>Charles</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/expr-f1/#post-161682</guid>
					<title><![CDATA[Re: expr %($f1)]]></title>
					<link>http://cycling74.com/forums/topic/expr-f1/#post-161682</link>
					<pubDate>Fri, 31 Jul 2009 17:23:10 +0000</pubDate>
					<dc:creator>Roman Thilenius</dc:creator>

					<description>
						<![CDATA[
						<p>
<table border="0" align="center" width="90%" cellpadding="3" cellspacing="1">
<tr>
<td class="SmallText"><b>Ch wrote on Fri, 31 July 2009 08:49</b></td>
</tr>
<tr>
<td class="quote">
What do you mean Roman?</td></tr></table></p>



<p>
you are right, it does not do float.</p>
<p>but the % sign alone was a surprise for me &#8211; i mainly asked<br />
for a formula because i thought % would not work at all.</p>
<p>somehow i tend to think that everything which is fully <br />
supported by the object is noted in the helpfile.</p>
<p>(like i said in the other thread the only additional &#8220;undocumented&#8221; <br />
feature i knew about was comparison operators.)</p>
<p><table border="0" align="center" width="90%" cellpadding="3" cellspacing="1">
<tr>
<td class="SmallText"><b>Quote:</b></td>
</tr>
<tr>
<td class="quote">
&#8220;Additional functions can be added by means of external code resources placed in Max&#8217;s startup folder.&#8221;<br />
Have you ever tried that?</td></tr></table></p>
<p>Charles


</p><p>
whoa. no!</p>
<p><img src="images/smiley_icons/icon_smile.gif" border=0 alt="Smile"/></p>
<p>and i assume i would need to write c classes for that &#8230; </p>
<p>but i dont have time to discuss that now, as i am going to <br />
implement a coffeemachine in my startup folder asap.</p>
<p>
-110</p>
<p>
.</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

