Float do double convertion problem

Hello!
I have code:
Float f=new Float(1.68f);
double test1 =f.doubleValue() * 33333360;
double test2 =1.68D * 33333360;
System.out.println("test1: "+test1);
System.out.println("test2: "+test2);
Output is:
test1: 5.600004305159569E7
test2: 5.60000448E7
Why test1 != test2 ?
test1 value is wrong, and difference is not 0.000001 but 1.8!!!
There are my error?
How can i calculate my expression without error if i have Float input parameter?
Thanks.

http://docs.sun.com/source/806-3568/ncg_goldberg.html

Similar Messages

  • How to format floats (or doubles ) but not converting to String?

    Hi everybody,
    my question is simple:
    I have a number,lets say 51,4567321 and i want to format it ,as a float or double ,as 51,45.
    One way is to do:
    float x=((hits * (float) 100) / this.getAccesses());
    DecimalFormat perCentFormatter = new DecimalFormat("00.00");
    String formattedNum=this.perCentFormatter.format(x);and that will create a string "51,45".
    But how do i do to create a float or double or anything else that holds the value with 2 decimal points after mantissa?e.g XX,XX
    Thank you very much,
    Chris

    A few options:
    1) just live with it. The float and double formats hold their values in binary, you know, and you only have approximations of multiples of tenth and one-hundreds of unity. It's all just approximations for those types. C'est la vie.
    2) Use java.math.BigDecimal, which gives you control over rounding.
    3) Change your design, so you use integers with the lower unit. So if the float currently "51,23" represents 51 Euros and 23 cents (what's the word? Europennies?), then you'd use an int of 5123 to represent five thousand one hundred and twenty-three cents.

  • Float and Double - 5.1 divide by 3.0

    Hi everyone,
    I am quite new to java programming in term of using it. I wrote a test class to learn about float and double. However when I wrote the below code, I got a strange result. So, I wonder if java's float and double have any kind of exception I should be aware of. This won't happen if I just change from 3 to other numbers. Any suggestion? Thanks in advance.
    public class MathTest {
    public static void main (String args[]) {
    float f1 = 5.1F;
    float f2 = 3.0F;
    double d1 = 5.1;
    double d2 = 3.0;
    System.out.println("Float result : " + f1/f2);
    System.out.println("Double result : " + d1/d2);
    Result:
    Float result : 1.6999999
    Double result : 1.7

    This is due to the way that binary numbers convert to digital numbers and is expected. See these threads for explanations:
    http://onesearch.sun.com/search/onesearch/index.jsp?qt=%2Bprecision+%2Bwrong+double&col=developer-forums&rf=0&chooseCat=allJava&subCat=siteid%3Ajava

  • What is the match of float or double data type in abap?

    I have tried p, but I could not handle decimal numbers such as 10.6 or 10,6(no matter which one is preferred, the question is the same...).
    How can I handle these numbers?
    Thanks.

    Hi
    Hope you know about FLOAT and Double.But you can use the same P for handling decimal places...
    Use like this.
    Data :Deci type P DECIMALS 2.
    Get bckif you are getting error still...
    Reward All Helpfull answers..........

  • Convert Problems/Solutions into Knowledge Articles

    Hi Experts,
    I am wroking on SAP CRM 7.0 SP06 and now we are planning to implement Knowledge Article functionality.
    I have done the all configuration settings and multilevel categorization, every thing working fine. Now I want to convert problems/solutions which already created in CRM and stored in SDB into knowledge article.
    Any one please guide me how can I convert existing problems/solutions into knowledge articles. Is there any report for this?
    Thanking you in anticipation.
    Regards,
    Babu.

    Hi Kevin,
    Well, I'm new on this and have only worked on CRM 6 & 7. I'll give you my advice regarding these CRM versions. I don't know if it is supported on CRM 5.
    IMG:
    CRM >> Enterprise Intelligence >> SAF >> Name and Configure KB
    You create and define you DB as you want: ACME INC
    CRM >> Enterprise Intelligence >> SAF >> Business Add-Ins >> BAdI: Knowledge Base
    Each knowledge base should have its own Add-In implementation. So you have to implement an Add-In based on Add-In definition CRM_SAF_KB_*: CRM_SAF_KB_ACME. You can follow IMG documentation.
    In my case, the add-in already existed, since Knowledge Article functionality is standard in 7.0. KB didn't exist, I don't know why. I just created it with the name assigned on the BAdI, compiled, and everything works fine now.
    Hope it helps.
    Regards.
    Pablo

  • Double submission problem in J2EE application under Weblogic 8.1 SP2 server

    Hi,
    We are facing double submission problem in our J2EE application which is running under Weblogic 8.1 SP2 and for the same we already implemented or added the below preventive solutions.
    1. We disable the SUBMIT button once the user clicks it.
    2. We preventated pressing 'F5' button and clicking 'Refresh' button in the browser.
    3. Also we tried to prevent by declaring the idempotent is 'true' under weblogic-ejb-jar.xml as below.
    <stateless-bean-methods-are-idempotent>true</stateless-bean-methods-are-idempotent>
    So please somebody help us on this issue like how to prevent in some other way.
    Regards,
    Dinesh.

    I have no idea why you would think changing your EJB configuration would have anything to do with preventing double submission at your servlet layer.
    One technique I've seen for preventing double submission was first used in the Struts framework several years ago. When a page is "prepared" for display, a token value is created and stored in the session. The page is displayed with a hidden field containing that value. When the page is submitted, the value of the hidden field is compared with the value stored in the session. If they're not equal, the submission is ignored.

  • Canon Powershot S120 Adobe Lightroom RAW converter problem

    Have a MacBook running Yosemite. I am an underwater photographer so rely on using White Balance to get colour into my photos. Since upgrading Lightroom from 5.3 or 5.6 to 5.7 all my Canon S120 RAW files change colour after import and become a wishy washy green.  As one moves along the filmstrip, the Histogram shows calculating and all the photos lose their colour, as if the White Balance is being removed. My previous catalogue, same camera, Lightroom 5.3 or 5.6 photos import as they look on the camera. Have discussed with Canon and they think an Adobe Codec RAW converter problem. Do you have additional Codecs for Canon S120? Canon happy to discuss problem.  Their reference: 1-3374995525. Please help.

    If you look at the Tint slider with As Shot WB set, you’ll see it is maxed out at 150 for all three of your sample images. 
    I think this means that LR’s DNG Profiles don’t have the range to entirely neutralize the WB so your images are left with the wrong WB and no way to fix it. 
    Adobe profiles don’t do a good job in extreme lighting situations, especially with an overabundance of blue light which underwater pictures typically have.
    You can mess with the Calibration sliders a bit and get some of the colors to be more like the camera-JPGs have, but some colors will still be different. 
    If you have an X-Rite color-checker, that you could photograph without getting it wet, then you could make a custom camera calibration profile for that specific lighting scenario and maybe it’d work, but maybe the profiles still can’t extend beyond a certain point.  I am also not sure how you’d keep the color-checker dry underwater.

  • EZ Vinyl Converter problem transferring to iTunes - window appears  "mixmeister programme has stopped working and will shut down". Then the data is lost, and I have to try to record/transfer again.  I have now tried many times.

    EZ Vinyl Converter problem transferring to iTunes - window appears  "mixmeister programme has stopped working and will shut down". Then the data is lost, and I have to try to record/transfer again.  I have now tried many times.
    The deck is ION TTUSB05XL   Laptop   Asus V550C with Windows 8.
    Strangely I did manage to successfully transfer two tracks to iTunes, but all further attempts have failed.
    JJR

    EZ Vinyl Converter problem transferring to iTunes - window appears  "mixmeister programme has stopped working and will shut down". Then the data is lost, and I have to try to record/transfer again.  I have now tried many times.
    The deck is ION TTUSB05XL   Laptop   Asus V550C with Windows 8.
    Strangely I did manage to successfully transfer two tracks to iTunes, but all further attempts have failed.
    JJR

  • Validating a JTextField having a float or double value.

    Hello,
    I need help in validating a JTextfield which will accept a float or double value because it the deposit field and it shouldn't be of length more than 7 before the decimal and 2 after the decimal.That is it should be of length 10.I have written the following code for the validation.
    txtDeposit.addKeyListener(new KeyAdapter(){
    //Accept only integer value
              public void keyTyped(KeyEvent e){
              char c = e.getKeyChar();
    if((txtDeposit.getText()).length() == 10)
              if (!(Character.isDigit(c)))
              if(!Character.isISOControl(c))
              getToolkit().beep();
              e.consume();
              });//end of txtDeposit*/
    Please help.

    use javax.swing.InputVerifier
    import java.awt.BorderLayout;
    import java.awt.Toolkit;
    import javax.swing.InputVerifier;
    import javax.swing.JButton;
    import javax.swing.JComponent;
    import javax.swing.JFrame;
    import javax.swing.JTextField;
    public class VerifyInput extends JFrame {
        public VerifyInput(){
            super("Input Verifier");
            this.setSize(200, 200);
            this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JTextField txt = new JTextField();
            txt.setInputVerifier(new CheckInput());
            this.getContentPane().add(txt, BorderLayout.NORTH);
            JButton btnMoveFocus = new JButton("CLick");
            this.getContentPane().add(btnMoveFocus, BorderLayout.SOUTH);
        public static void main(String[] args) {
            VerifyInput f = new VerifyInput();
            f.setVisible(true);
        class CheckInput extends InputVerifier{
            private int lengthBeforeDot = 7;
            private int lengthAfterDot = 2;
            public CheckInput(){
            public CheckInput(int lengthBeforeDot, int lengthAfterDot){
                this.lengthAfterDot = lengthAfterDot;
                this.lengthBeforeDot = lengthBeforeDot;
            public boolean verify(JComponent input) {
                boolean correct = true;
                try {
                    JTextField tField = (JTextField) input;
                    String text = tField.getText();
                    if(text.length() == 0){
                        return true;
                    if ((correct = isDoubleOrFloat(text))) {
                        correct = isFormatCorrect(text);
                } finally {               
                    if(!correct){
                        Toolkit.getDefaultToolkit().beep();
                        System.out.println("Not Correct");
                    }else{
                        System.out.println("Correct");
                return correct;
            private boolean isDoubleOrFloat(String text){
                try{
                    Double.parseDouble(text);
                }catch(NumberFormatException nfe){
                    return false;
                return true;
            private boolean isFormatCorrect(String text){
                int dotIndex = text.indexOf('.');
                if(dotIndex < 0){
                    return text.length() <= lengthBeforeDot;
                String beforeDecimal = text.substring(0, dotIndex - 1);
                if(beforeDecimal.length() >= lengthBeforeDot){
                    return false;
                String afterDecimal = text.substring(dotIndex + 1);
                if(afterDecimal.length() > lengthAfterDot){
                    return false;
                return true;
    }

  • Float double big problem

    New to java.
    Heres a perplexing issue:
         private Float lengthInFeet;
         private Integer lengthInInches;
         public void calcLengthInFeet()     
              lengthInFeet = lengthInInches * 1.0 / 12.0;
    compile error:
    incompatible types
    found : double
    required: java.lang.Float
    lengthInFeet = lengthInInches * 1.0 / 12.0;
    What am I doing wrong?
    Thanks,
    sb
    ^

    You are mixing primitive types and class types.
    You need to know the difference.
    To create a new Float object, you have to use the new operator.
    Try reading the section on variable types in the online tutorial:
    http://java.sun.com/docs/books/tutorial/java/nutsandbolts/variables.html
    You can also fix this single problem by changing the class types to primitive types, like this:
    private double lengthInFeet;
    private int lengthInInches;However, unless you learn/understand the distinction between the types, you won't get much farther. Read the tutorial.
    � {�                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Overflow when trying to assign Float to Double

    Please excuse me if this has already been anwered.
    I'm trying to pull a long decimal (0.110494842038439 to be exact) from an
    Oracle database table where it's stored as a Float.
    Dim z As Double = rsAgg("st_dev")
    Returns the error "Arithmetic operation resulted in an overflow."
    Dim z As Oracle.DataAccess.Types.OracleDecimal = rsAgg.GetDecimal(2)
    Seems like it should do it, but that one gives the same error.
    Dim z As Oracle.DataAccess.Types.OracleDecimal = rsAgg.GetValue(2)
    Same thing.
    I'm running out of ideas, hopefully someone can point me in the right
    direction.
    Thanks!
    -Dan

    I know that using the SafeMapping feature you could get the value back either as a string or as a binary representation.
    Converting from a string value is, as we both agree, inefficient especially for thousands of values in a loop.
    The binary representation is easily converted to an OracleNumber using the constructor that takes an array of bytes. The problem is that I can't safely cast the OracleNumber to a decimal (System.Decimal) when the OracleNumber has a greater precision than a decimal will hold.
    Now I could write my own function that operates on the byte array and converts the relevant portion to a decimal ignoring the extra precision. But it would be so much more clean, and definitely less buggy, if this were done for me in the OracleDataReader itself.
    Just to clarify, the reason I want these values as decimals is because I want them in a DataSet or other structure that I want to serialise to a remote client - where the ODP is not installed. In which case I am restricted to native .NET types.

  • BUG: Large floating point numbers convert to the wrong integer

    Hi,
    When using the conversion "bullets" to convert SGL, DBL and EXT to integers there are some values which convert wrong. One example is the integer 9223370937343148030, which can be represented exactly as a SGL (and thus exactly as DBL and EXT as well). If you convert this to I64 you get 9223370937343148032 instead, even though the correct integer is within the range of an I64. There are many similar cases, all (I've noticed) within the large end of the ranges.
    This has nothing to do with which integers can be represented exactly as a floating point value or not. This is a genuine conversion bug mind you.
    Cheers,
    Steen
    CLA, CTA, CLED & LabVIEW Champion
    Solved!
    Go to Solution.

    Yes, I understand the implications involved, and there definetely is a limit to how many significant digits that can be displayed in the numeric controls and constants today. I think that either this limit should be lifted or a cap should be put onto the configuration page when setting the display format.
    I ran into this problem as I'm developing a new toolset that lets you convert all the numeric formats into any other numeric format, just like the current "conversion bullets". My conversion bullets have outputs for overflow and exact conversion as well, since I need that functionality myself for a Math toolset (GPMath) I'm also developing. Eventually I'll maybe include underflow as well, but for now just those two outputs are available. Example:
    I do of course pay close attention to the binary representation of the numbers to calculate the Exact conversion? output correctly for each conversion variation (there are hundreds of VIs in polymorphic wrappers), but I relied in some cases on the ability of the numeric indicator to show a true number when configured appropriately - that was when I discovered this bug, which I at first mistook for a conversion error in LabVIEW.
    Is there a compliancy issue with EXT?
    While doing this work I've discovered that the EXT format is somewhat misleadingly labelled as "80-bit IEEE compliant" (it says so here), but that statement should be read with some suspicion IMO. The LabVIEW EXT is not simply IEEE 754-1985 compliant anyways, as that format would imply the x87 80-bit extended format. An x87 IEEE 754 extended precision float only has 63-bit fraction and a 1-bit integer part. That 1-bit integer part is implicit in single and double precision IEEE 754 numbers, but it is explicit in x87 extended precision numbers. LabVIEW EXT seems to have an implicit integer part and 64-bit fraction, thus not straight IEEE 754 compliant. Instead I'd say that the LabVIEW EXT is an IEEE 754r extended format, but still a proprietary one that should deserve a bit more detail in the available documentation. Since it's mentioned several places in the LabVIEW documentation that the EXT is platform independent, your suspicion should already be high though. It didn't take me many minutes to verify the apparent format of the EXT in any case, so no real problem here.
    Is there a genuine conversion error from EXT to U64?
    The integer 18446744073709549568 can be represented exactly as EXT using this binary representation (mind you that the numeric indicators won't display the value correctly, but instead show 18446744073709549600):
    EXT-exponent: 0x100000000111110b
    EXT-fraction: 0x1111111111111111111111111111111111111111111111111111000000000000b
    --> Decimal: 18446744073709549568
    The above EXT value converts exactly to U64 using the To Unsigned Quad Integer "bullet". But then let's try to flip the blue bit from 0 to 1 in the fraction part of the EXT, making this value:
    EXT-exponent: 0x100000000111110b
    EXT-fraction: 0x1111111111111111111111111111111111111111111111111111100000000000b
    --> Decimal: 18446744073709550592
    The above EXT value is still within U64 range, but the To Unsigned Quad Integer "bullet" converts it to U64_max which is 18446744073709551615. Unless I've missed something this must be a genuine conversion error from EXT to U64?
    /Steen
    CLA, CTA, CLED & LabVIEW Champion

  • Urgent : double precision problem

    This problem is reported on the forum lots of times by lots of people.
    consider situation :
    if ((2.9 - 1.1) == 1.8)
    do something
    else
    do otherthings;
    Its expected to do something on evaluation of condition in if statement .. instead it enters else part.
    secondly, if somewhere in the code,
    The BigDecimal can solve the problem in most of the situations but even it has some problems.. sometimes we need to format the contents of BigDecimal before displaying them.. formatting solves display problem but the value stored internally is not proper..
    e.g.
    formatting to 2 decimal places might display 12.35 for 12.349999 but the value stored in the variable is still 12.349999.
    Please let me know if anybody has inputs on this.
    Thanks in advance,

    Here is some code that may help you and others who are having a problem with double values. I created this class specifically to be used when using percentages. You can use it to round off values, I have yet to complete the code to round up or truncate values. Once you set the value you can then call the roundOff() method specifying how many decimal places you want to round off (i.e. 2 for percentages). You can then retrieve the value as a double or string or int or float.
    I hope that you find this useful.
    import java.lang.*;
    public class MyDouble extends Number {
         private double value;
    * MyDouble constructor comment.
    public MyDouble() {
         super();
    * MyDouble constructor comment.
    public MyDouble(double newValue) {
         super();
         this.setValue(newValue);
    * Insert the method's description here.
    * Creation date: (2001-01-04 1:24:18 PM)
    * @return double
    public MyDouble(String inputString) {
         super();
         this.setValue(inputString);     
    * Insert the method's description here.
    * Creation date: (2000-12-28 8:08:54 AM)
    * @return double
    public double doubleValue() {
         return (double)this.getValue();
    * This method will accept a value to use as decimal positions required.
    * It uses the exponent function "e", to move the required decimal positions
    * over.
    * Creation date: (2001-01-03 3:02:26 PM)
    public void exponent(int decimalPositions) {
         String text = getValue() + "e" + (decimalPositions);
         setValue(Double.valueOf(text).doubleValue());
    * Insert the method's description here.
    * Creation date: (2000-12-28 8:08:54 AM)
    * @return double
    public float floatValue() {
         return (float)this.getValue();
    * Insert the method's description here.
    * Creation date: (2000-12-28 8:20:08 AM)
    * @return java.lang.Double
    public double getValue() {
         return value;
    * Insert the method's description here.
    * Creation date: (2000-12-28 8:08:54 AM)
    * @return double
    public int intValue() {
         return (int)this.getValue();
    * Insert the method's description here.
    * Creation date: (2000-12-28 8:08:54 AM)
    * @return double
    public long longValue() {
         return (long)this.getValue();
    * Counts the number of numbers that are after the decimal position.
    * Creation date: (2000-12-29 8:36:10 AM)
    * @return int
    public int numberOfNumbersAfterDecimalPosition() {
         String text = getValue() + "";
         int decimalCount = 0;
         for (int i = 0; i < text.length(); i++) {
              String characterText = text.valueOf(text.charAt(i));
              if (characterText.equals(".")) {
                   decimalCount = text.length() - 1 - i;
         return decimalCount;
    * Insert the method's description here.
    * Creation date: (2000-12-28 8:33:55 AM)
    * @return java.lang.Double
    public Double returnDouble() {
         return new Double(this.getValue());
    * Insert the method's description here.
    * Creation date: (2000-12-28 8:33:55 AM)
    * @return java.lang.Double
    public Integer returnInteger() {
         return new Integer(this.intValue());
    * Insert the method's description here.
    * Creation date: (2000-12-28 8:33:55 AM)
    * @return java.lang.Double
    public String returnString() {
         return ""+getValue();
    * This method will round off itself to the specified decimal places.
    * There is a maximum size of 7 decimal positions,
    * if a bigger number is entered unpredictable results will be returned.
    * Creation date: (2000-12-20 3:35:07 PM)
    public void roundOff(int decimalPositions) {
         /* Check the number of decimal postions to determine if the user is requesting an
         unneeded rounding. */
         if (decimalPositions < this.numberOfNumbersAfterDecimalPosition()) {
              int size;
              int intValue = 0;
              int comparisonInt = 0;
              String comparisonString;
              Integer comparisonValue;
              /* Will create an exponent in string format so that the decimal place can moved
              over the requested decimal positions to the right and adds one to the
              decimal position so that the value after the cut off position can be evaluated
              for rounding purposes. */
              String text = "";
              if (getValue() > 0.001) {
                   text = getValue() + "e" + (decimalPositions + 1);
              } else {
                   text = "" + getValue();
              comparisonInt = Double.valueOf(text).intValue();
              text = "" + comparisonInt;
              // Determine size of string     
              size = text.length();
              /* Checks the value in the last position of string */
              comparisonString = text.valueOf(text.charAt(size-1));
              // Converts the value to be compared from a string to an Integer
              comparisonValue = Integer.valueOf(comparisonString);
              // Creates the actual exponent string to be used
              if (getValue() > 0.001) {
                   text = getValue() + "e" + decimalPositions;
              } else {
                   text = "" + getValue();
              /* Compares to see if the value should be rounded up. The exponent string is
              passed to the valueOf method of a Double and then the int value is determined.
              if the value is to be rounded up then 1 is added to the int value.
              if (comparisonValue.intValue() >= 5) {
                   intValue = Double.valueOf(text).intValue() + 1;
              else {
                   intValue = Double.valueOf(text).intValue();
              /* Creates an exponent sting so that the decimal positions can be moved over the
              specified decimals places to the left. */
              text = intValue + "e-" + decimalPositions;
              // The double value of the exponent string is stored in value field
              setValue(Double.valueOf(text).doubleValue());
    * Insert the method's description here.
    * Creation date: (2000-12-20 3:35:35 PM)
    * @return double
    public double roundUp() {
         return 0;
    * Insert the method's description here.
    * Creation date: (2000-12-28 8:20:08 AM)
    * @param newValue java.lang.Double
    private void setValue(double newValue) {
         value = newValue;
    * Insert the method's description here.
    * Creation date: (2001-01-04 1:28:14 PM)
    private void setValue(String newValue) {
         value = Double.valueOf(newValue).doubleValue();
    * Insert the method's description here.
    * Creation date: (2001-01-03 2:53:55 PM)
    * @return double
    public double truncate() {
         return 0;
    Robert

  • Adobe Media Converter problems...

    Problem #1 - seems when I'm trying to convert larger files, I instantly get the message in the timeline "Conforming file..." - this NEVER goes away.  However, 9 times out of 10, if I restart my machine and try again it will instantly start encoding without any issues - so obviously there was no need for any conforming in the first place.  What could be causing this and how do I fix it?
    Problem #2 - my file are 1920x1080.  If I convert them to f4v's without any resizing, and then play in a flash player at 640x360, the video is stretched and not as "high" as it should be, despite the 640x360 being a perfect aspect ratio to the 1920x1080.  If I do convert with resizing, then it looks fine, but I'd like to have a better quality when users switch to full screen if possible...
    What might I be doing wrong?  Thanks in advance...

    If the Audio is not in 32-bit, floating point form, with existing PEK files, then it DOES need to be conformed. I do not know of any camera that shoots 32-bit, floating point Audio, but might have missed one.
    In your Project's Scratch Disk folders do you have the CFA and PEK files already? If not, they need to be generated. If so, no Conforming should go on.
    Because of the size of the CFA's, I mentioned the free space on HDD's, as many have experienced Conforming issues, when they just did not have enough space. Cannot say that this is your issue, but is something to check.
    Also, the time to Conform the Audio will depend greatly on the Audio specs. and CODEC used, plus the Duration of the Clips, plus the speed of the computer.
    As a for instances, if one Imports a muxed MPEG w/ 12-bit 32KHz Audio (MPEG CODEC), it will take MUCH longer to Conform, than would a DV-AVI Type II with PCM/WAV 48KHz 16-bit Audio.
    With the former, one can expect to go to Starbucks, get a latte and then come back to find it completing, and with the latter, it will happen almost too quickly to even see the blue progress bar. Still, the Durations and the system will weigh heavily on those general timings.
    Good luck,
    Hunt

  • IPod 3rd gene: convert problem for videos

    I'm using a iTune 7.5 and I converted my music videos for my friends' iPod. I then synced it to his iPod but when he played it there was no sound what so ever. I checked to see if it was a head phone problem but it wasn't. I double checked my iTunes and played the converted ones, only problem is theres no sound.

    If the videos are multiplexed MPEG files then the audio and the video are muxed onto the same track. QuickTime, and therefore any application that uses QT like iTunes, the iPod, iMovie (Mac app), etc. expect two separate tracks, one video and one audio. So when you convert these muxed files, the video is played and the audio is not heard.
    iPod plays video but not audio of some exported files
    http://docs.info.apple.com/article.html?artnum=302588
    So you need to do a conversion on the file first. MPEG Streamclip is a popular one that comes in both Mac and Windows versions and is known to "repair" this problem.
    See this other link for other applications that might be able to do the same thing. But your root cause is the muxed MPEG files.
    GUIDES TO: Converting Video for iPod - Mac & Window
    http://forums.ilounge.com/showthread.php?s=&threadid=123067
    Patrick

Maybe you are looking for