Results don't display negative numbers

I have an application that accepts a 24 bit number and does some simple mathematical operations (see attached).  If number 3(a probe) receives a number lower than the constant that is being subtracted from it, which should result in a negative number, number 6(probe) displays a much larger, positive integer.
I'm sure that I must be missing something simple somewhere.
I thank you for your help in advance.
Ron Deavers, CLD
Attachments:
NumberError.bmp ‏114 KB

Thank you very much. I didn't realize the difference between unsigned integer and integer.
Ron Deavers, CLD

Similar Messages

  • Displaying negative numbers in brackets in Excel output

    Hello all.
    I have an RTF template...I tired displaying negative numbers in brackets like : (123.80) in Excel output
    But, this is working in PDF and not in Excel.
    Please let me know the way to dsiplay the numbers in brackets.

    varma wrote:
    Negative numbers in bracket
    add a conditional statement like below.
    <?if: NUMBER_TO_CHECK < 0?> <?concat('(',NUMBER_TO_CHECK,')')?><?end if?>
    <?if: NUMBER_TO_CHECK > 0?> <?NUMBER_TO_CHECK?><?end if?>
    are you using the same template for PDF and EXCEL ?
    if so, it has to be handled little differently.
    Place this line in the beginning of the rtf
    <?param@begin:_xf;''?>
    add this condition on number column for Excel output
    <?if:$_xf='excel' and NUMBER_TO_CHECK < 0?> <?concat('(',NUMBER_TO_CHECK,')')?><?end if?>
    Try the above one it should work.
    Have a Nice dayThis didnt work.
    Say that I have element named 'market'
    I placed this condiion <?param@begin:_xf;''?> at the beginningof RTF
    Replaced the number field with this condition: <?if:$_xf='excel' and market< 0?> <?concat('(',market,')')?><?end if?>
    This is giving me a blank output in place of the number.
    >

  • Wi-Fi Connection Time Displays Negative Numbers

    Using an AEBS with the latest firmware 7.6.2 and OS X 10.7.2.  The Wi-Fi connection time appears to randomly start displaying negative numbers. It then counts down (up?) to zero and then displays positive numbers. Anyone else seen this?
    Regards.

    I have the same problem (Macbook 2008, 10.6.8 airport extreme 7.6). Has there been a fix? How do I report this bug, which seems to be affecting older machines as well? It's somewhat amusing, but is starting to become annoying.
    Melinda

  • Display Negative numbers

    Hi,
    I am using JDeveloper 11.1.1.5
    One of an ADF page is expected to display negative number and also follow the number format pattern as shown below. I am not able to display negative numbers. Can anyone help here please?
    Below is my code snippet.
    VO.xml ::
         <ViewAttribute
         Name="TotalDue"
         IsUpdateable="false"
         IsPersistent="false"
         PrecisionRule="true"
         Precision="15"
         Scale="2"
         Type="java.math.BigDecimal"
         ColumnType="NUMBER"
         AliasName="NET_DUE_INVESTOR"
         Expression="NET_DUE_INVESTOR"
         SQLType="NUMERIC">
         <DesignTime>
         <Attr Name="_DisplaySize" Value="22"/>
         </DesignTime>
         <Properties>
         <SchemaBasedProperties>
              <LABEL
              ResId="NET_DUE_TOFROM_INVESTOR"/>
              <FMT_FORMATTER
              ResId="com.ahmsi.isams.liquidation.model.vo.Liquidation332FormView.TotalDue_FMT_FORMATTER"/>
              <FMT_FORMAT
              ResId="com.ahmsi.isams.liquidation.model.vo.Liquidation332FormView.TotalDue_FMT_FORMAT"/>
         </SchemaBasedProperties>
         </Properties>
         </ViewAttribute>
    ModelBundleProperties ::
         TotalDue_FMT_FORMATTER=oracle.jbo.format.DefaultNumberFormatter
         TotalDue_FMT_FORMAT=\#,\#\#\#,\#\#\#,\#\#\#,\#\#0.00;(\#,\#\#\#,\#\#\#,\#\#\#,\#\#0.00)
    myjsfpage.jsf ::
         <af:outputText value="#{bindings.TotalDue.inputValue}"
              id="ot5141" inlineStyle="font-weight:bold;">
         <af:convertNumber groupingUsed="false"
                   pattern="#{bindings.TotalDue.format}"/>
         </af:outputText>

    Got it correct now. I changed the pattern as below. Also added a nowrap=true on the output text
    ModelBundleProperties ::
    TotalDue_FMT_FORMATTER=oracle.jbo.format.DefaultNumberFormatter
    TotalDue_FMT_FORMAT=\#,\#\#\#,\#\#\#,\#\#\#,\#\#0.00;-\#,\#\#\#,\#\#\#,\#\#\#,\#\#0.00
    Thank you all for your directions.
    Thanks,
    Prashant

  • My WiFi signal is displaying negative numbers instead of signal strength.

    Recently my Ipod 3rd gen. has been getting real weird with the wifi. first, it would always lose signal whenever i would do anything, like watch videos or open an app that required wifi. if i moved a couple feet it'd start to connect again. Then it started displaying a "-87" where the wifi signal would be. and the number would either increase or decresase, until i tried doing something that requird wifi. at first it would only come on whenever i restarted my ipod and itd quickly lose signal. ive restorede my ipod 3 times today, dumped everything. ive tried jailbreaking it to see if itd refresh files or anything. im not sure what to do anymore. ive looked for hours online and cant seem to find anyone with this problem. Any suggestions or ideas? without me buying a new one. i don't have a warranty..
    Message was edited by: jbiggie1130

    Interesting. The -87 refers to signal strength in db, which I believe are decibels. The lower the number, the stronger the signal.
    However, iPods don't display these numbers unless you have jailbroken the device or are using an app like WiFinder (since removed from the App Store).
    And since you have jailbroken the device we can't, by the terms of service of this site, offer you any advice other than to refer you to help article on WiFi: http://support.apple.com/kb/TS1398

  • Displaying negative numbers under certain conditions

    I have a Crystal Report which I am developing and need to display positive numbers as negative, but only under certain conditions.  I did not see anything on this type of questions so I decided to join and post it up myself.  This is a transfer report so if the location number entered in the parameter list is the SHIPPING location, I need to display retail, cost, and totals as negative.  Here is the formula which I came up with for ext cost, but it is returning all zeros.  I cannot seperate the to and from locations in the parameters because this report needs to display both in and out of that location.
    if totext({?loc}) = totext({Command.SHIP_FROM}) then ({Command.EXT_COST}*-1)
    Any suggestions?  Appreciate the help!

    Hi Jon,
    If it returns zeroes, then it means that this part of the code fails:
    totext({?loc}) = totext({Command.SHIP_FROM})
    Do you have records where the value entered in the 'loc' prompt matches with records in the SHIP_FROM column on the report?
    See if this helps:
    if totext({?loc},0,"") = totext({Command.SHIP_FROM},0,"") then ({Command.EXT_COST}*-1)
    -Abhilash

  • Calculator don't display numbers after comma in RPN mode

    Hello,
    In RPN mode, calculator don't display the numbers after the comma in the stack.
    Exemple :
    12345
    Enter
    0,12345
    Enter
    The calculator stack now shows :
    12345
    0 <-- should be 0,12345
    OSX : 10.5.1 (French)
    PowerBook G4 17" 1,5GHz
    Pascal

    I'm not going to create a new thread for this but the calculator has some SERIOUS problems.
    In scientific (yeah, right) mode, try dividing -1 by 2 and you'll see that it is, despite all the math you might think you know, POSITIVE one-half. (You probably thought dividing a negative number by a positive one would give you a negative number. You silly.)
    Also, while I'm resurrecting old and ignored threads, why can't the Programmer mode have a "word size" similar to the significant digits size for the other modes? Trying to do a series of shift operations on a 16 or 8 bit number is utterly inconvenient when it shows me 64 bit mode only.
    I suppose I can just keep my HP calculator next to computer for now since it's 17 years old, does RPN perfectly, and knows how to do basic math properly, but that seems to be missing the point that the Calculator should work right.

  • Logical shift negative numbers

    So, I think i have found a bug in Labview.  I am using Labview 8.5
    I have a very very simple Vi Where i want to Right shift a negative number.  For example:
    -16 >> 2 = -4
    What i get is 16380.  If I mismatch the data types.  Meaning I right shift from a 16 integar and place the result into a 8 bit integar I get -4.  
    It would appear that the function is padding with leading zeros and not ones when handling negative numbers.   
    Is this an issue that has been fixed already?  Or am i using the function incorrectly?
    Attachments:
    Logical Shift bug.vi ‏7 KB

    Gruntboy,
         What I think you're looking for is an arithmetic shift function, while the function in Labview is a logical shift.  The difference is in the leading bit of the result when they shift a number to the right.  A logical shift right pads the numbers with '0's and an arithmetic shift right pads the numbers with their copies of their most significant bit.  This is very important when dealing with signed numbers, because the most significant bit (in standard two's complement notation) denotes whether or not a number is negative. 
         The number four (4) represented in six bits would be: 000100, and in two's complement negative four (-4) would be 111100.
    A logical shift right, which pads the numbers with a '0' on the left would be:
    000100 --> 000010  (4 --> 2)
    111100 --> 011110  (-4 --> 30)
    An arithmetic shift right, which pads the numbers with whatever their most significant bit is would be: 
    000100 --> 000010  (4 --> 2)
    111100 --> 111110  (-4 --> -2) 
    I don't see  an arithmetic shift function in Labview, but you could build one by converting the number to an array of booleans and shifting to your heart's content.
    When operating on signed numbers Arithmetic shift operations tend to be more useful, but I'm sure there would be quite a bit of confusion if the unsigned number 60 ("111110") gets right shifted and becomes 127! ("111111").
    Finally, there is "one" (heh I'm so punny) special case for arithmetic shifting.  Consider how right shifting (logical and arithmetic) 8 results in 4, then 2, then 1, then 0.  What about arithmetic right shifting of -8?  The results would be -4, then -2, then -1...... then -1, then -1, then -1, etc. 
    Worthwhile resources:
    Two's compliment notation for negative binary numbers: http://en.wikipedia.org/wiki/Two's_complement
    Logical shift explanation (w/ pictures!): http://en.wikipedia.org/wiki/Logical_shift
    Arithmetic shift explanation (w/ pictures!): http://en.wikipedia.org/wiki/Arithmetic_shift
    I hope this helps!
    Hugs,
    memoryleak 
    P.S. I noticed that you mentioned you were modeling number operations of an ASIC.  This book (ISBN: 978-0534378042) was used in the Intro to Digital Logic class I took way too long ago, and I remember it hitting very hard on binary, signs and bit operations.  Looks like a used copy can be had on Amazon for less than $40 
    Message Edited by memoryleak on 10-09-2009 11:00 AM

  • How to know if there are more positive or negative numbers?

    I will try to explain my problem with an example, since in the computer I don't have labVIEW installed.
    I have 10 numbers and multiply it for 10 other numbers
    and of course i will have 10 results, after it I have to show the meddium value of this 10 results and have to show the signal that most appear (+ or -)
    My problem is to show the signal, if I have 7 negative numbers and 3 positive numbers, how can I measure it and show the negative signal in the final?
    example:
    -0,3 -0,8 1 0,3 0,6 -0,7 -0,1 -0,5 0,3 -0,4
    So i have to put in the final:
    - 0,5
    Thanks
    Solved!
    Go to Solution.

    Here is code that gives you -0.5 from the given data. Still, sounds pretty useless.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    minuszeropointfive.png ‏2 KB

  • How do I disallow negative numbers in a selected group of cells (i.e. only allow values greater than or equal to zero)?

    I have a table of calculated values in Numbers, and I want to disallow negative numbers in the entire table. Any numbers that would be negative I would like changed to/displayed as zeroes, that way future calculations that may be based on this cell use the value of 0 for the calculation rather than the negative value. I have seen ways of doing this to single cells at a time, but I am interested in applying it to a large selection of cells.
    There is the Conditional Format option when you bring up the inspector, but I cannot get a custom rule to work for me. I select "Greater than or equal to" and I enter 0 in the box, but nothing changes. Can anyone help with this?
    Thanks

    A step toward simplifying the application of MAX to the issue, Jerry.
    This part, though:
    Now apply your long, animal-modeling, expressions to this new, interposing, table rather than the original.
    may still leave several references to be change from the original data table to the new one.
    One way to get around that is to use the Duplicate ("DATA-1) as the new table for raw data, and the Original (DATA) as the interposing table, using the formula =MAX(DATA-1::A2) as above, starting in DATA::A2.
    This way, the long expressions could continue to reference the original table (with its content now modified).
    ALTERNATE process:
    Find/Replace could also be used to speed the process of reassigning the modeling expressions to the duplicate table, as suggested by Jerry. But some cautions apply here.
    Find/Replace can be limited to Formulas only, but not to Some formulas only.
    Find/Replace can be limited to the Current Sheet only, but this can't be combined with Formulas only.
    More on this later, when I've had a chance to check some possibilities.
    Regards,
    Barry

  • My thumbnails don't display

    I had to restore my hard disk via Time Machine, and my iPhoto software doesn't work right.  When I open it, the thumbnails don't display.  If you double-click on a blank tile, the photo shows up.  How do I get my thumbnails re-connected.  I have already done a permissions fix and re-installed iLife '11.

    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Include the options to rebuild the thumbnails. You may need to repeat this three or four times in my experience.
    Regards
    TD

  • New topics are compiled in but don't display when help button is pressed

    Folks,
    I'm using RoboHelp HTML Build 6. I am the only writer who uses RH and have been using this build for 2 years or so.
    I recently got a new map file from the developer containing 2 new map IDs. I used the same steps to import the map file, create the new topics, and map them to the new map IDs that I have been using for years. But when I compiled RH and pasted the chm into the application folder, those 2 new topics don't display when the help button is clicked on the dialog box to which they are mapped.
    When I generate the chm I can look at the output at the bottom of RH project view and see that that the 2 new htm files are being compiled into the RH project. I can also see them if I open the generated chm and go into the TOC and click on a link to them.
    Does anyone have any ideas? I have tried redoing the usual procedure (see below) for the importing and mapping from scratch several times. I have also tried BugHunter (see below).
    Procedure for Importing and Mapping (this time the help for all the older dialog boxes works but not for the 2 new ones)
    1. Open the new map (.hm) file from the developer and add #define followed by a space to each entry beginnng with the string HID in the new map file (I don't know why but nothing works unless I do this.)
    2. Delete the old map file from the RH project.
    3. In Windows Explorer, copy the new .hm file into the RH project folder.
    4.In Project Manager view, open Context-Sensitive Help. Right-click on Map Files. Select Import. Browse and select the new map file.
    6. Map the new topics using File, Edit Map IDs.
    7. Generate the .chm and pasted it into the application where it always goes.
    BugHunter Procedures and Results
    I first tried the Test HTML Help API dialog.
    I specified the .CHM file I compiled and tested both options:
    --HH_DISPLAY_TOPIC: I put in the name of the new help (htm) file and its relative path and clicked Help. Nothing happened.
    --HH_HELP_CONTEXT: I put in the Map Number for the new dialog box and clicked Help. The new help topic I had created displayed.
    I also used the Tools tab in BugHunter to do a CSH (context sensitive help) Test. I identified the chm file and opened it and put in a new map number, then clicked Show Help. Nothing happened.

    Welcome to the RH forums.
    On the surface it sounds like you have done everything correctly so it should just be a case of going back and double checking that you have the correct CHM, that the mapid is exactly the same as in the app and that the app has been updated.
    Read the RoboColum(n) for a tips, tricks and musings on the Technical Communication Suite products.
    Follow the RoboColum(n) on Twitter

  • Results don't populate text field

    The program compiles and runs but the results don't populate the screen please help. i know I did,t highlight the code but I'm heading out I'm late for work.
    import javax.swing.*;
    import java.awt.*;
    import java.text.DecimalFormat;
    import java.awt.event.*;
    import java.text.NumberFormat;
    class Mortgage extends JFrame implements ActionListener {
    JTextField prinBal=new JTextField(10);
    JComboBox cboRate = new JComboBox();
    JButton send = new JButton("Calculate");
    JTextArea message = new JTextArea(10, 50);
    JScrollPane scroll = new JScrollPane(message,
    JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
    JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
    JPanel row2 = new JPanel();
    FlowLayout flow = new FlowLayout(FlowLayout.LEFT);
    JLabel toLabel = new JLabel("Mortgage amount:");
    JPanel row3 = new JPanel();
    JLabel messageLabel = new JLabel("Schedule:");
    JPanel row4 = new JPanel();
    /* set values */
    int loanTermMonths = 0;
    int monthlyPaymentInterest = 0;
    int remainingLoanBalance = 0;
    int interestRateMonthly = 0;
    int monthlyPaymentPrincipal = 0;
    int monthlyPayment = 0;
    NumberFormat dec = NumberFormat.getInstance();
    /*set values*/
    Mortgage() {
    super("Mortgage");
    setSize(400, 300);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    Container pane = getContentPane();
    pane.setLayout(flow);
    row2.add(toLabel);
    // JTextField to = new JTextField(10);
    row2.add(prinBal);
    cboRate.addItem("5.5% 7 Years");
    cboRate.addItem("5.5% 15 Years");
    cboRate.addItem("5.75% 30 Years");
    row2.add(cboRate);
    pane.add(row2);
    row3.add(messageLabel);
    message.setLineWrap(true);
    message.setWrapStyleWord(true);
    row3.add(scroll);
    pane.add(row3);
    send.addActionListener(this);
    row4.add(send);
    pane.add(row4);
    setContentPane(pane);
    setVisible(true);
    } //constructor close
    public void actionPerformed(ActionEvent e){
    double amount;
    double rate;
    int numPeriods;
    String amort;
    rate =0.0;
    numPeriods = 0;
    amount = 0.0;
    Object source = e.getSource();
    if (source == send) {
    amount = Double.parseDouble(prinBal.getText());
    if (cboRate.getSelectedItem() == "5.5% 7 Years") {
    rate=5.5;
    numPeriods = 7*12;
    else if (cboRate.getSelectedItem() == "5.5% 15 Years") {
    rate=5.5;
    numPeriods = 15*12;
    else if (cboRate.getSelectedItem() == "5.75% 30 Years") {
    rate=5.75;
    numPeriods = 30*12;
    computePayment(amount, rate, numPeriods);
    //Compute the monthly payment based on the loan amount,
    //APR, and length of loan.
    private void computePayment(double loanAmt, double rate, int numPeriods) {
    double I, partial1, denominator, answer;
    String localAmort;
    localAmort = message.getText();
    localAmort =("\nLoan\tMonthly\tInterest\tRemaining"); // format column headers for results to be displayed
    //localAmort = localAmort + ("Months\tPayment\t\tPayment\t\tLoan");
    //localAmort = localAmort + ("Remaining\tPrincipal\tMonthly\t\tBalance");
    localAmort =localAmort +("-------------------------------------");
    System.out.println(loanAmt + " : " + rate + " : " + numPeriods);
    if (rate > 0.01) {
    I = rate / 100.0 / 12.0; //get monthly rate from annual
    partial1 = Math.pow((1 + I), (0.0 - numPeriods));
    denominator = (1 - partial1) / I;
    } else { //rate ~= 0
    denominator = numPeriods;
    answer = (-1 * loanAmt) / denominator;
    localAmort = localAmort + "dd";
    while (loanTermMonths > 0) // start while loop
    monthlyPaymentInterest = (remainingLoanBalance * interestRateMonthly); // Calculate H = R x I
    monthlyPaymentPrincipal = (monthlyPayment - monthlyPaymentInterest); // Calculate C = P - H
    remainingLoanBalance = (remainingLoanBalance - monthlyPaymentPrincipal); // Calculate R = R - C
    // H = monthlyPaymentInterest
    // R = remainingLoanBalance
    // C = monthlyPaymentPrincipal
    // I = interestRateMonthly
    int Months = loanTermMonths;
    double Principal = monthlyPaymentPrincipal;
    double Interest = monthlyPaymentInterest;
    double Balance = remainingLoanBalance;
    System.out.println(Months + " " + dec.format(Principal) + " " + dec.format(Interest) + " " + dec.format(Balance));
    if(loanTermMonths % 10 == 0) // pause results after 10 lines
    try {
    System.out.println("\n\"Please press Enter to continue\"");
    System.in.read();
    catch(Exception e) {
    // end if
    loanTermMonths --;
    } // end while
         public static void main(String[] arguments) {
              Mortgage mail = new Mortgage();
    }

    When posting code, use the code button to wrap your code in [code][[i]code] tags.
    Also, rather than just cutting and pasting from your browser, repost the original code to preserve indentation, which makes the code easier to read.
    � {�                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Negative Numbers importing wrong

    I have a Stored Procedure on my SQL Server 6.5 DB that returns a list of decimal values (sql datatype is decimal(5,2)), of which most are Negative numbers. When the procedure is run in a SQL tool (MS Query or ISQL) the values are returned correctly. When the stored procedure is called in Java, all values (negative or positive) are showing up as zero.
    I have tried all of the following ...
    double d = rs.getDouble(1);
    Float f = rs.getFloat(1);
    Double d2 = new Double(rs.getDouble(1));
    BigDecimal b = rs.getBigDecimal(1);
    String s = rs.getString(1);The value returned by the procedure should look something like -14.75 but when using System.out.println(f.toString()); it is shown as ".00". I have even tried exporting the data out of Java into MS Excel to see if it is just something funny with the System.out.println() statement but it shows all zeros in Excel also.
    Is there anything special or a specific data type that must be used for negative numbers to read correctly in Java? I've searched the forum, tutorials and API (1.3) and haven't found anything like this.
    Any help would be greatly appreciated!!!

    So why do you say the error has something to do with negative numbers when (in your own words): "all values (negative or positive) are showing up as zero"? I don't know what your problem is, but negative numbers probably ain't it.

  • Negative numbers in Parentheses() in Interactive Reports in Apex 4.1

    Hi,
    I want to display the negative numbers in parentheses() in all the interactive reports in my application eg: (367,432,203.07).
    I tried using the PR format "999G999G999G999G990D00PR" in my number/date format option in 'Column Definition'. But it gives the negative number '-367432203.06895' like this '<367,432,203.07>', which is not my exact requirement.
    Is there any other number format/option to get negative numbers in parentheses in my reports.
    Can anyone please help me on this?

    divya wrote:
    I want to display the negative numbers in parentheses() in all the interactive reports in my application eg: (367,432,203.07).
    I tried using the PR format "999G999G999G999G990D00PR" in my number/date format option in 'Column Definition'. But it gives the negative number '-367432203.06895' like this '<367,432,203.07>', which is not my exact requirement.
    Is there any other number format/option to get negative numbers in parentheses in my reports.No. In 4.1 the only way to do this that preserves IR sort/aggregation/calculation functionality is to manipulate the values using a Dynamic Action/JavaScript after the page is rendered. This is not really satisfactory.
    In 4.2 I think it might be possible using a lot of extra columns, HTML Expressions, and CSS.

Maybe you are looking for

  • How do I set up email for suddenlink on my iphone?

    How do I set up my email for Suddenlink on my Iphone. It will not send messages and to receive messages is hit and miss?

  • How do I stop iTunes from automatically opening .wav files

    I recently arranged to have voicemails to a business number sent to me in the form of .wav files that I check at the end of the day from my home PC. I was disappointed to learn that when I open the email and double click the .wav file it automaticall

  • SQL Server Express 2012 Installation File Not Found

    The installation is failing with the following log information found in C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\[log folder]\Detail_ComponentUpdate.txt First, with no luck installing from the downloaded .exe file, I extracted it

  • InterMedia Web Agent & BC4J

    I've seen the code for Oracle8i interMedia Web Agent to store BLOBs in the DB but i see that it does not fits the OBC4J Framework. How do we create a domain in my EO/VO for a BLOB column to be able to stream the bytes? (I know already how to put/get

  • Getting error message after formatting a new media on my Blackberry 9320

    This happens everytime to me when I insert a new media card. I tried 5 brand new SanDisk SD cards. My BlackBerry tells me to format the media card and then a message pops up saying; "The media card you inserted contains errors". After that, I repair