Ignore:
Timestamp:
Nov 21, 2008, 3:17:15 PM (13 years ago)
Author:
Timo Eckhardt
Message:

Fixed error in Sieve of Atkin

Location:
trunk/CrypPlugins/Primes/Primes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/Primes/Primes/Resources/lang/WpfControls/Generation/PrimesGeneration.Designer.cs

    r4 r46  
    22// <auto-generated>
    33//     This code was generated by a tool.
    4 //     Runtime Version:2.0.50727.1433
     4//     Runtime Version:2.0.50727.3053
    55//
    66//     Changes to this file may cause incorrect behavior and will be lost if
     
    314314       
    315315        /// <summary>
     316        ///   Looks up a localized string similar to {0} ist ein Vielfaches von {1} und darum keine Primzahl .
     317        /// </summary>
     318        public static string soa_fithsolutionfound {
     319            get {
     320                return ResourceManager.GetString("soa_fithsolutionfound", resourceCulture);
     321            }
     322        }
     323       
     324        /// <summary>
     325        ///   Looks up a localized string similar to {0} wurde als Primzahl identifiziert. Entferne alle Vielfachen von {1}.
     326        /// </summary>
     327        public static string soa_fourthsolutionfound {
     328            get {
     329                return ResourceManager.GetString("soa_fourthsolutionfound", resourceCulture);
     330            }
     331        }
     332       
     333        /// <summary>
    316334        ///   Looks up a localized string similar to alle Primzahlen erechnen bis.
    317335        /// </summary>
  • trunk/CrypPlugins/Primes/Primes/Resources/lang/WpfControls/Generation/PrimesGeneration.resx

    r4 r46  
    265265    <value>Eine Lösung wurde gefunden. 3 * {0}² - {1}² = {2}. Setzte {3} = {4}.</value>
    266266  </data>
     267  <data name="soa_fithsolutionfound" xml:space="preserve">
     268    <value>{0} ist ein Vielfaches von {1} und darum keine Primzahl </value>
     269  </data>
     270  <data name="soa_fourthsolutionfound" xml:space="preserve">
     271    <value>{0} wurde als Primzahl identifiziert. Entferne alle Vielfachen von {1}</value>
     272  </data>
    267273</root>
  • trunk/CrypPlugins/Primes/Primes/WpfControls/Primegeneration/SieveOfAtkin/SieveOfAtkin.xaml.cs

    r4 r46  
    369369      list[5] = true;
    370370
     371      for (int i = 7; i < list.Length; i++)
     372      {
     373        if (list[i])
     374        {
     375          numbergrid.MarkNumber(GmpBigInteger.ValueOf(i), Brushes.LightBlue);
     376          log.Info(
     377            String.Format(
     378              Primes.Resources.lang.WpfControls.Generation.PrimesGeneration.soa_fourthsolutionfound,
     379              new object[] { i.ToString(), i.ToString()}));
     380          for (int j = i * i; j < list.Length; j += i)
     381          {
     382            list[j] = false;
     383            numbergrid.MarkNumber(GmpBigInteger.ValueOf(j), Brushes.Transparent);
     384            log.Info(
     385              String.Format(
     386              Primes.Resources.lang.WpfControls.Generation.PrimesGeneration.soa_fithsolutionfound,
     387              new object[] { j.ToString(), i.ToString()}));
     388
     389          }
     390        }
     391      }
    371392      numbergrid.Sieved = list;
    372393      //for (int i = 7; i < list.Length; i++)
Note: See TracChangeset for help on using the changeset viewer.