• jameslo

    Here's a patch that displays floats to 8 significant digits and finds the range of such numbers that have the same value. I didn't know how to handle zero so I just ignored it. I'm sure my algorithm for finding the range is naive, overly complicated, and buggy so you'd be wise to check the values before using them for anything important.
    float inspector.pd
    Screenshot 2026-08-28 110544.png

    Note that in this snapshot, the truncated number that Pd displays is not in the range of equivalent values, so the value of this number will change if you, for instance, enter all 8 digits into a message, save the patch, and then reload the patch.

    posted in technical issues read more
  • jameslo

    @whale-av WOW!!! THOSE ARE MAGNIFICENT!!! I used to get teased at work for using an HP50g, but if I had one of those I could've told everyone off.

    One of the search results suggested running a service in Java that exposes the BigDecimal API and all the operations (e.g. over OSC), so your idea isn't so far off, although the Arduino you'd have to use to implement the interface would probably have more computing power than both those calculators combined :)

    posted in technical issues read more
  • jameslo

    The Java library has an object called BigDecimal that implements arbitrary precision decimal numbers and the arithmetic for them. It allows you to do currency calculations without having to worry about the rounding issues inherent in floating point. c# has something similar but it has a smaller digit limit, I guess to allow it to run natively. Do you know of an external that does something like that for Pd?

    posted in technical issues read more
  • jameslo

    Hey @alexandros, did you look any further into why [expr ceil($f1)] isn't working on your installation? That seems so odd to me and I'm really curious about it.

    posted in technical issues read more
  • jameslo

    @ddw_music I think you mean %.8g because you have to count the leading '1' in [makefilename].

    Assuming I'm right, this is unfortunately making me feel more strongly about the shortcomings of Pd's number box truncation because 0.1 displays as 0.1 under [makefilename %.8g] whereas the problem in my original post displays as 255.00002. At the very least there ought to be a precision setting in each number box's properties. Like too many things in Pd, it feels perverse to have to tell a new user that in order to display a unique character sequence for a number, you have to turn it into a filename :) And gosh, it looks like SC has several numeric datatypes, ways to cast between them, and multiple ways to display each. How profligate! ;)

    posted in technical issues read more
  • jameslo

    @whale-av Your titles made me laugh anyway. If it wasn't my thread I would've suggested "horseshoes, hand grenades, and single precision floating point." Or now, maybe "Who is number 0.1? You are number 255"

    I was a software engineer for several life sciences and financial services companies and don't remember anything like 255 != 255, but we also had the luxury of more than one numeric datatype and a lot of formatting options.

    posted in technical issues read more
  • jameslo

    @ddw_music said:

    %.7g isn't enough, but %.8g seems to catch it.

    That Fortran discussion I linked to presented the number 1.00000048 as an example of a 9 digit decimal that has a SPFP value that's not representable in 8 decimal digits, but it appears to me that 1.0000005 works fine. How would you prove that 8 digits is sufficient for all SPFP numbers?

    posted in technical issues read more
  • jameslo

    @dreamer Finally! My intention was to solicit a whole bunch of funny titles and to make the thread playful, but I've obviously failed :) Yours wins unless someone posts something funny.

    posted in technical issues read more
  • jameslo

    @ddw_music Thanks again. If you wanted to see that truncated noisy digit (say, to debug a patch), how would you go about displaying it? The goal is to avoid the situation above where two floats have the same display but don't equal each other. Would [makefilename $.7g] suffice? Or would it have to be .8 or .9 as some argue in this discussion https://fortran-lang.discourse.group/t/how-many-significant-decimal-digits-for-real-single-precision/2287 And for all cases 7 8 or 9, it would mean that there could be different displays of floats that actually equal each other, correct?

    posted in technical issues read more
  • jameslo

    @ddw_music said:

    The assumption that floating point math is exact is basically a good way to set yourself up for confusion or disappointment. (That is, this isn't Pd's fault -- it's IEEE 754.)

    But what prevents Pd from displaying the inexact result, e.g. in the number box above [expr]? If the goal of patching is to make things more friendly for non-programmers, how is it helpful to hide it?

    posted in technical issues read more
  • jameslo

    @alexandros Hmm, that's not good. The ceiling of 255 is definitely not zero and that's preventing you from seeing the thing I wanted to draw attention to. Here's another version for you to try: weird poop 2.pd
    Screenshot 2026-08-14 050546.png

    posted in technical issues read more
  • jameslo

    @alexandros For modf or ceil?

    posted in technical issues read more
  • jameslo

    @porres I'm just looking for guidance on how to use it properly and what to expect from it. [cyclone/buffir~] states a limit in help, and [audiolab/pp.fft.partconv-st~] warned me that internal buffers had been exceeded. REAPER just silently ignores everything past 30 seconds.

    posted in technical issues read more
  • jameslo

    @alexandros After you do those 3 clicks, it computes the ceil(255) to be 256. On the first click it returned 255. I think it's an unfortunate side effect of the limited ability of floats to represent decimals together with how number boxes truncate, and so that second 255 is really a tiny bit larger.Screenshot 2026-08-13 063657.png

    posted in technical issues read more
  • jameslo

    @porres Do you recall programming any IR table size checks or warning messages regarding table size?

    posted in technical issues read more
  • jameslo

    Is there a maximum size for the impulse response table for [else/conv~]? I loaded a 30s one and got no warnings.

    Also, here's a tip: if you change the contents of the IR table, you have to switch away and switch back for it to take effect. I guess it's loading the table to internal buffers and skips loading it if the requested table has the same name as the previous one.

    posted in technical issues read more
  • jameslo

    nslookup returns the same IP address for both--is that meaningful? If so, it's weird that they require different credentials.

    posted in this forum read more
  • jameslo

    Someone on the plugdata discord asked about how to do this, but deleted their post before I could post my suggestion. I thought it was kind of fun to play with, so I'm posting it here in case you are as easily amused as I am :) I think it's interesting to watch the averaging happen as the frequency goes beyond the size of the wave table, more interesting than the interpolation.
    one cycle of wavetable.pd
    Screenshot 2026-07-09 172805.png

    posted in technical issues read more
  • jameslo

    @ddw_music 10 (all the way right) and 1 (all the way left).

    posted in technical issues read more
Internal error.

Oops! Looks like something went wrong!